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 runs on bridge2
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
always perform tasks with user `peertube`
### install dir & config
/var/www/peertube/
### storage
locally, with mergerfs, so that additional (remote) storage could be added
## 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
lrwxrwxrwx 1 peertube peertube 24 Sep 5 15:34 peertube-latest -> versions/peertube-v4.2.2
## Logs
/var/www/peertube/storage/logs/
## Install plugin
To update or install a plugin use the web interface.
You could also run this command (not recommended):
```
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>
```
Do a `su peertube` first.
Else you'll have to change the owner after that. Also check other dirs such as /var/www/peertube/storage/plugins/data/
```
cd /var/www/peertube/storage/plugins/node_modules && chown -R peertube:peertube *
```
and then do a restart.
## Restart
```
service peertube start
service peertube status
peertube stopped, but pid file exists
rm /var/www/peertube/peertube-latest/pid/peertube.pid
```
## Upgrade
* 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!)
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
fair.tube is based on peertube and the wonderful work of Framasoft for a GAFAM free Fediverse.
fair.tube was runnning on bridge2 until May 2024
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
The following documentation is related to the deprecated bare metal setup on bridge2.
always perform tasks with user `peertube`
### install dir & config
/var/www/peertube/
config/production.yaml
### storage
locally, with mergerfs, so that additional (remote) storage could be added
## 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
lrwxrwxrwx 1 peertube peertube 24 Sep 5 15:34 peertube-latest -> versions/peertube-v4.2.2
## Logs
/var/www/peertube/storage/logs/
## Install plugin
To update or install a plugin use the web interface.
You could also run this command (not recommended):
```
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>
```
Do a `su peertube` first.
Else you'll have to change the owner after that. Also check other dirs such as /var/www/peertube/storage/plugins/data/
```
cd /var/www/peertube/storage/plugins/node_modules && chown -R peertube:peertube *
```
and then do a restart.
## Restart
```
service peertube start
service peertube status
peertube stopped, but pid file exists
rm /var/www/peertube/peertube-latest/pid/peertube.pid
```
## Upgrade
* 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!)
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
\ No newline at end of file