k8s migration done authored by Roland Alton's avatar Roland Alton
fair.tube is based on peertube and the wonderful work of Framasoft for a GAFAM free Fediverse. fair.tube is based on peertube and the wonderful work of Framasoft for a GAFAM free Fediverse.
fair.tube runs on bridge2 fair.tube was runnning on bridge2 until May 2024
migration to k8s planned in 2024 - we already run some instances there with assets on S3 minio https://git.fairkom.net/hosting/k8s-deployments/peertube-displeu/-/tree/master/k8s Migration to k8s done in June 2024 - we already run some instances there with assets on S3 minio https://git.fairkom.net/hosting/k8s-deployments/peertube-displeu/-/tree/master/k8s
always perform tasks with user `peertube` The following documentation is related to the deprecated bare metal setup on bridge2.
### install dir & config always perform tasks with user `peertube`
/var/www/peertube/ ### install dir & config
### storage /var/www/peertube/
locally, with mergerfs, so that additional (remote) storage could be added config/production.yaml
## Installation ### storage
peertube was manually installed in 2021 on fairkoms bridge2 server in `/var/www/peertube/` which now contains a link to the version used in production locally, with mergerfs, so that additional (remote) storage could be added
lrwxrwxrwx 1 peertube peertube 24 Sep 5 15:34 peertube-latest -> versions/peertube-v4.2.2 ## Installation
peertube was manually installed in 2021 on fairkoms bridge2 server in `/var/www/peertube/` which now contains a link to the version used in production
## Logs
lrwxrwxrwx 1 peertube peertube 24 Sep 5 15:34 peertube-latest -> versions/peertube-v4.2.2
/var/www/peertube/storage/logs/
## Logs
## Install plugin
/var/www/peertube/storage/logs/
To update or install a plugin use the web interface.
You could also run this command (not recommended): ## Install plugin
``` To update or install a plugin use the web interface.
cd /var/www/peertube/peertube-latest && NODE_ENV=production NODE_CONFIG_DIR=/var/www/peertube/config node dist/scripts/plugin/install.js -n peertube-plugin-<plugin_name>
``` You could also run this command (not recommended):
Do a `su peertube` first. ```
cd /var/www/peertube/peertube-latest && NODE_ENV=production NODE_CONFIG_DIR=/var/www/peertube/config node dist/scripts/plugin/install.js -n peertube-plugin-<plugin_name>
Else you'll have to change the owner after that. Also check other dirs such as /var/www/peertube/storage/plugins/data/ ```
``` Do a `su peertube` first.
cd /var/www/peertube/storage/plugins/node_modules && chown -R peertube:peertube *
Else you'll have to change the owner after that. Also check other dirs such as /var/www/peertube/storage/plugins/data/
```
```
and then do a restart. cd /var/www/peertube/storage/plugins/node_modules && chown -R peertube:peertube *
```
## Restart
and then do a restart.
```
service peertube start
## Restart
service peertube status
peertube stopped, but pid file exists ```
rm /var/www/peertube/peertube-latest/pid/peertube.pid service peertube start
```
service peertube status
## Upgrade peertube stopped, but pid file exists
rm /var/www/peertube/peertube-latest/pid/peertube.pid
* Check [Release Notes](https://github.com/Chocobozzz/PeerTube/releases) ```
* Follow [these](https://docs.joinpeertube.org/install-any-os?id=upgrade) steps. (auto upgrade is not tested!)
## Upgrade
You can use this `pg_dump` command to backup the database:
* Check [Release Notes](https://github.com/Chocobozzz/PeerTube/releases)
sudo -u postgres pg_dump -F p peertube_prod > root/peertube_postgres_backup/peertube_prod-pre-<Version>.sql * Follow [these](https://docs.joinpeertube.org/install-any-os?id=upgrade) steps. (auto upgrade is not tested!)
You can use this `pg_dump` command to backup the database:
sudo -u postgres pg_dump -F p peertube_prod > root/peertube_postgres_backup/peertube_prod-pre-<Version>.sql
#18 #18
\ No newline at end of file