Docs / CMS & Website Platforms / How to Set Up PeerTube Video Platform

How to Set Up PeerTube Video Platform

By Admin · Mar 1, 2026 · Updated Apr 23, 2026 · 25 views · 2 min read

What Is PeerTube?

PeerTube is a decentralized, open-source video hosting platform that uses peer-to-peer technology to reduce server bandwidth costs. It allows you to create your own video platform, federate with other PeerTube instances, and maintain full control over your content and audience.

Requirements

  • A Breeze with at least 4 GB RAM and 2 CPU cores
  • Ubuntu 22.04 or later
  • Node.js 18 LTS
  • PostgreSQL 13+
  • Redis server
  • FFmpeg for video transcoding
  • A domain name with DNS configured

Step 1: Install Dependencies

sudo apt update
sudo apt install -y curl ffmpeg postgresql redis-server
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g yarn

Step 2: Create the Database and User

sudo -u postgres createuser -P peertube
sudo -u postgres createdb -O peertube -E UTF8 peertube_prod

Step 3: Create a System User and Install

sudo useradd -m -s /bin/bash -d /var/www/peertube peertube
sudo mkdir -p /var/www/peertube/config /var/www/peertube/storage
cd /var/www/peertube
sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/latest/download/peertube-latest.zip"
sudo -u peertube unzip peertube-latest.zip
cd peertube-latest && sudo -u peertube yarn install --production

Step 4: Configure PeerTube

sudo cp /var/www/peertube/peertube-latest/config/production.yaml.example \
  /var/www/peertube/config/production.yaml
sudo nano /var/www/peertube/config/production.yaml

Set your domain, database credentials, Redis connection, and SMTP details in the configuration file.

Step 5: Set Up Nginx and SSL

sudo cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/
sudo certbot --nginx -d videos.yourdomain.com

Running PeerTube

Use the provided systemd service file to manage PeerTube:

sudo cp /var/www/peertube/peertube-latest/support/systemd/peertube.service /etc/systemd/system/
sudo systemctl enable --now peertube

Was this article helpful?