aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-11 10:09:24 +0100
committerChocobozzz <me@florianbigard.com>2021-01-11 10:09:24 +0100
commitd8658f0f8131f1768697669b673290a2e25c2997 (patch)
tree8e02c59483271822eb85d458c68b784739a361df /support
parentc2b823826db167594f8157b0b324b6fb1559caeb (diff)
downloadPeerTube-d8658f0f8131f1768697669b673290a2e25c2997.tar.gz
PeerTube-d8658f0f8131f1768697669b673290a2e25c2997.tar.zst
PeerTube-d8658f0f8131f1768697669b673290a2e25c2997.zip
Try to improve install doc
Diffstat (limited to 'support')
-rw-r--r--support/doc/dependencies.md13
-rw-r--r--support/doc/production.md30
2 files changed, 26 insertions, 17 deletions
diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md
index 5f0c51170..61f8b7f36 100644
--- a/support/doc/dependencies.md
+++ b/support/doc/dependencies.md
@@ -28,18 +28,16 @@ Follow the below guides, and check their versions match [required external depen
28 28
292. It would be wise to disable root access and to continue this tutorial with a user with sudoers group access 292. It would be wise to disable root access and to continue this tutorial with a user with sudoers group access
30 30
313. Install certbot (choose instructions for nginx and your distribution) : 313. Install NodeJS 10.x:
32[https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)
334. Install NodeJS 10.x:
34[https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions) 32[https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)
355. Install yarn, and be sure to have [a recent version](https://github.com/yarnpkg/yarn/releases/latest): 334. Install yarn, and be sure to have [a recent version](https://github.com/yarnpkg/yarn/releases/latest):
36[https://yarnpkg.com/en/docs/install#linux-tab](https://yarnpkg.com/en/docs/install#linux-tab) 34[https://yarnpkg.com/en/docs/install#linux-tab](https://yarnpkg.com/en/docs/install#linux-tab)
37 35
386. Run: 365. Run:
39 37
40``` 38```
41sudo apt update 39sudo apt update
42sudo apt install nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git python-dev 40sudo apt install certbot nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git python-dev
43ffmpeg -version # Should be >= 4.1 41ffmpeg -version # Should be >= 4.1
44g++ -v # Should be >= 5.x 42g++ -v # Should be >= 5.x
45``` 43```
@@ -169,7 +167,7 @@ usermod my-peertube-user -a -G wheel # Add my-peertube-user to sudoers
169su my-peertube-user 167su my-peertube-user
170``` 168```
171 169
1723. (Optional) Install certbot (choose instructions for nginx and your distribution): 1703. (Optional) Install certbot (choose instructions for your distribution):
173[https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions) 171[https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)
174 172
1754. Install NodeJS 10.x: 1734. Install NodeJS 10.x:
@@ -309,7 +307,6 @@ www-servers/nginx
309 307
310# Optional, client for Let’s Encrypt: 308# Optional, client for Let’s Encrypt:
311# app-crypt/certbot 309# app-crypt/certbot
312# app-crypt/certbot-nginx
313``` 310```
314 311
3152. If you are on a "stable" Gentoo you need to accept the testing keyword ~amd64 yarn: 3122. If you are on a "stable" Gentoo you need to accept the testing keyword ~amd64 yarn:
diff --git a/support/doc/production.md b/support/doc/production.md
index 59a1f7d5a..6b694c924 100644
--- a/support/doc/production.md
+++ b/support/doc/production.md
@@ -58,18 +58,21 @@ $ VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/la
58 58
59Open the peertube directory, create a few required directories 59Open the peertube directory, create a few required directories
60``` 60```
61$ cd /var/www/peertube && sudo -u peertube mkdir config storage versions && cd versions 61$ cd /var/www/peertube
62$ sudo -u peertube mkdir config storage versions
62``` 63```
63 64
64Download the latest version of the Peertube client, unzip it and remove the zip 65Download the latest version of the Peertube client, unzip it and remove the zip
65``` 66```
67$ cd /var/www/peertube/versions
66$ sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" 68$ sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip"
67$ sudo -u peertube unzip peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip 69$ sudo -u peertube unzip peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip
68``` 70```
69 71
70Install Peertube: 72Install Peertube:
71``` 73```
72$ cd ../ && sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest 74$ cd /var/www/peertube
75$ sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest
73$ cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile 76$ cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile
74``` 77```
75 78
@@ -79,17 +82,20 @@ Copy the default configuration file that contains the default configuration prov
79You **must not** update this file. 82You **must not** update this file.
80 83
81``` 84```
82$ cd /var/www/peertube && sudo -u peertube cp peertube-latest/config/default.yaml.example config/default.yaml 85$ cd /var/www/peertube
86$ sudo -u peertube cp peertube-latest/config/default.yaml config/default.yaml
83``` 87```
84 88
85Now copy the production example configuration: 89Now copy the production example configuration:
86 90
87``` 91```
88$ cd /var/www/peertube && sudo -u peertube cp peertube-latest/config/production.yaml.example config/production.yaml 92$ cd /var/www/peertube
93$ sudo -u peertube cp peertube-latest/config/production.yaml.example config/production.yaml
89``` 94```
90 95
91Then edit the `config/production.yaml` file according to your webserver 96Then edit the `config/production.yaml` file according to your webserver
92configuration. Keys defined in `config/production.yaml` will override keys defined in `config/default.yaml`. 97and database configuration (`webserver`, `database`, `redis`, `smtp` and `admin.email` sections in particular).
98Keys defined in `config/production.yaml` will override keys defined in `config/default.yaml`.
93 99
94**PeerTube does not support webserver host change**. Even though [PeerTube CLI can help you to switch hostname](https://docs.joinpeertube.org/maintain-tools?id=update-hostjs) there's no official support for that since it is a risky operation that might result in unforeseen errors. 100**PeerTube does not support webserver host change**. Even though [PeerTube CLI can help you to switch hostname](https://docs.joinpeertube.org/maintain-tools?id=update-hostjs) there's no official support for that since it is a risky operation that might result in unforeseen errors.
95 101
@@ -132,14 +138,20 @@ $ sudo certbot certonly --standalone --post-hook "systemctl start nginx"
132$ sudo systemctl reload nginx 138$ sudo systemctl reload nginx
133``` 139```
134 140
135Remember your certificate will expire in 90 days, and thus needs renewal.
136
137Now you have the certificates you can reload nginx: 141Now you have the certificates you can reload nginx:
138 142
139``` 143```
140$ sudo systemctl reload nginx 144$ sudo systemctl reload nginx
141``` 145```
142 146
147Certbot should have installed a cron to automatically renew your certificate.
148Since our nginx template supports webroot renewal, we suggest you to update the renewal config file to use the `webroot` authenticator:
149
150```
151$ # Replace authenticator = standalone by authenticator = webroot
152$ sudo vim /etc/letsencrypt/renewal/your-domain.com.conf
153```
154
143**FreeBSD** 155**FreeBSD**
144On FreeBSD you can use [Dehydrated](https://dehydrated.io/) `security/dehydrated` for [Let's Encrypt](https://letsencrypt.org/) 156On FreeBSD you can use [Dehydrated](https://dehydrated.io/) `security/dehydrated` for [Let's Encrypt](https://letsencrypt.org/)
145 157
@@ -233,8 +245,8 @@ $ tail -f /var/log/peertube/peertube.log
233 245
234### Administrator 246### Administrator
235 247
236The administrator password is automatically generated and can be found in the 248The administrator password is automatically generated and can be found in the PeerTube
237logs. You can set another password with: 249logs (path defined in `production.yaml`). You can also set another password with:
238 250
239``` 251```
240$ cd /var/www/peertube/peertube-latest && NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root 252$ cd /var/www/peertube/peertube-latest && NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root