X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=support%2Fdoc%2Fproduction.md;h=81748ae166e86c2756fdb18c4692da4a228fdd13;hb=eb34ec30e0b57286fc6f85160490d2e973a3b0b1;hp=6b694c924d2263b2fda77dc10059e6efd634953c;hpb=d8658f0f8131f1768697669b673290a2e25c2997;p=github%2FChocobozzz%2FPeerTube.git diff --git a/support/doc/production.md b/support/doc/production.md index 6b694c924..81748ae16 100644 --- a/support/doc/production.md +++ b/support/doc/production.md @@ -6,7 +6,7 @@ ## Installation Please don't install PeerTube for production on a device behind a low bandwidth connection (example: your ADSL link). -If you want information about the appropriate hardware to run PeerTube, please see the [FAQ](https://github.com/Chocobozzz/PeerTube/blob/develop/FAQ.md#should-i-have-a-big-server-to-run-peertube). +If you want information about the appropriate hardware to run PeerTube, please see the [FAQ](https://joinpeertube.org/en_US/faq#should-i-have-a-big-server-to-run-peertube). ### Dependencies @@ -38,7 +38,14 @@ or use `adduser` to create it interactively. Create the production database and a peertube user inside PostgreSQL: ``` +$ cd /var/www/peertube $ sudo -u postgres createuser -P peertube +``` + +Here you should enter a password for PostgreSQL `peertube` user, that should be copied in `production.yaml` file. +Don't just hit enter else it will be empty. + +``` $ sudo -u postgres createdb -O peertube -E UTF8 -T template0 peertube_prod ``` @@ -60,13 +67,14 @@ Open the peertube directory, create a few required directories ``` $ cd /var/www/peertube $ sudo -u peertube mkdir config storage versions +$ sudo -u peertube chmod 750 config/ ``` Download the latest version of the Peertube client, unzip it and remove the zip ``` $ cd /var/www/peertube/versions $ sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" -$ sudo -u peertube unzip peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip +$ sudo -u peertube unzip -q peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip ``` Install Peertube: @@ -134,7 +142,7 @@ To generate the certificate for your domain as required to make https work you c ``` $ sudo systemctl stop nginx -$ sudo certbot certonly --standalone --post-hook "systemctl start nginx" +$ sudo certbot certonly --standalone --post-hook "systemctl restart nginx" $ sudo systemctl reload nginx ``` @@ -149,6 +157,7 @@ Since our nginx template supports webroot renewal, we suggest you to update the ``` $ # Replace authenticator = standalone by authenticator = webroot +$ # Add webroot_path = /var/www/certbot $ sudo vim /etc/letsencrypt/renewal/your-domain.com.conf ``` @@ -161,8 +170,6 @@ $ sudo pkg install dehydrated ### TCP/IP Tuning -A lot of your instance's raw performance is dependent on a properly tuned machine and more specifically, reverse-proxy. We provide support for Nginx and spent a lot of time putting sane defaults in it, but we strongly advise you to follow up with instructions in https://github.com/denji/nginx-tuning as needed. - **On Linux** ```