Prepare beta
[oweals/peertube.git] / support / doc / production.md
index fc2bd460ac0d0f9fe5f2efde83f80200a8777102..43c32f08950f6b14296ab89968bc71b7f14cd0dc 100644 (file)
@@ -5,7 +5,7 @@
 
 ## Installation
 
-**Please don't install PeerTube for production on a small device behind a low bandwidth connection because it could slow down the fediverse.**
+**Please don't install PeerTube for production on a small device behind a low bandwidth connection (example: a Raspberry PI behind your ADSL link) because it could slow down the fediverse.**
 
 ### Dependencies
 
@@ -95,7 +95,10 @@ To generate the certificate for your domain as required to make https work you c
 
 ```
 $ sudo systemctl stop nginx
+$ sudo vim /etc/nginx/sites-available/peertube # Comment ssl_certificate and ssl_certificate_key lines
 $ sudo certbot --authenticator standalone --installer nginx --post-hook "systemctl start nginx"
+$ sudo vim /etc/nginx/sites-available/peertube # Uncomment ssl_certificate and ssl_certificate_key lines
+$ sudo systemctl reload nginx
 ```
 
 Remember your certificate will expire in 90 days, and thus needs renewal.
@@ -106,9 +109,9 @@ Now you have the certificates you can reload nginx:
 $ sudo systemctl reload nginx
 ```
 
-### Systemd
+### systemd
 
-Copy the SystemD configuration template:
+If your OS uses systemd, copy the configuration template:
 
 ```
 $ sudo cp /var/www/peertube/peertube-latest/support/systemd/peertube.service /etc/systemd/system/
@@ -133,13 +136,29 @@ If you want to start PeerTube on boot:
 $ sudo systemctl enable peertube
 ```
 
-### Run
+Run:
 
 ```
 $ sudo systemctl start peertube
 $ sudo journalctl -feu peertube
 ```
 
+### FreeBSD
+
+If you're using FreeBSD, copy the startup script and update rc.conf:
+
+```
+$ sudo cp /var/www/peertube/peertube-latest/support/freebsd/peertube /usr/local/etc/rc.d/
+$ sudo chmod +x /usr/local/etc/rc.d/peertube
+$ sudo echo peertube_enable="YES" >> /etc/rc.conf
+```
+
+Run:
+
+```
+$ sudo service peertube start
+```
+
 ### Administrator
 
 The administrator password is automatically generated and can be found in the
@@ -149,13 +168,14 @@ logs. You can set another password with:
 $ cd /var/www/peertube/peertube-latest && NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root
 ```
 
+Now you can subscribe to the mailing list for PeerTube administrators: https://framalistes.org/sympa/subscribe/peertube-admin
+
 ## Upgrade
 
 #### Auto (minor versions only)
 
 ```
 $ cd /var/www/peertube/peertube-latest/scripts && sudo -u peertube ./upgrade.sh
-$ diff /var/www/peertube/versions/peertube-${VERSION}/config/production.yaml.example /var/www/peertube/config/production.yaml
 $ sudo systemctl restart peertube && sudo journalctl -fu peertube
 ```
 
@@ -202,7 +222,7 @@ Change the link to point to the latest version:
 
 ```
 $ cd /var/www/peertube && \
-    sudo rm ./peertube-latest && \
+    sudo unlink ./peertube-latest && \
     sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest
 ```
 
@@ -218,7 +238,7 @@ Change `peertube-latest` destination to the previous version and restore your SQ
 
 ```
 $ OLD_VERSION="v0.42.42" && SQL_BACKUP_PATH="backup/sql-peertube_prod-2018-01-19T10:18+01:00.bak" && \
-    cd /var/www/peertube && rm ./peertube-latest && \
+    cd /var/www/peertube && unlink ./peertube-latest && \
     sudo -u peertube ln -s "versions/peertube-$OLD_VERSION" peertube-latest && \
     pg_restore -U peertube -W -h localhost -c -d peertube_prod "$SQL_BACKUP_PATH"
     sudo systemctl restart peertube