Skip to content

Unofficial installations

Git

WARNING

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.

bash
cd /var/www/peertube/versions/
sudo -u peertube -H bash

Then clone the git repository.

bash
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:

bash
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:

bash
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:

bash
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.

ArchLinux

On Arch Linux, PeerTube can be installed through the Arch User Repository thanks to a community package made by daftaupe.

sh
asp checkout peertube
cd peertube
makepkg --syncdeps --rmdeps --install --clean

Or

sh
yay -S peertube

Configuration

You now have to configure the database and credentials to it in the configuration file of PeerTube in /usr/share/webapps/peertube/config/production.yaml.

Currently, there are no Arch packages available for RC or nightly builds of PeerTube. Please use the tarball: {% include_relative installations/tarball.md %}

CentOS

On CentOS, Fedora and RHEL, you can install PeerTube via a community package made by daftaupe on COPR.

sh
dnf copr enable daftaupe/peertube

Prerequisites

You will need PostgreSQL, Node.JS and FFMpeg :

  • Fedora you need RPM Fusion repository enabled
    sh
    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 enabled
    sh
    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

sh
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
sh
systemctl reload postgresql

Start the services

sh
systemctl start redis

Edit the configuration to fit your needs

sh
vim /etc/peertube/production.yaml

Start PeerTube and get the initial root / password

sh
systemctl start peertube && journalctl -f -u peertube

YunoHost

On Debian running YunoHost, you can install Yarn, Node and PeerTube in one shot via a community package.

Install Peertube with YunoHost

See here for support.

Kubernetes

You can deploy peertube on Kubernetes using the official docker image.

Two main options are available :

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.

Features:

  • install or upgrade of Docker Compose
  • build stack tree and official config files in /var/peertube
  • automatic fill of variables in .env with official template MY_EMAIL_ADDRESS and MY_DOMAIN
  • 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
  • etc.

Project Link: https://github.com/kimsible/getpeer.tube

WARNING

Most these projects are in beta, so feedback is welcome to improve this type of deployment.