commit ae9707546c82d64aaa9ef599ed167e3acfea04b0 Author: creme Date: Sat Oct 12 20:18:28 2019 +0200 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..34e380e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*~ +/site +*.sublime-project +*.sublime-workspace diff --git a/README.md b/README.md new file mode 100644 index 0000000..8a6867f --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# envs.net - help + +partially forked from: [tilde.team - wiki](https://tildegit.org/team/site/src/branch/master/wiki/) diff --git a/docs/blog.md b/docs/blog.md new file mode 100644 index 0000000..3102d9a --- /dev/null +++ b/docs/blog.md @@ -0,0 +1,43 @@ +# # user blog +you're blog is available under *https://envs.net/~username/blog* and *https://username.envs.net/blog*.
+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!
+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
in `~/.config/twtxt/config`. *for more config option see: [twtxt - configuration](https://twtxt.readthedocs.io/en/latest/user/configuration.html)*.
*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
`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
+the `config` file in `~/public_html/blog/` see for an example [here](https://github.com/envs-net/bashblog/blob/master/.config_example).
diff --git a/docs/database.md b/docs/database.md new file mode 100644 index 0000000..0362768 --- /dev/null +++ b/docs/database.md @@ -0,0 +1,43 @@ +# # 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.
+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:
+  `mysql -u username -p` + +### database backup & restore +simple backup:
+  `mysqldump "$USER" -p > ~/backup/dump_"$USER".sql` + +and restore:
+  `mysql -p -u "$USER" < ~/backup/dump_"$USER".sql` + +you can also use our `envs_mysql.sh` - backup and restore script.
+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 - backup database + restore - restore your latest user database + restore - restore database +``` + +with cron you can also do your backup regularly at a certain time.
+see [help -> cron](https://envs.net/help/help/#croncrontab) for a example. diff --git a/docs/finger.md b/docs/finger.md new file mode 100644 index 0000000..0732b64 --- /dev/null +++ b/docs/finger.md @@ -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. + +# # user finger + +here on envs.net, we run efingerd. see `man efingerd` for more info.
+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:
+  `Europe/Berlin` + +hope to see you on finger soon! diff --git a/docs/gemini.md b/docs/gemini.md new file mode 100644 index 0000000..4ba1759 --- /dev/null +++ b/docs/gemini.md @@ -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. + +# # user gemini + +main gemini page: `gemini://envs.net`
+ +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.
+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: +  `gemini://envs.net/~username`
diff --git a/docs/gopher.md b/docs/gopher.md new file mode 100644 index 0000000..e1bf276 --- /dev/null +++ b/docs/gopher.md @@ -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. + +# # 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.
+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: +  `gopher://envs.net/1/~username`
+
+otherwise, you can use our [http proxy](https://gopher.envs.net/envs.net/) to browse the gophernet. diff --git a/docs/help.md b/docs/help.md new file mode 100644 index 0000000..8681bb1 --- /dev/null +++ b/docs/help.md @@ -0,0 +1,217 @@ +# help + +> *write in irc (#envs) or*
+> *contact [sudoers@envs.net](mailto:sudoers@envs.net) for any other help requests.* + +## # show public ip +`curl ip.envs.net` + +## # termbin - aliases +`echo 'alias tb="nc tb.envs.net 9999"' >> ~/.bash_aliases` + +you can POST a text:
+  `echo less typing now! | tb` + +or Content of a file:
+  `cat ~/some_file.txt | tb`
+ +## # 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:
+  `0file "yourfile.png"` + +you can also POST remote URLs:
+  `0url "https://example.com/image.jpg"` + +or you can shorten URLs:
+  `0short "https://example.com/some/long/url"`
+
+*if you want a nice wrapper, try [~tomasino's pb](https://git.envs.net/envs/pb)* + +## # 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.
+use ssh.envs.net to reach the secondary ip and use 80 and 443 for ssh.
+so, for example, you can do:
+  `ssh user@envs.net`
+  `ssh -p2223 user@envs.net` + +or for the secondary ip:
+  `ssh -p443 user@ssh.envs.net`
+
+if you have a slightly shaky connection then you can also use `mosh`. + +### create a ssh-key +make sure you have a `~/.ssh directory`
+  `mkdir -m 700 ~/.ssh` + +create your key
+  `ssh-keygen -t ed25519 -a 100` + +your public and private key will be located at
+  `cat ~/.ssh/id_ed25519.pub` + +you can also use rsa:
+  `ssh-keygen -t rsa -b 4096`
+  `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.
+there are tons of other options, including this `LocalForward` line to automatically set up the tunnel as show below.
+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),
+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:
+  `ssh -L 6667:localhost:6667 envs.net` + +after being logged in, open your local irc client, and use `127.0.0.1:6667`
+for your server setting. voila! you're now on envs.net znc server.
+ +what that ssh command did was open a local port tunnel (-L), using local port 6667 (6667:)
+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 > ssh > tunnels. + +you can do this for any arbitrary port. + +### import & authorize a public ssh-key +from URL (on remote machine)
+  `echo $(curl -sL https://example.com/id_rsa.pub) | tee -a ~/.ssh/authorized_keys` + +over ssh (on local machine)
+  `ssh-copy-id -i ~/.ssh/id_rsa.pub -p2223 user@envs.net;` + +### ssh remote execution +`ssh envs.net ping google.de` + +or
+  `ssh envs.net bash -c "'uname -a'"` + +exec a local script
+  `ssh envs.net 'bash -s' < local_script.sh` + +## # scp usage +copy ssh pub key to remote:
+  `scp -P 2223 ~/.ssh/authorized_keys user@envs.net:~/.ssh/authorized_keys` + +copy website index.html from remote:
+  `scp -P 2223 user@envs.net:~/public_www/index.html ~/public_www/` + +## # rsync usage +sync website to remote:
+  `rsync -avz -e "ssh -p 2223" ~/public_www user@envs.net:~`
+sync website from remote:
+  `rsync -avz -e "ssh -p 2223" user@envs.net:~/public_www ~/`
+ +## # sftp usage +connect: `sftp -oPort=2223 user@envs.net` + +### commands: +exit: `exit`
+print help: `help` + +### transferring +files to remote:
+  `put localfile remotefile` + +dir to remote:
+  `put -r localdir remotedir` + +files from remote:
+  `get remotefile localfile` + +dir from remote:
+  `get -r remotedir localdir` + +### example: +add index.html to public_www Dir:
+  `put public_www/index.html public_www` + +add `~/.ssh/authorized_keys:`
+  `put .ssh/authorized_keys .ssh/authorized_keys` + +### single line usage (on local machine) +  to remote: `sftp -P 2223 user@envs.net:remotedir <<< $'put localfile_path'`
+  from remote: `sftp -P 2223 user@envs.net:remotefile localfile` + +## # your shell +avaliable shells: `ash`, `bash`, `csh`, `dash`, `elvish`, `fish`, `ksh`, `mksh`, `sash`, `sh`, `tcsh`, `xonsh`, `yash`, `zsh`
+*list all available shells: `more /etc/shells`* + +to change your shell use: `chsh -s $(which )`
+or `chsh -s ` + +example: `chsh -s $(which bash)` or `chsh -s /bin/bash` + +## # 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,
+run `tzselect` to find the correct timezone name that you’ll need to export as the TZ environment variable. + +for example, if you’re in eastern time, add something like this
+`export TZ="America/Detroit"`
+to your .bashrc . + +to get your timezone you can use `date`. + +## # cron/crontab +with cron you can run specific tasks at a specific time. + +display current crontabs:
+  `crontab -l` + +add/edit crontabs:
+  `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) + +## # daemonize processes +so you've got a process that you want to keep running. you might have it in a
+tmux or screen session. let's use systemd user units to manage it! + +- ensure that your user unit loadpath is set up:
`mkdir -p ~/.config/systemd/user/` +- create a basic service. save something like this
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:
`systemctl --user enable --now my-new-service.service` +- enable-linger for your user account:
`loginctl enable-linger`
this allows your user units to run even when you're not logged in. + +done!
+you can now use `systemctl --user` to manage your daemonized process. diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..4d8c46e --- /dev/null +++ b/docs/index.md @@ -0,0 +1,64 @@ +
+> *write in irc (#envs) or*
+> *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 + +## # code related stuff +- [gitea](https://git.envs.net/) - members can be use your email credantials for login. (*user@envs.net* | *your email pw*) + +## # 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/) + +## # 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/). +

+- [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 +

+- [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 + +## # 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 diff --git a/docs/mail.md b/docs/mail.md new file mode 100644 index 0000000..2de1bda --- /dev/null +++ b/docs/mail.md @@ -0,0 +1,27 @@ +# # 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/).
+(*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)).
+you can also set up your filter in the [webmailer](https://mail.envs.net/sfilters/). diff --git a/docs/website.md b/docs/website.md new file mode 100644 index 0000000..3c7c514 --- /dev/null +++ b/docs/website.md @@ -0,0 +1,62 @@ +# # user website +you're user page is available under + +*https://envs.net/~username/*, *https://envs.net/u/username/*,
+*https://username.envs.net/* and *https://username.envs.sh/*. + +the index file location for our page is `~/public_html/` and
+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
+a correct shebang, sending the content-type header as the first thing and
+don't forget to make the scripts executable. + +also you can use 'ssi' (server-side-includes). make sure you do not use a leading `/`.
+example: `` + +### 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 + + + + + + +``` +example `index.php`: +```php + +``` diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..93b8623 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,16 @@ +site_name: envs.net +site_description: envs.net | help +repo_name: 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