This commit is contained in:
creme 2019-10-12 20:18:28 +02:00
commit ae9707546c
Signed by: creme
GPG Key ID: C147C3B7FBDF08D0
12 changed files with 580 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*~
/site
*.sublime-project
*.sublime-workspace

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# envs.net - help
partially forked from: [tilde.team - wiki](https://tildegit.org/team/site/src/branch/master/wiki/)

43
docs/blog.md Normal file
View File

@ -0,0 +1,43 @@
# # user blog
you're blog is available under *https://envs.net/~username/blog* and *https://username.envs.net/blog*.<br />
and you can also use any other blogging software. ;)
## with [ttbp](https://envs.net/ttbp/)
**available system-wide as `feels` and `ttbp`**
a command-line based blogging platform running on envs.net
just log in to you're envs.net account and enter: `feels`
ttbp will ask you a few questions to get you started. after that, writing and reading entries all happen within the program.
that's it!<br />
please see for more informations on the envs.net [ttbp](https://envs.net/ttbp/) page.
## with [twtxt](https://github.com/buckket/twtxt)
**available system-wide as `twtxt`**
twtxt is a decentralised, minimalist microblogging service for hackers.
to set up your twtxt it takes the following steps
1. `twtxt quickstart` - this wizard will generate a basic configuration file for twtxt<br /> in `~/.config/twtxt/config`. *for more config option see: [twtxt - configuration](https://twtxt.readthedocs.io/en/latest/user/configuration.html)*.<br />*note your public twtxt location is ~/public_html/twtxt.txt*
2. now you can use `twtxt tweet "Hello, this is twtxt!"` to post a status and<br />`twtxt timeline` to view your timeline.
for more feature see `twtxt --help` and [twtxt - usage](https://twtxt.readthedocs.io/en/latest/user/usage.html).
our twtxt registry server and more information about it can be found on: [https://twtxt.envs.net](https://twtxt.envs.net/)
## with [bashblog](https://github.com/envs-net/bashblog)
**available system-wide as `bb`**
A single Bash script to create blogs.
### usage
- `bb post` or `bb post --html` - to use html
- write a post
- save, close and then select from the bashblog menu choices
### config
to change the name and url and other settings for you're blog edit<br />
the `config` file in `~/public_html/blog/` see for an example [here](https://github.com/envs-net/bashblog/blob/master/.config_example).<br />

43
docs/database.md Normal file
View File

@ -0,0 +1,43 @@
# &#35; user database
## sqlite
in the spirit of minimalism, the recommended database technology to use here is sqlite. sqlite db's exist as a single, atomic file, and are a good use for light applications, with low to medium concurrent loads.<br>
it also allows for greater flexibility, and segregation for your application's data: you can create as many sqlite databases as you need.
- [documentation](https://sqlite.org/docs.html)
- [sqlite cli](https://sqlite.org/cli.html)
## mysql
- [documentation](https://dev.mysql.com/doc/mysql-getting-started/en/)
on `localhost` port `3306`
- database name: `username`
- database user: `username`
- password: *see you welcome email*
connecting to mysql:<br />
&nbsp;&nbsp;`mysql -u username -p`
### database backup & restore
simple backup:<br />
&nbsp;&nbsp;`mysqldump "$USER" -p > ~/backup/dump_"$USER".sql`
and restore:<br />
&nbsp;&nbsp;`mysql -p -u "$USER" < ~/backup/dump_"$USER".sql`
you can also use our `envs_mysql.sh` - backup and restore script.<br />
the backup files will stored under `~/backup/`.
show `envs_mysql.sh -h` for more informations
```bash
Usage: envs_mysql.sh
backup - backup your default user database
backup <db_name> - backup database
restore - restore your latest user database
restore <db_name> - restore database
```
with cron you can also do your backup regularly at a certain time.<br />
see [help -&gt; cron](https://envs.net/help/help/#croncrontab) for a example.

31
docs/finger.md Normal file
View File

@ -0,0 +1,31 @@
the finger protocol was created way back in 1977. its purpose was to display information about the queried user of a system, or all the users of a system.
# &#35; user finger
here on envs.net, we run efingerd. see `man efingerd` for more info.<br />
you can create a script called `~/.efingerd` which will be run when anyone fingers you.
## querying
the standard query for finger is simply
`finger user@envs.net`
which displays login name, home directory, shell, real name, current login time, idle time, whether or not the user has mail, and the contents of the user's `~/.plan`, `~/.project` and `~/.tz` file.
## .plan
The `~/.plan` file displayed at the end of the finger query response allows for some customization. You can put literally any text you want there. Status updates, summaries, etc. This little file allows us to use finger as a rudimentary social network.
For example, say you want to use it as a personal summary, like having a blurb about what you're working on. Place the statement into `~/.plan` and you're ready to go!
For a more traditional social network style format, put dated and timed status updates as if you're tooting on a mastodon instance. The sky's the limit! Well, actually, text is the limit. But you get the idea. Right?
## .project
in the `~/.project` file you can deposit information about your projects.
## .tz
the `~/.tz` file displayed your timezone informations.
example:<br />
&nbsp;&nbsp;`Europe/Berlin`
hope to see you on finger soon!

32
docs/gemini.md Normal file
View File

@ -0,0 +1,32 @@
the [gemini protocol](gopher://zaibatsu.circumlunar.space:70/1/~solderpunk/gemini)(only via gopher) was created in 2019.
Gemini is a new internet protocol which:
- Is heavier than gopher
- Is lighter than the web
- Will not replace either
- Strives for maximum power to weight ratio
- Takes user privacy very seriously
we're trying to keep this cool corner of the web alive.
# &#35; user gemini
main gemini page: `gemini://envs.net`<br />
envs.net serves user gemini sites from your `~/public_gemini` directory.
if a file called `index.gmi` exists in the directory you're currently browsing to in gemini, it will get processed and displayed.<br />
see [this example](gopher://zaibatsu.circumlunar.space/0/%7esolderpunk/gemini/docs/spec-spec.txt)(only via gopher) for more information on file types and special chars.
## browse gemini-sites
if you're currently connected from a envs.net shell, you can use the following browser.
- [`av98`](https://tildegit.org/solderpunk/AV-98)
- `av98 gemini://envs.net`
- [`bombadillo`](https://tildegit.org/sloum/bombadillo)
- `bombadillo gemini://envs.net`
if you want to access the gemini site in your public_gemini dir, use the following link structure:
&nbsp;&nbsp;`gemini://envs.net/~username`<br />

38
docs/gopher.md Normal file
View File

@ -0,0 +1,38 @@
the [gopher protocol](http://en.wikipedia.org/wiki/Gopher_(protocol)) was created in 1991. it didn't survive long due to [draconic licensing](http://www.nic.funet.fi/pub/vms/networking/gopher/gopher-software-licensing-policy.ancient).
we're trying to keep this cool corner of the web alive.
# &#35; user gopher
main gopher page: `gopher://envs.net`
envs.net serves user gopherholes from your `~/public_gopher` directory.
to get listed on the [main gophermap](gopher://envs.net/),
make some changes to your root gophermap. the root gophermap
diffs against the default gophermap that was included with your account.
if a file called `gophermap` exists in the directory you're currently
browsing to in gopher, it will get processed and displayed.<br />
see [this example](https://github.com/gophernicus/gophernicus/blob/master/README.Gophermap) for more information on file types and special chars.
one of the coolest item types supported in gophernicus is `=` which allows you
to include other gophermaps or the output of executables.
you can even make your whole gophermap executable and it will be run through
whatever interpreter you specify in the shebang.
## browse gopher-sites
if you're currently connected from a envs.net shell, you can use the following browser.
- [`lynx`](https://lynx.browser.org/)
- `lynx gopher://envs.net`
- [`vf1`](https://github.com/solderpunk/VF-1)
- `vf1 gopher://envs.net`
- [`bombadillo`](https://tildegit.org/sloum/bombadillo)
- `bombadillo gopher://envs.net`
if you want to access the gophersite in your public_gopher dir, use the following link structure:
&nbsp;&nbsp;`gopher://envs.net/1/~username`<br />
<br />
otherwise, you can use our [http proxy](https://gopher.envs.net/envs.net/) to browse the gophernet.

217
docs/help.md Normal file
View File

@ -0,0 +1,217 @@
# help
> *write in irc (#envs) or*<br />
> *contact [sudoers@envs.net](mailto:sudoers@envs.net) for any other help requests.*
## &#35; show public ip
`curl ip.envs.net`
## &#35; termbin - aliases
`echo 'alias tb="nc tb.envs.net 9999"' >> ~/.bash_aliases`
you can POST a text:<br />
&nbsp;&nbsp;`echo less typing now! | tb`
or Content of a file:<br />
&nbsp;&nbsp;`cat ~/some_file.txt | tb`<br />
## &#35; the null pointer - aliases
add the following lines to you're aliases file `~/.bash_aliases`
```bash
0file() { curl -F"file=@$1" https://envs.sh ; }
0url() { curl -F"url=$1" https://envs.sh ; }
0short() { curl -F"shorten=$1" https://envs.sh ; }
```
HTTP POST files here:<br />
&nbsp;&nbsp;`0file "yourfile.png"`
you can also POST remote URLs:<br />
&nbsp;&nbsp;`0url "https://example.com/image.jpg"`
or you can shorten URLs:<br />
&nbsp;&nbsp;`0short "https://example.com/some/long/url"`<br />
<br />
*if you want a nice wrapper, try [~tomasino's pb](https://git.envs.net/envs/pb)*
## &#35; ssh
your ssh directory is: `~/.ssh/` this includes the following files.
- your ssh config file `~/.ssh/config` (more bellow)
- the `authorized_keys`-file is a list of public keys (one per line) that are allowed to log in to your user account.
- `id_ed25519` or `id_rsa` are each private keys, and `id_ed25519` or `id_rsa.pub` are the corresponding pubkey.
### ssh details and usage
ports 22, 80, 443, 2222 and 2223 are available for ssh.<br />
use ssh.envs.net to reach the secondary ip and use 80 and 443 for ssh.<br />
so, for example, you can do:<br />
&nbsp;&nbsp;`ssh user@envs.net`<br />
&nbsp;&nbsp;`ssh -p2223 user@envs.net`
or for the secondary ip:<br />
&nbsp;&nbsp;`ssh -p443 user@ssh.envs.net`<br />
<br />
if you have a slightly shaky connection then you can also use `mosh`.
### create a ssh-key
make sure you have a `~/.ssh directory`<br />
&nbsp;&nbsp;`mkdir -m 700 ~/.ssh`
create your key<br />
&nbsp;&nbsp;`ssh-keygen -t ed25519 -a 100`
your public and private key will be located at<br />
&nbsp;&nbsp;`cat ~/.ssh/id_ed25519.pub`
you can also use rsa:<br />
&nbsp;&nbsp;`ssh-keygen -t rsa -b 4096`<br />
&nbsp;&nbsp;`cat ~/.ssh/id_rsa.pub`
### ssh config
define ssh host aliase in `~/.ssh/config`
```bash
Host envs.net
HostName envs.net
Port 2223
User user
LocalForward localhost:6667 localhost:6667
```
now you can use a simple `ssh envs.net` to connect.<br />
there are tons of other options, including this `LocalForward` line to automatically set up the tunnel as show below.<br />
for more available options, see the man page: `man ssh_config`
### ssh tunnels
for example, you want to get into znc with your local client (weechat, etc),<br />
but your local network blocks znc ports. you can connect to envs.net, and use port forwarding to get on.
if you are connecting from a linux machine, you can do this:<br />
&nbsp;&nbsp;`ssh -L 6667:localhost:6667 envs.net`
after being logged in, open your local irc client, and use `127.0.0.1:6667`<br />
for your server setting. voila! you're now on envs.net znc server.<br />
what that ssh command did was open a local port tunnel (-L), using local port 6667 (6667:)<br />
pointed at localhost (from the remote's point of view), on remote port 6667 (default irc port).
putty has the same ability (for windows and mac users), under connection &gt; ssh &gt; tunnels.
you can do this for any arbitrary port.
### import &amp; authorize a public ssh-key
from URL (on remote machine)<br />
&nbsp;&nbsp;`echo $(curl -sL https://example.com/id_rsa.pub) | tee -a ~/.ssh/authorized_keys`
over ssh (on local machine)<br />
&nbsp;&nbsp;`ssh-copy-id -i ~/.ssh/id_rsa.pub -p2223 user@envs.net;`
### ssh remote execution
`ssh envs.net ping google.de`
or<br />
&nbsp;&nbsp;`ssh envs.net bash -c "'uname -a'"`
exec a local script<br />
&nbsp;&nbsp;`ssh envs.net 'bash -s' < local_script.sh`
## &#35; scp usage
copy ssh pub key to remote:<br />
&nbsp;&nbsp;`scp -P 2223 ~/.ssh/authorized_keys user@envs.net:~/.ssh/authorized_keys`
copy website index.html from remote:<br />
&nbsp;&nbsp;`scp -P 2223 user@envs.net:~/public_www/index.html ~/public_www/`
## &#35; rsync usage
sync website to remote:<br />
&nbsp;&nbsp;`rsync -avz -e "ssh -p 2223" ~/public_www user@envs.net:~`<br />
sync website from remote:<br />
&nbsp;&nbsp;`rsync -avz -e "ssh -p 2223" user@envs.net:~/public_www ~/`<br />
## &#35; sftp usage
connect: `sftp -oPort=2223 user@envs.net`
### commands:
exit: `exit`<br />
print help: `help`
### transferring
files to remote:<br />
&nbsp;&nbsp;`put localfile remotefile`
dir to remote:<br />
&nbsp;&nbsp;`put -r localdir remotedir`
files from remote:<br />
&nbsp;&nbsp;`get remotefile localfile`
dir from remote:<br />
&nbsp;&nbsp;`get -r remotedir localdir`
### example:
add index.html to public_www Dir:<br />
&nbsp;&nbsp;`put public_www/index.html public_www`
add `~/.ssh/authorized_keys:`<br />
&nbsp;&nbsp;`put .ssh/authorized_keys .ssh/authorized_keys`
### single line usage (on local machine)
&nbsp;&nbsp;to remote: `sftp -P 2223 user@envs.net:remotedir <<< $'put localfile_path'`<br />
&nbsp;&nbsp;from remote: `sftp -P 2223 user@envs.net:remotefile localfile`
## &#35; your shell
avaliable shells: `ash`, `bash`, `csh`, `dash`, `elvish`, `fish`, `ksh`, `mksh`, `sash`, `sh`, `tcsh`, `xonsh`, `yash`, `zsh`<br />
*list all available shells: `more /etc/shells`*
to change your shell use: `chsh -s $(which <shell>)`<br />
or `chsh -s <path_to_shell>`
example: `chsh -s $(which bash)` or `chsh -s /bin/bash`
## &#35; timezone
The timezone by default on the server is UTC.
If you want to make it so that your shell prints out dates in localtime for you,<br />
run `tzselect` to find the correct timezone name that youll need to export as the TZ environment variable.
for example, if youre in eastern time, add something like this<br />
`export TZ="America/Detroit"`<br />
to your .bashrc .
to get your timezone you can use `date`.
## &#35; cron/crontab
with cron you can run specific tasks at a specific time.
display current crontabs:<br />
&nbsp;&nbsp;`crontab -l`
add/edit crontabs:<br />
&nbsp;&nbsp;`crontab -e`
example: - backup your mysql db once per day
```bash
..
# m h dom mon dow command
0 0 * * * /usr/local/bin/envs_mysql.sh backup
```
for more information see the manual pages of crontab(5) and cron(8)
## &#35; daemonize processes
so you've got a process that you want to keep running. you might have it in a<br />
tmux or screen session. let's use systemd user units to manage it!
- ensure that your user unit loadpath is set up:<br />`mkdir -p ~/.config/systemd/user/`
- create a basic service. save something like this<br />in `~/.config/systemd/user/my-new-service.service` (adjusting where necessary)
```bash
[Unit]
Description=my script description
[Service]
ExecStart=/bin/bash -c "while true do; echo hi; done"
[Install]
WantedBy=default.target
```
- enable it:<br>`systemctl --user enable --now my-new-service.service`
- enable-linger for your user account:<br />`loginctl enable-linger`<br />this allows your user units to run even when you're not logged in.
done!<br />
you can now use `systemctl --user` to manage your daemonized process.

64
docs/index.md Normal file
View File

@ -0,0 +1,64 @@
<br />
> *write in irc (#envs) or*<br />
> *contact [sudoers@envs.net](mailto:sudoers@envs.net) for any help requests.*
# System Info
more infos over the system and the installed packages can you find on the [sysinfo page](https://envs.net/sysinfo/).
# Services
## &#35; code related stuff
- [gitea](https://git.envs.net/) - members can be use your email credantials for login. (*user@envs.net* | *your email pw*)
## &#35; general utilities
- [searx](https://searx.envs.net/) - privacy-respecting metasearch engine
- [cryptpad](https://pad.envs.net/) - collaborative real time editing
- [cryptdrive](https://pad.envs.net/drive/)
- [rich text](https://pad.envs.net/pad/)
- [markdown/code editor](https://pad.envs.net/code/)
- [presentation slides editor](https://pad.envs.net/slide/)
- [polls](https://pad.envs.net/poll/)
- [kanban boards](https://pad.envs.net/kanban/)
- [whiteboard](https://pad.envs.net/whiteboard/)
- [file drop](https://pad.envs.net/file/)
- [todo lists](https://pad.envs.net/todo/)
- [contacts](https://pad.envs.net/contacts/)
- [nullpointer](https://envs.sh) - file hosting and url shortener
- [privatebin](https://pb.envs.net/) - pastebin service
- [termbin](https://tb.envs.net/) - command line pastebin
- [rss reader](https://rss.envs.net/) - news feed reader and aggregator
- [ip address info](https://ip.envs.net/)
## &#35; social/communications
- [bbj](https://bbj.envs.net/) - forum
- [email](https://mail.envs.net/) - webmail, smtp/imap, mutt, neomutt
- [mailing lists](https://lists.envs.net/) - list archives are available [on the web here](https://lists.envs.net/hyperkitty/).
<br /><br />
- [irc](https://envs.net/chat/) - irc network for the tildeverse
- [thelounge](https://webirc.envs.net/) - irc webclient - runs in private mode: it stays connected for you. run `webirc` to create a login.
- [znc](https://znc.envs.net/) - irc bouncer - log in with username and your email password
<br /><br />
- [gopher proxy](https://gopher.envs.net/) - defaults to our local gopher: `gopher://envs.net`
- [getwtxt](https://twtxt.envs.net/) - twtxt registry - microblogging - more on [twtxt](https://envs.net/help/blog/#with-twtxt) help page
## &#35; DNS-Server
envs.net has her own dns-master server and use the secondary servers from tildeverse.
[repo on gitea](https://git.envs.net/envs/DNS/)
| Name | Address | Location | Type |
| --- | --- | --- | --- |
| envs.net | 89.163.145.170 | Düsseldorf | master |
| | | | |
| ns1.tildeverse.net | 51.79.32.63 | Montréal | slave |
| ns1.tildeverse.net | 2607:5300:60:823f::63 | Montréal | slave |
| ns2.tildeverse.net | 167.114.154.31 | Montréal | slave |
### master-zones:
- envs.net
- envs.sh
- envs.tilde
### slave server for:
- tildeverse.org
- tilde.team

27
docs/mail.md Normal file
View File

@ -0,0 +1,27 @@
# &#35; user mail
we used [modoboa](https://modoboa.org/) - made multidomain email hosting simple
| | |
| ------------------------- |:---:|
| webmail: | [https://mail.envs.net](https://mail.envs.net/) |
| username: | username@envs.net |
| | |
| smtp server-address: | mail.envs.net |
| smtp server-address: | 587 |
| smtp connection-security: | STARTTLS |
| | |
| imap server-address: | mail.envs.net |
| imap server-port: | 993 |
| imap connection-security: | SSL/TLS |
| | |
| pop server-address: | mail.envs.net |
| pop server-port: | 995 |
| pop connection-security: | SSL/TLS |
you can find more mail settings directly in you're [webmail](https://mail.envs.net/user/#profile/).<br />
(*an secondary e-mail address, can be used for recovery needs*)
we also have managesieve support. managesieve is available on the default port (4190)
if you want to use an external managesieve client (like the [thunderbird add-on](https://github.com/thsmi/sieve)).<br />
you can also set up your filter in the [webmailer](https://mail.envs.net/sfilters/).

62
docs/website.md Normal file
View File

@ -0,0 +1,62 @@
# &#35; user website
you're user page is available under
*https://envs.net/~username/*, *https://envs.net/u/username/*,<br />
*https://username.envs.net/* and *https://username.envs.sh/*.
the index file location for our page is `~/public_html/` and<br />
a template for the page can you found in `~/public_html/your_index_template.php`.
static files are served normally, along with the following dynamic options:
- php - name the file with a `php` extension or use index.php
- sh / cgi - name the file with a `sh` or `cgi` extension
- perl - name the file with a `pl` extension
- python - name the file with a `py` extension
- lua - name the file with a `lua` extension
- cgi-bin - name it whatever you want and place it in `~/public_html/cgi-bin/`
if you're having trouble with any of these cgi scripts, make sure that the script has<br />
a correct shebang, sending the content-type header as the first thing and<br />
don't forget to make the scripts executable.
also you can use 'ssi' (server-side-includes). make sure you do not use a leading `/`.<br />
example: `<!--#include virtual="cgi-bin/fortune.sh" -->`
### ssgs
- [mkdocs](https://www.mkdocs.org/) - markdown project documentation tool.
additional themes are available from the [mkdocs-bootstrap](
http://mkdocs.github.io/mkdocs-bootstrap/) and [mkdocs-bootswatch](
http://mkdocs.github.io/mkdocs-bootswatch/) projects. just set your theme name
to one those listed and rebuild. generally recommended to not build the mkdocs
source directly in your webroot. set the destination to somewhere in `~/public_html`,
symlink, or move/copy the generated files manually. for example, if you wanted to
make a mkdocs site called mywiki available on the web, you could do:
`ln -s ~/mywiki ~/public_html/wiki`
- [hugo](https://gohugo.io/) - static site generator built in go
- [jekyll](https://jekyllrb.com/) - static site generator used by github for
[github pages](https://pages.github.com) built in ruby
- [pelican](https://getpelican.com/) - pelican is a static site generator, written in python
- [zola](https://www.getzola.org/) - single-binary static site generator written in rust
## forward / rewrite url to a other site
If you would like to redirect your page then you can do so with a simple workaround.
example `index.html`:
```html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://www.w3docs.com/" />
</head>
</html>
```
example `index.php`:
```php
<?php
header('Location: https://www.w3docs.com/', true, 301);
exit();
?>
```

16
mkdocs.yml Normal file
View File

@ -0,0 +1,16 @@
site_name: envs.net
site_description: envs.net | help
repo_name: <i class="fa fa-github" aria-hidden="true"></i> edit on gitea
repo_url: https://git.envs.net/envs/help
theme: cyborg
nav:
- help: help.md
- mail: mail.md
- website: website.md
- blog: blog.md
- database: database.md
- gopher: gopher.md
- gemini: gemini.md
- finger: finger.md