aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--support/doc/tools.md41
1 files changed, 21 insertions, 20 deletions
diff --git a/support/doc/tools.md b/support/doc/tools.md
index e6c4c2010..452b3d039 100644
--- a/support/doc/tools.md
+++ b/support/doc/tools.md
@@ -44,7 +44,7 @@ Install the [PeerTube dependencies](dependencies.md) except PostgreSQL and Redis
44 44
45Clone the PeerTube repo to get the latest version (even if you are on your PeerTube server): 45Clone the PeerTube repo to get the latest version (even if you are on your PeerTube server):
46 46
47``` 47```bash
48$ git clone https://github.com/Chocobozzz/PeerTube.git 48$ git clone https://github.com/Chocobozzz/PeerTube.git
49$ CLONE="$(pwd)/PeerTube" 49$ CLONE="$(pwd)/PeerTube"
50$ cd ${CLONE} 50$ cd ${CLONE}
@@ -52,7 +52,7 @@ $ cd ${CLONE}
52 52
53Install dependencies and build CLI tools: 53Install dependencies and build CLI tools:
54 54
55``` 55```bash
56$ NOCLIENT=1 yarn install --pure-lockfile 56$ NOCLIENT=1 yarn install --pure-lockfile
57$ npm run setup:cli 57$ npm run setup:cli
58``` 58```
@@ -164,7 +164,7 @@ You can use this script to import videos directly from the CLI.
164 164
165Videos will be publicly available after transcoding (you can see them before that in your account on the web interface). 165Videos will be publicly available after transcoding (you can see them before that in your account on the web interface).
166 166
167``` 167```bash
168$ cd ${CLONE} 168$ cd ${CLONE}
169$ node dist/server/tools/peertube-upload.js --help 169$ node dist/server/tools/peertube-upload.js --help
170``` 170```
@@ -189,7 +189,7 @@ It provides support for different players:
189 189
190Install/update/uninstall or list local or NPM PeerTube plugins: 190Install/update/uninstall or list local or NPM PeerTube plugins:
191 191
192``` 192```bash
193$ cd ${CLONE} 193$ cd ${CLONE}
194$ node dist/server/tools/peertube-plugins.js --help 194$ node dist/server/tools/peertube-plugins.js --help
195$ node dist/server/tools/peertube-plugins.js list --help 195$ node dist/server/tools/peertube-plugins.js list --help
@@ -207,25 +207,25 @@ Manage (list/add/remove) video redundancies:
207 207
208To list your videos that are duplicated by remote instances: 208To list your videos that are duplicated by remote instances:
209 209
210``` 210```bash
211$ node dist/server/tools/peertube.js redundancy list-remote-redundancies 211$ node dist/server/tools/peertube.js redundancy list-remote-redundancies
212``` 212```
213 213
214To list remote videos that your instance duplicated: 214To list remote videos that your instance duplicated:
215 215
216``` 216```bash
217$ node dist/server/tools/peertube.js redundancy list-my-redundancies 217$ node dist/server/tools/peertube.js redundancy list-my-redundancies
218``` 218```
219 219
220To duplicate a specific video in your redundancy system: 220To duplicate a specific video in your redundancy system:
221 221
222``` 222```bash
223$ node dist/server/tools/peertube.js redundancy add --video 823 223$ node dist/server/tools/peertube.js redundancy add --video 823
224``` 224```
225 225
226To remove a video redundancy: 226To remove a video redundancy:
227 227
228``` 228```bash
229$ node dist/server/tools/peertube.js redundancy remove --video 823 229$ node dist/server/tools/peertube.js redundancy remove --video 823
230``` 230```
231 231
@@ -237,7 +237,7 @@ These scripts should be run on the server, in `peertube-latest` directory.
237 237
238To parse PeerTube last log file: 238To parse PeerTube last log file:
239 239
240``` 240```bash
241$ cd /var/www/peertube/peertube-latest 241$ 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 242$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level info
243``` 243```
@@ -248,13 +248,14 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production
248 248
249You can use this script to force transcoding of an existing video. PeerTube needs to be running. 249You can use this script to force transcoding of an existing video. PeerTube needs to be running.
250 250
251``` 251To generate transcoding jobs depending on the instance configuration:
252```bash
252$ cd /var/www/peertube/peertube-latest 253$ cd /var/www/peertube/peertube-latest
253$ 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]
254``` 255```
255 256
256Or to transcode to a specific resolution: 257Or to transcode to a specific resolution:
257``` 258```bash
258$ cd /var/www/peertube/peertube-latest 259$ cd /var/www/peertube/peertube-latest
259$ 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]
260``` 261```
@@ -262,7 +263,7 @@ The resolution should be an integer (`1080`, `720`, `480`, etc.)
262 263
263To generate an HLS playlist for a video: 264To generate an HLS playlist for a video:
264 265
265``` 266```bash
266$ cd /var/www/peertube/peertube-latest 267$ cd /var/www/peertube/peertube-latest
267$ 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]
268``` 269```
@@ -271,7 +272,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production
271 272
272You 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.
273 274
274``` 275```bash
275$ cd /var/www/peertube/peertube-latest 276$ cd /var/www/peertube/peertube-latest
276$ 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]
277``` 278```
@@ -281,7 +282,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production
281Some transcoded videos or shutdown at a bad time can leave some unused files on your storage. 282Some transcoded videos or shutdown at a bad time can leave some unused files on your storage.
282Stop PeerTube and delete these files (a confirmation will be demanded first): 283Stop PeerTube and delete these files (a confirmation will be demanded first):
283 284
284``` 285```bash
285$ cd /var/www/peertube/peertube-latest 286$ cd /var/www/peertube/peertube-latest
286$ 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
287``` 288```
@@ -293,7 +294,7 @@ transcoding of uploaded videos. This means that videos might be encoded into
293very large files that are too large for streaming. This script re-transcodes 294very large files that are too large for streaming. This script re-transcodes
294these 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.
295 296
296``` 297```bash
297$ cd /var/www/peertube/peertube-latest 298$ cd /var/www/peertube/peertube-latest
298$ 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
299``` 300```
@@ -306,7 +307,7 @@ If you started PeerTube with a domain, and then changed it you will have
306invalid torrent files and invalid URLs in your database. To fix this, you have 307invalid torrent files and invalid URLs in your database. To fix this, you have
307to run the command below (keep in mind your follower instances will NOT update their URLs). 308to run the command below (keep in mind your follower instances will NOT update their URLs).
308 309
309``` 310```bash
310$ cd /var/www/peertube/peertube-latest 311$ cd /var/www/peertube/peertube-latest
311$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run update-host 312$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run update-host
312``` 313```
@@ -315,7 +316,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production
315 316
316To reset a user password from CLI, run: 317To reset a user password from CLI, run:
317 318
318``` 319```bash
319$ cd /var/www/peertube/peertube-latest 320$ cd /var/www/peertube/peertube-latest
320$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u target_username 321$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u target_username
321``` 322```
@@ -328,21 +329,21 @@ If PeerTube is running, you need to restart it for the changes to take effect (w
328 329
329To install/update a plugin or a theme from the disk: 330To install/update a plugin or a theme from the disk:
330 331
331``` 332```bash
332$ cd /var/www/peertube/peertube-latest 333$ cd /var/www/peertube/peertube-latest
333$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --plugin-path /local/plugin/path 334$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --plugin-path /local/plugin/path
334``` 335```
335 336
336From NPM: 337From NPM:
337 338
338``` 339```bash
339$ cd /var/www/peertube/peertube-latest 340$ cd /var/www/peertube/peertube-latest
340$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --npm-name peertube-plugin-myplugin 341$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --npm-name peertube-plugin-myplugin
341``` 342```
342 343
343To uninstall a plugin or a theme: 344To uninstall a plugin or a theme:
344 345
345``` 346```bash
346$ cd /var/www/peertube/peertube-latest 347$ cd /var/www/peertube/peertube-latest
347$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin 348$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin
348``` 349```