This guide assumes that you have read the instructions in the official installation guide and thus omits some configurations steps (reverse proxy, database configuration, etc.). At the end you should have a PeerTube instance running the latest development version, which can be considered unstable.
First, go to the Peertube folder and switch to the Peertube user.
cd /var/www/peertube/versions/ sudo -u peertube -H bash
Then clone the git repository.
git clone https://github.com/Chocobozzz/PeerTube.git peertube-develop cd peertube-develop/
It should automatically be on the
develop branch, which you can verify with
git branch. You can also switch to another branch or a specific commit with
git checkout [branch or commit]. Once you have the correct version, run the build:
yarn install --pure-lockfile npm run build
The compilation will take a long time. You can also run it on your local computer, and transfer the entire folder to your server.
Now you should make sure to add any new config fields to your
production.yaml. And you should make a backup of the database:
SQL_BACKUP_PATH="backup/sql-peertube_prod-$(date -Im).bak" && \ cd /var/www/peertube && sudo -u peertube mkdir -p backup && \ sudo -u postgres pg_dump -F c peertube_prod | sudo -u peertube tee "$SQL_BACKUP_PATH" >/dev/null
Finally, update the
peertube-latest symlink to point at the new version:
cd /var/www/peertube && \ sudo unlink ./peertube-latest && \ sudo -u peertube ln -s versions/peertube-develop ./peertube-latest
Now you just need to restart Peertube. With systemd, just run
sudo systemctl restart peertube.
Do not try to upgrade from one development version to another by running
git pull and
npm run build. This will break your website. Either switch back to a release version, or make a copy of the
peertube-develop folder and run the compilation there.
On Arch Linux, PeerTube can be installed through the Arch User Repository thanks to a community package made by daftaupe.
asp checkout peertube cd peertube makepkg --syncdeps --rmdeps --install --clean
yay -S peertube
You now have to configure the database and credentials to it in the configuration file of PeerTube in
On CentOS, Fedora and RHEL, you can install PeerTube via a community package made by daftaupe on COPR.
dnf copr enable daftaupe/peertube
You will need PostgreSQL, Node.JS and FFMpeg :
- Fedora you need RPM Fusion repository enabledsh
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
- CentOS you will need EPEL and the unofficial EPEL-multimedia repositories enabledsh
cd /etc/yum.repos.d && curl -O https://negativo17.org/repos/epel-multimedia.repo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm https://negativo17.org/repos/epel-multimedia.repo
Setup the database
su - postgres initdb createuser peertube -W createdb -O peertube peertube_prod echo "host peertube_prod peertube 127.0.0.1/32 md5" >> data/pg_hba.conf
systemctl reload postgresql
Start the services
systemctl start redis
Edit the configuration to fit your needs
Start PeerTube and get the initial root / password
systemctl start peertube && journalctl -f -u peertube
On Debian running YunoHost, you can install Yarn, Node and PeerTube in one shot via a community package.
See here for support.
Ansible on Debian
This is an alternate way of installing Peertube on Debian, provided by a community member.
The ansible playbook triggers the full installation of Peertube without certbot in a reverse proxy scenario, meaning HTTPS is not directly handled on the Peertube server.
This is for Debian only. All you need is to set the hostname, full qualified domain name, and wait about 15 minutes for the installation to go through.
- Repository: https://framagit.org/ansibleislife/ansible-role-peertube
- HOWTO: https://framagit.org/ansibleislife/ansible-role-peertube/blob/master/HOWTO.md
Ansible and Docker Compose
This is a project that lets you automatically install Peertube with Ansible, using docker-compose.
The project is maintained by @nutomic and used on peertube.social.
- automatic Let's Encrypt certificate handling via Traefik
- file caching with nginx (to limit backend access and Peertube CPU usage)
- email sending works out of the box
Project Link: https://yerbamate.ml/nutomic/peertube-compose
You can deploy peertube on Kubernetes using the official docker image.
Two main options are available :
Using Helm with peertube-helm which is initially forked from jsl-helmcharts
Using Kubernetes deployments which supports storing content on S3 remote storage: peertube-on-kubernetes
Using Kubernetes and Kustomize with Native Object storage peertube-k8s
Shell and Docker Compose
A quick way to install the official Docker stack of peertube by one shell command on a bare server with only Docker installed.
- install or upgrade of Docker Compose
- build stack tree and official config files in
- automatic fill of variables in
.envwith official template
- generate PostgreSQL crendentials
- generate first Let's Encrypt certificate with Certbot container
- create systemd service
- run the stack
Also exposes the CLI Server Tools and more for maintenance like:
- PostgreSQL tasks: dump, restore, psql requests
- nginx control
- stack upgrade with very-small downtime
Project Link: https://github.com/kimsible/getpeer.tube
Most these projects are in beta, so feedback is welcome to improve this type of deployment.