1
0
Fork 0

Try to improve tools doc

This commit is contained in:
Chocobozzz 2020-12-08 12:00:58 +01:00
parent 6c53d8bf1d
commit c977fd3ec9
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 13 additions and 1 deletions

View File

@ -39,7 +39,7 @@ You need to follow all the following steps even if you are on a PeerTube server
### Dependencies ### Dependencies
Install the [PeerTube dependencies](dependencies.md) except PostgreSQL and Redis. Install the [PeerTube dependencies](dependencies.md) except PostgreSQL and Redis.
PeerTube only supports NodeJS 10.x. PeerTube supports NodeJS 12.
### Installation ### Installation
@ -239,6 +239,7 @@ These scripts should be run on the server, in `peertube-latest` directory.
To parse PeerTube last log file: To parse PeerTube last log file:
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level info $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level info
``` ```
@ -249,11 +250,13 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production
You can use this script to force transcoding of an existing video. PeerTube needs to be running. You can use this script to force transcoding of an existing video. PeerTube needs to be running.
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID]
``` ```
Or to transcode to a specific resolution: Or to transcode to a specific resolution:
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] -r [resolution] $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] -r [resolution]
``` ```
The resolution should be an integer (`1080`, `720`, `480`, etc.) The resolution should be an integer (`1080`, `720`, `480`, etc.)
@ -261,6 +264,7 @@ The resolution should be an integer (`1080`, `720`, `480`, etc.)
To generate an HLS playlist for a video: To generate an HLS playlist for a video:
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- --generate-hls -v [videoUUID] $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- --generate-hls -v [videoUUID]
``` ```
@ -269,6 +273,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production
You 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. You 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.
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile]
``` ```
@ -278,6 +283,7 @@ Some transcoded videos or shutdown at a bad time can leave some unused files on
Stop PeerTube and delete these files (a confirmation will be demanded first): Stop PeerTube and delete these files (a confirmation will be demanded first):
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo systemctl stop peertube && sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage $ sudo systemctl stop peertube && sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage
``` ```
@ -289,6 +295,7 @@ very large files that are too large for streaming. This script re-transcodes
these videos so that they can be watched properly, even on slow connections. these videos so that they can be watched properly, even on slow connections.
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run optimize-old-videos $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run optimize-old-videos
``` ```
@ -300,6 +307,7 @@ invalid torrent files and invalid URLs in your database. To fix this, you have
to run: to run:
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run update-host $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run update-host
``` ```
@ -308,6 +316,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production
To reset a user password from CLI, run: To reset a user password from CLI, run:
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u target_username $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u target_username
``` ```
@ -320,18 +329,21 @@ If PeerTube is running, you need to restart it for the changes to take effect (w
To install/update a plugin or a theme from the disk: To install/update a plugin or a theme from the disk:
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --plugin-path /local/plugin/path $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --plugin-path /local/plugin/path
``` ```
From NPM: From NPM:
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --npm-name peertube-plugin-myplugin $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --npm-name peertube-plugin-myplugin
``` ```
To uninstall a plugin or a theme: To uninstall a plugin or a theme:
``` ```
$ cd /var/www/peertube/peertube-latest
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin
``` ```