aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/tools.md
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc/tools.md')
-rw-r--r--support/doc/tools.md14
1 files changed, 13 insertions, 1 deletions
diff --git a/support/doc/tools.md b/support/doc/tools.md
index 04cf2b569..6a7d16a3c 100644
--- a/support/doc/tools.md
+++ b/support/doc/tools.md
@@ -39,7 +39,7 @@ You need to follow all the following steps even if you are on a PeerTube server
39### Dependencies 39### Dependencies
40 40
41Install the [PeerTube dependencies](dependencies.md) except PostgreSQL and Redis. 41Install the [PeerTube dependencies](dependencies.md) except PostgreSQL and Redis.
42PeerTube only supports NodeJS 10.x. 42PeerTube supports NodeJS 12.
43 43
44### Installation 44### Installation
45 45
@@ -239,6 +239,7 @@ These scripts should be run on the server, in `peertube-latest` directory.
239To parse PeerTube last log file: 239To parse PeerTube last log file:
240 240
241``` 241```
242$ cd /var/www/peertube/peertube-latest
242$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level info 243$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level info
243``` 244```
244 245
@@ -249,11 +250,13 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production
249You can use this script to force transcoding of an existing video. PeerTube needs to be running. 250You can use this script to force transcoding of an existing video. PeerTube needs to be running.
250 251
251``` 252```
253$ cd /var/www/peertube/peertube-latest
252$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] 254$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID]
253``` 255```
254 256
255Or to transcode to a specific resolution: 257Or to transcode to a specific resolution:
256``` 258```
259$ cd /var/www/peertube/peertube-latest
257$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] -r [resolution] 260$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] -r [resolution]
258``` 261```
259The resolution should be an integer (`1080`, `720`, `480`, etc.) 262The resolution should be an integer (`1080`, `720`, `480`, etc.)
@@ -261,6 +264,7 @@ The resolution should be an integer (`1080`, `720`, `480`, etc.)
261To generate an HLS playlist for a video: 264To generate an HLS playlist for a video:
262 265
263``` 266```
267$ cd /var/www/peertube/peertube-latest
264$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- --generate-hls -v [videoUUID] 268$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- --generate-hls -v [videoUUID]
265``` 269```
266 270
@@ -269,6 +273,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production
269You can use this script to import a video file to replace an already uploaded file or to add a new resolution to a video. PeerTube needs to be running. 273You can use this script to import a video file to replace an already uploaded file or to add a new resolution to a video. PeerTube needs to be running.
270 274
271``` 275```
276$ cd /var/www/peertube/peertube-latest
272$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] 277$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile]
273``` 278```
274 279
@@ -278,6 +283,7 @@ Some transcoded videos or shutdown at a bad time can leave some unused files on
278Stop PeerTube and delete these files (a confirmation will be demanded first): 283Stop PeerTube and delete these files (a confirmation will be demanded first):
279 284
280``` 285```
286$ cd /var/www/peertube/peertube-latest
281$ sudo systemctl stop peertube && sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage 287$ sudo systemctl stop peertube && sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage
282``` 288```
283 289
@@ -289,6 +295,7 @@ very large files that are too large for streaming. This script re-transcodes
289these videos so that they can be watched properly, even on slow connections. 295these videos so that they can be watched properly, even on slow connections.
290 296
291``` 297```
298$ cd /var/www/peertube/peertube-latest
292$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run optimize-old-videos 299$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run optimize-old-videos
293``` 300```
294 301
@@ -300,6 +307,7 @@ invalid torrent files and invalid URLs in your database. To fix this, you have
300to run: 307to run:
301 308
302``` 309```
310$ cd /var/www/peertube/peertube-latest
303$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run update-host 311$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run update-host
304``` 312```
305 313
@@ -308,6 +316,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production
308To reset a user password from CLI, run: 316To reset a user password from CLI, run:
309 317
310``` 318```
319$ cd /var/www/peertube/peertube-latest
311$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u target_username 320$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u target_username
312``` 321```
313 322
@@ -320,18 +329,21 @@ If PeerTube is running, you need to restart it for the changes to take effect (w
320To install/update a plugin or a theme from the disk: 329To install/update a plugin or a theme from the disk:
321 330
322``` 331```
332$ cd /var/www/peertube/peertube-latest
323$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --plugin-path /local/plugin/path 333$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --plugin-path /local/plugin/path
324``` 334```
325 335
326From NPM: 336From NPM:
327 337
328``` 338```
339$ cd /var/www/peertube/peertube-latest
329$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --npm-name peertube-plugin-myplugin 340$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --npm-name peertube-plugin-myplugin
330``` 341```
331 342
332To uninstall a plugin or a theme: 343To uninstall a plugin or a theme:
333 344
334``` 345```
346$ cd /var/www/peertube/peertube-latest
335$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin 347$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin
336``` 348```
337 349