2020-08-17 23:41:04 +00:00
2019-12-19 18:08:59 +00:00
# How to use
2017-12-21 15:29:53 +00:00
## Disclaimers
2019-12-19 18:08:59 +00:00
- This script does work with Debian 10 only.
2020-08-24 16:16:07 +00:00
- This script has to be used on a fresh debian install only (it does not take account for a possibly already installed and configured webserver or sql implementation). You may use it to install several hub/instances on the same server, though.
2016-01-10 17:25:36 +00:00
## Preconditions
Hardware
+ Internet connection and router at home
2017-12-21 15:29:53 +00:00
+ Mini-pc connected to your router (a Raspberry 3 will do for very small Hubs)
2016-01-10 17:25:36 +00:00
+ USB drive for backups
Software
2020-08-24 17:46:01 +00:00
+ Fresh installation of Debian 10 (Buster)
2019-12-19 18:08:59 +00:00
+ Router with open ports 80 and 443 for your web server
2016-01-10 17:25:36 +00:00
2020-08-24 16:16:07 +00:00
You can of course run the script on a VPS or any distant server as long as the above sotfware requirements are satisfied.
2019-12-19 18:08:59 +00:00
## How to run the script
2016-01-10 17:25:36 +00:00
+ Register your own domain (for example at selfHOST) or a free subdomain (for example at freeDNS)
2018-01-03 16:26:31 +00:00
+ Log on to your fresh Debian
2016-03-06 17:40:49 +00:00
- apt-get install git
2016-08-15 18:12:00 +00:00
- mkdir -p /var/www
- cd /var/www
2020-08-24 16:16:07 +00:00
- git clone https://codeberg.org/zot/zap.git html (you can replace "html" with any name you like, which you'll have to do if you plan to have more than one hub/instance running on your server)
2018-05-05 18:50:06 +00:00
- cd html/.homeinstall
2020-08-17 23:41:04 +00:00
- cp zotserver-config.txt.template zotserver-config.txt
- nano zotserver-config.txt
2017-12-21 15:29:53 +00:00
- Read the comments carefully
- Enter your values: db pass, domain, values for dyn DNS
2019-12-19 18:08:59 +00:00
- Prepare your external disk for backups
2020-08-24 16:16:07 +00:00
- ./zotserver-setup.sh as root
- ... wait, wait, wait until the script is finished
+ Open your domain with a browser and step throught the initial configuration of your hub/instance.
2016-01-10 17:25:36 +00:00
2018-05-05 18:50:06 +00:00
## Optional - Set path to imagemagick
2020-08-24 16:16:07 +00:00
In Admin settings of your hub/instance or via terminal
2018-05-05 18:50:06 +00:00
cd /var/www/html
util/config system.imagick_convert_path /usr/bin/convert
2019-12-19 18:08:59 +00:00
## Optional - Switch verification of email on/off
2016-01-10 17:25:36 +00:00
2020-08-24 16:16:07 +00:00
Do this just before you register the first user.
2016-01-10 17:25:36 +00:00
2020-08-24 16:16:07 +00:00
In Admin settings of your hub/instance or via terminal
2016-01-10 17:25:36 +00:00
2019-12-19 18:08:59 +00:00
cd /var/www/html
2016-01-10 17:25:36 +00:00
2019-12-19 18:08:59 +00:00
Check the current setting
2017-12-21 15:29:53 +00:00
2019-12-19 18:08:59 +00:00
util/config system verify_email
2016-01-10 17:25:36 +00:00
2019-12-19 18:08:59 +00:00
Switch the verification on/off (1/0)
2018-01-03 16:21:41 +00:00
2019-12-19 18:08:59 +00:00
util/config system verify_email 0
2018-01-03 16:21:41 +00:00
2019-12-19 18:08:59 +00:00
## What the script will do for you...
2016-01-10 17:25:36 +00:00
2020-08-28 05:47:36 +00:00
+ install everything required by your Zot hub/instance, basically a web server (Apache or Nginx), PHP, a database (MySQL), certbot,...
2019-12-19 18:08:59 +00:00
+ create a database
+ run certbot to have everything for a secure connection (httpS)
+ create a script for daily maintenance
- backup to external disk (certificates, database, /var/www/)
- renew certfificate (letsencrypt)
2020-08-24 16:16:07 +00:00
- update of your hub/instance (git)
2019-12-19 18:08:59 +00:00
- update of Debian
- restart
+ create cron jobs for
- DynDNS (selfHOST.de or freedns.afraid.org) every 5 minutes
2020-08-24 16:16:07 +00:00
- Run.php for your hub/instance every 10 minutes
2019-12-19 18:08:59 +00:00
- daily maintenance script every day at 05:30
2016-01-10 17:25:36 +00:00
2019-12-19 18:08:59 +00:00
The script is known to work without adjustments with
2017-12-21 15:29:53 +00:00
2019-12-19 18:08:59 +00:00
+ Hardware
- Mini-PC with Debian 10 (stretch), or
- Rapberry 3 with Raspbian, Debian 10
- Rapberry 4 with Raspbian, Debian 10
+ DynDNS
- selfHOST.de
- freedns.afraid.org
2017-12-21 15:29:53 +00:00
2020-08-24 16:16:07 +00:00
The script can install [Hubzilla ](https://zotlabs.org/page/hubzilla/hubzilla-project ), [Zap ](https://zotlabs.com/zap/ ) and [Mistpark 2020, aka "Misty" ](https://zotlabs.com/misty/ ). Make sure to use the correct GIT repositories.
2017-12-21 15:29:53 +00:00
2016-01-10 17:25:36 +00:00
2019-12-19 18:08:59 +00:00
# Step-by-Step - some Details
2016-01-10 17:25:36 +00:00
2019-12-19 18:08:59 +00:00
## Preparations
2017-12-21 15:29:53 +00:00
2019-12-19 18:08:59 +00:00
## Configure your Router
2017-12-21 15:29:53 +00:00
2019-12-19 18:08:59 +00:00
Your webserver has to be visible in the internet.
2017-12-21 15:29:53 +00:00
2019-12-19 18:08:59 +00:00
Open the ports 80 and 443 on your router for your Debian. Make sure your web server is marked as "exposed host".
2016-01-10 17:25:36 +00:00
2019-12-19 18:08:59 +00:00
## Preparations Dynamic IP Address
2016-01-10 17:25:36 +00:00
2020-08-17 23:41:04 +00:00
Follow the instructions in .homeinstall/zotserver-config.txt.
2016-01-10 17:25:36 +00:00
2019-12-19 18:08:59 +00:00
In short...
2016-01-10 17:25:36 +00:00
2020-08-24 16:16:07 +00:00
Your Zap server must be reachable by a domain that you can type in your browser
2016-01-10 17:25:36 +00:00
cooldomain.org
You can use subdomains as well
my.cooldomain.org
2018-01-03 16:21:41 +00:00
There are two ways to get a domain...
2016-01-10 17:25:36 +00:00
2018-01-03 16:21:41 +00:00
### Method 1: Buy a Domain
2016-01-10 17:25:36 +00:00
2017-12-21 15:29:53 +00:00
...for example buy at selfHOST.de
2016-03-06 17:40:49 +00:00
2019-12-19 18:08:59 +00:00
The cost is 1,50 € per month (2019).
2016-01-10 17:25:36 +00:00
2018-05-05 19:08:15 +00:00
### Method 2: Register a free subdomain
2016-01-10 17:25:36 +00:00
2018-01-03 16:21:41 +00:00
...for example register at freedns.afraid.org
2016-01-10 17:25:36 +00:00
2019-12-19 18:08:59 +00:00
## Note on Rasperry
2016-01-10 17:25:36 +00:00
2019-12-19 18:08:59 +00:00
The script was tested with a Raspberry 3 and a Raspberry 4 both with Raspian, Debian 10.
2017-12-21 15:29:53 +00:00
It is recommended to run the Raspi without graphical frontend (X-Server). Use...
sudo raspi-config
2018-01-03 16:21:41 +00:00
to boot the Rapsi to the client console.
2017-12-21 15:29:53 +00:00
2018-01-03 16:21:41 +00:00
DO NOT FORGET TO CHANGE THE DEFAULT PASSWORD FOR USER PI!
2017-12-21 15:29:53 +00:00
2020-06-16 14:39:55 +00:00
## Reminder for Different Web Wervers
2018-05-05 18:50:06 +00:00
2020-08-28 05:47:36 +00:00
For those of you who feel adventurous enough to use a different web server (i.e. Lighttpd...), don't forget that this script will install Apache or Nginx and that you can only have one web server listening to ports 80 & 443. Also, don't forget to tweak your daily shell script in /var/www/ accordingly.
2017-12-21 15:29:53 +00:00