Skip to main contentSkip to navigation
[email protected]
Client AreaSupport
Hosting Mammoth
HostingMammothYour Data, Our Responsibility
Home
Solutions
Hosting Services
Store
Pricing
About
Blog
API
Contact

Stay Ahead of the Curve

Get the latest insights on cybersecurity, AI innovations, and enterprise data solutions delivered to your inbox.

Hosting Mammoth
HostingMammothEnterprise Solutions

Enterprise-grade data solutions. Hosting, recovery, cybersecurity, and AI-powered services for businesses worldwide.

[email protected]
Sun - Fri, 9:00am - 5:00pm

Services

  • Cloud Hosting
  • Data Recovery
  • Cybersecurity
  • Legal Support
  • MSP Services
  • Web Development
  • AI Services
  • Free Server Migration

Hosting

  • VPS Hosting (NVMe SSD)
  • VDS Hosting (NVMe)
  • Storage VPS (High SSD)
  • GPU Servers
  • Managed Services
  • Cloud Firewall
  • Load Balancer
  • One-Click Apps
  • n8n Hosting
  • Object Storage
  • FAQ

Company

  • Store
  • Pricing
  • About Us
  • Locations
  • Blog
  • Testimonials
  • Contact
  • Affiliate Program
  • White-Label
  • Terms of Service
  • Privacy Policy
  • Browser Cookies
  • SLA

Support

  • Client Area
  • Submit Ticket
  • Knowledge Base
  • Server Status
  • API Documentation

© 2026 Hosting Mammoth. All rights reserved.

Knowledge Base
Getting StartedAccount ManagementVPS HostingGPU ServersStorage VPSCloud FirewallLoad BalancerServer ManagementBilling & PaymentsSupport & TicketsAffiliate ProgramReseller ProgramMarketplace & Appsn8n HostingManaged ServicesServer MigrationAPI & DevelopersSecurityTroubleshootingGlossaryInstall Guides
  1. Home
  2. /
  3. Support
  4. /
  5. Install Guides
  6. /
  7. How To Install Peertube Ubuntu
GUIDEInstall Guides

How to Install PeerTube on Ubuntu 24.04 — Self-Hosted Video Platform

22 min read

How to Install PeerTube on Ubuntu 24.04 — Your Own Federated Video Platform

PeerTube is a free, open-source, federated video streaming platform that puts you back in control of your content. Instead of uploading to YouTube and hoping you do not get demonetized, shadow-banned, or deplatformed overnight, you run your own instance on a VPS you control. Your videos, your rules, your audience. This guide walks you through installing PeerTube on an Ubuntu 24.04 VPS from scratch, including PostgreSQL 16, Redis, FFmpeg, Nginx reverse proxy, Let's Encrypt SSL, live streaming, ActivityPub federation, and optional S3 object storage.

Prefer managed infrastructure? Our Professional VPS plan is sized exactly right for a production PeerTube instance with transcoding, live streams, and room to grow.

Table of Contents

  • What is PeerTube?
  • Why Self-Host a Video Platform?
  • Prerequisites
  • Step 1: Update the System and Install Dependencies
  • Step 2: Install Node 20 and Yarn
  • Step 3: Install PostgreSQL 16 and Redis
  • Step 4: Install FFmpeg
  • Step 5: Create the peertube User and Clone the App
  • Step 6: Configure production.yaml
  • Step 7: Create the systemd Service
  • Step 8: Configure Nginx Reverse Proxy
  • Step 9: Obtain SSL with Certbot
  • Step 10: Create the Admin User
  • Step 11: Enable Live Streaming
  • Step 12: Federation with the Fediverse
  • Step 13: Offload Storage to S3 (Optional)
  • Troubleshooting
  • FAQ
  • Next Steps
  • What is PeerTube?

    PeerTube is a decentralized, federated video platform developed by Framasoft, a French non-profit. It combines three ideas: a self-hosted video CMS (like YouTube, but you run it), peer-to-peer video delivery via WebTorrent and HLS-over-WebRTC (which reduces bandwidth costs when videos go viral), and ActivityPub federation (so your instance can talk to Mastodon, other PeerTube instances, and the rest of the Fediverse).

    The software itself is a Node.js application backed by PostgreSQL and Redis, with FFmpeg handling transcoding. It supports multi-quality adaptive streaming via HLS, live streaming via RTMP/RTMPS with automatic replay generation, channels and playlists, subtitles and captions, a plugin system, and a Single Sign-On flow. Version 6 added video studio features (trim, cut, watermark, intro/outro), object storage offloading to S3-compatible providers, and substantially better moderation tooling.

    Because PeerTube speaks ActivityPub, a user on a Mastodon server can follow a PeerTube channel, comment on videos, and share them across the Fediverse. If you already run a Mastodon server, PeerTube is the natural video counterpart.

    Why Self-Host a Video Platform?

    The case for running your own PeerTube instance instead of depending on YouTube or Vimeo comes down to three things: economics, control, and sovereignty.

    • No ads, ever -- Your viewers are not interrupted by pre-rolls, mid-rolls, or banner takeovers. No attention auction sells them to advertisers behind your back. If you choose to run a sponsorship or paid tier, you keep 100 percent of the revenue instead of sharing it with a platform.
    • No demonetization, no shadow-banning, no algorithmic suppression -- The single biggest complaint from YouTube creators is that the platform can flip a switch and cut off their income with no warning and no appeal. On PeerTube, there is no algorithm deciding whether your content is "advertiser-friendly." You publish, your subscribers are notified, and they watch.
    • Content sovereignty -- Your videos live on disks you control. They are not subject to a Terms of Service that can change overnight, a takedown from a rival's spurious copyright claim, or a platform pivot that buries your back catalog. If PeerTube the project disappeared tomorrow, your instance would keep running.
    • Predictable flat-rate cost -- A Professional VPS costs the same whether you serve 100 views or 100,000. P2P delivery (WebTorrent) means viewers help seed popular videos to each other, which further reduces your bandwidth bill when a video goes viral.
    • Federation amplifies reach -- Your videos appear on federated timelines across Mastodon and other PeerTube instances. Discovery does not require begging an algorithm -- it requires posting quality content that real people want to share.
    • Data privacy for your audience -- No trackers, no fingerprinting, no "also watched" leakage to ad networks. Your viewers' watch history stays on your server.
    • Regulatory compliance -- For EU organizations, hosting video in a known EU jurisdiction on infrastructure you control makes GDPR compliance straightforward.

    Cost Comparison: Self-Hosted vs. Video SaaS

    ScenarioYouTube (ad-supported)Vimeo ProSelf-Hosted PeerTube (Professional VPS)
    Monthly costFree (you pay with audience + data)USD 20/mo (5 TB/year, 7 TB storage)EUR 19.99/mo + optional S3
    Ads on your videos?Yes (platform-controlled)NoNo
    Demonetization riskHighN/ANone
    Custom brandingLimitedYesFull (your domain, your CSS)
    P2P bandwidth savingsNoNoYes (WebTorrent)
    Federation to MastodonNoNoYes (ActivityPub)
    Live streamingYes (1080p, ads)Yes (extra cost)Yes (included)
    For creators with modest traffic and a strong sense of where their work belongs, self-hosting pays back within the first few months.

    Prerequisites

    Before you begin, make sure you have:

    • A VPS running Ubuntu 24.04 LTS with root or sudo access
    • A domain name (for example, tube.yourdomain.com) with an A record pointing to the server's IP. Important: The PeerTube domain is permanent -- federation identities are tied to the hostname and cannot be changed later without breaking every follower and comment.
    • SSH access to your server
    • At least 12 GB RAM, 6 vCPU cores, and 100 GB storage for a usable production instance with transcoding enabled
    • SMTP credentials for transactional email (signup confirmations, password resets)
    Recommended Plan: Professional
    >
    A PeerTube instance with transcoding, live streaming, and 100+ hours of video needs real resources. We recommend the Professional VPS plan:
    >
    - 6 vCPU cores
    - 12 GB RAM
    - 200 GB NVMe SSD
    - Unmetered bandwidth
    - EUR 19.99/month
    >
    For larger libraries and heavy live streaming, combine this plan with S3-compatible object storage and optionally a private WireGuard tunnel between PeerTube and your storage provider.

    Connect via SSH to begin:

    bash
    ssh root@your-server-ip

    Step 1: Update the System and Install Dependencies

    Start with a clean, fully patched system and install the system libraries PeerTube needs.

    bash
    sudo apt update && sudo apt upgrade -y
    sudo apt install -y curl wget gnupg2 ca-certificates lsb-release \
        apt-transport-https software-properties-common unzip git \
        build-essential pkg-config g++ python3 python3-dev \
        openssl nginx cron ufw

    Enable the firewall and open the ports PeerTube needs (SSH, HTTP, HTTPS, and RTMP for live streaming):

    bash
    sudo ufw allow OpenSSH
    sudo ufw allow 80/tcp
    sudo ufw allow 443/tcp
    sudo ufw allow 1935/tcp
    sudo ufw enable

    Step 2: Install Node 20 and Yarn

    PeerTube requires Node 20 LTS. Install it from the NodeSource repository:

    bash
    curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
    sudo apt install -y nodejs
    node --version

    Expected output:

    text
    v20.18.0

    Install Yarn (PeerTube uses Yarn for dependency management and runtime helpers):

    bash
    sudo npm install -g yarn
    yarn --version

    Expected output:

    text
    1.22.22

    Step 3: Install PostgreSQL 16 and Redis

    PeerTube stores its metadata, users, channels, and federation state in PostgreSQL. Install the official PostgreSQL 16 repository for the latest stable version:

    bash
    sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
    curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/pgdg.gpg
    sudo apt update
    sudo apt install -y postgresql-16 postgresql-contrib-16

    Start and enable the service:

    bash
    sudo systemctl enable --now postgresql

    Create the PeerTube database user and database. PeerTube expects the unaccent and pg_trgm extensions for search, which is why we enable them explicitly.

    bash
    sudo -u postgres createuser -P peertube

    When prompted, set a strong password and save it -- you will paste it into production.yaml in Step 6.

    bash
    sudo -u postgres createdb -O peertube -E UTF8 -T template0 peertube_prod
    sudo -u postgres psql -c "CREATE EXTENSION pg_trgm;" peertube_prod
    sudo -u postgres psql -c "CREATE EXTENSION unaccent;" peertube_prod

    Install Redis (PeerTube uses it for session storage, job queues, and caching):

    bash
    sudo apt install -y redis-server
    sudo systemctl enable --now redis-server
    redis-cli ping

    Expected output:

    text
    PONG

    Step 4: Install FFmpeg

    FFmpeg handles all transcoding -- H.264/H.265 re-encoding, HLS segment generation, thumbnail extraction, and live stream ingest. Install the Ubuntu 24.04 package:

    bash
    sudo apt install -y ffmpeg
    ffmpeg -version | head -n 1

    Expected output:

    text
    ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers

    PeerTube requires FFmpeg 4.3 or later, and Ubuntu 24.04 ships 6.1 -- well above the minimum.

    Step 5: Create the peertube User and Clone the App

    Running PeerTube as a dedicated non-privileged system user is required for security. Create it with a home directory at /var/www/peertube:

    bash
    sudo useradd -m -d /var/www/peertube -s /bin/bash peertube
    sudo passwd -l peertube

    The passwd -l command locks the account -- the peertube user should only ever be reached via sudo -u peertube.

    Create the directory layout PeerTube expects:

    bash
    cd /var/www/peertube
    sudo -u peertube mkdir config storage versions
    • versions/ -- Contains the checked-out PeerTube release. You keep multiple versions here so rollback is a symlink flip.
    • config/ -- Holds production.yaml and related config files. Persists across upgrades.
    • storage/ -- Videos, thumbnails, avatars, HLS segments, logs. Persists across upgrades.
    Find the latest stable release tag from the PeerTube release page. At the time of writing this is v6.3.2. Clone it under the peertube user:

    bash
    VERSION="v6.3.2"
    cd /var/www/peertube/versions
    sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip"
    sudo -u peertube unzip -q "peertube-${VERSION}.zip"
    sudo -u peertube rm "peertube-${VERSION}.zip"

    Create the peertube-latest symlink that systemd will point to:

    bash
    cd /var/www/peertube
    sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest

    Install the Node dependencies (this will take 3-5 minutes and compile a few native modules, which is why we installed build-essential earlier):

    bash
    cd /var/www/peertube/peertube-latest
    sudo -u peertube yarn install --production --pure-lockfile

    Copy the example configuration files into config/:

    bash
    cd /var/www/peertube
    sudo -u peertube cp peertube-latest/config/default.yaml config/default.yaml
    sudo -u peertube cp peertube-latest/config/production.yaml.example config/production.yaml

    Step 6: Configure production.yaml

    production.yaml is where you wire PeerTube to PostgreSQL, Redis, SMTP, and your domain. Edit it:

    bash
    sudo -u peertube nano /var/www/peertube/config/production.yaml

    Set the values below. Leave everything else at the defaults for now -- you can tune later.

    yaml
    listen:
      hostname: '127.0.0.1'
      port: 9000

    webserver: https: true hostname: 'tube.yourdomain.com' port: 443

    secrets: peertube: 'REPLACE_WITH_openssl_rand_hex_32_OUTPUT'

    database: hostname: 'localhost' port: 5432 name: 'peertube_prod' username: 'peertube' password: 'THE_PASSWORD_YOU_SET_IN_STEP_3'

    redis: hostname: 'localhost' port: 6379

    smtp: transport: smtp hostname: 'smtp.yourprovider.com' port: 587 username: '[email protected]' password: 'your-smtp-password' tls: false disable_starttls: false from_address: '[email protected]'

    admin: email: '[email protected]'

    storage: tmp: '/var/www/peertube/storage/tmp/' bin: '/var/www/peertube/storage/bin/' avatars: '/var/www/peertube/storage/avatars/' videos: '/var/www/peertube/storage/videos/' streaming_playlists: '/var/www/peertube/storage/streaming-playlists/' redundancy: '/var/www/peertube/storage/redundancy/' logs: '/var/www/peertube/storage/logs/' previews: '/var/www/peertube/storage/previews/' thumbnails: '/var/www/peertube/storage/thumbnails/' torrents: '/var/www/peertube/storage/torrents/' captions: '/var/www/peertube/storage/captions/' cache: '/var/www/peertube/storage/cache/' plugins: '/var/www/peertube/storage/plugins/'

    transcoding: enabled: true threads: 2 concurrency: 1 resolutions: '0p': false '144p': false '240p': true '360p': true '480p': true '720p': true '1080p': true '1440p': false '2160p': false

    Generate a cryptographically strong secret for the secrets.peertube field:

    bash
    openssl rand -hex 32

    Paste the output into the secrets.peertube line.

    A few notes on the values above:

    • webserver.hostname is permanent. This value becomes part of every federated video identifier (https://tube.yourdomain.com/videos/watch/<uuid>). Changing it later breaks federation -- all remote follows and shares go stale.
    • transcoding.threads: 2 and concurrency: 1 are tuned for a 6 vCPU VPS. Raise concurrency only on larger servers; transcoding will saturate all available cores otherwise.
    • The lowest resolutions (0p, 144p) are disabled because most modern clients reject them. 1440p and 2160p are disabled because they multiply storage cost -- enable them later if your audience needs 4K.
    Save and exit (Ctrl+O, Enter, Ctrl+X).

    Step 7: Create the systemd Service

    Install the systemd unit that ships with PeerTube:

    bash
    sudo cp /var/www/peertube/peertube-latest/support/systemd/peertube.service /etc/systemd/system/peertube.service

    Inspect and adjust the unit if needed:

    bash
    sudo nano /etc/systemd/system/peertube.service

    The defaults are sensible for Ubuntu 24.04. Confirm that User=peertube, WorkingDirectory=/var/www/peertube/peertube-latest, and ExecStart invokes Node with the peertube-latest binary. Save and exit.

    Enable and start the service:

    bash
    sudo systemctl daemon-reload
    sudo systemctl enable --now peertube
    sudo systemctl status peertube

    Expected output:

    text
    ● peertube.service - PeerTube daemon
         Loaded: loaded (/etc/systemd/system/peertube.service; enabled; preset: enabled)
         Active: active (running) since Thu 2026-04-16 12:00:00 UTC; 10s ago
       Main PID: 23456 (node)
          Tasks: 18 (limit: 14236)
         Memory: 312.0M

    Watch the startup logs for any configuration errors:

    bash
    sudo journalctl -u peertube -f

    PeerTube logs its HTTP listener and migration status. Once you see Server listening on 127.0.0.1:9000, the backend is up.

    Step 8: Configure Nginx Reverse Proxy

    PeerTube ships a hardened, tuned Nginx configuration at support/nginx/peertube inside the release tarball. Use it -- do not hand-roll your own, because PeerTube's HLS streaming, WebSocket signaling, and large upload handling all require specific proxy_* tuning.

    Copy the provided template to sites-available:

    bash
    sudo cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube

    Substitute your domain into the config:

    bash
    sudo sed -i 's/${WEBSERVER_HOST}/tube.yourdomain.com/g' /etc/nginx/sites-available/peertube
    sudo sed -i 's/${PEERTUBE_HOST}/127.0.0.1:9000/g' /etc/nginx/sites-available/peertube

    Enable the site and disable the default placeholder:

    bash
    sudo ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube
    sudo rm -f /etc/nginx/sites-enabled/default

    The PeerTube-provided config includes:

    • An HTTP-to-HTTPS redirect on port 80
    • HSTS and security headers
    • A client_max_body_size 12G directive (so users can upload large videos)
    • Long proxy_read_timeout for live stream and upload connections
    • Correct MIME handling for HLS .m3u8 playlists and .ts segments
    • WebSocket upgrade for federation and live chat
    • A dedicated location /static/streaming-playlists/ block that serves HLS directly from disk without proxying through Node (major performance win)
    Test the configuration and reload:

    bash
    sudo nginx -t
    sudo systemctl reload nginx

    Step 9: Obtain SSL with Certbot

    PeerTube cannot federate over plain HTTP -- the ActivityPub spec requires HTTPS. Install Certbot and request a Let's Encrypt certificate:

    bash
    sudo apt install -y certbot python3-certbot-nginx
    sudo certbot --nginx -d tube.yourdomain.com

    Follow the prompts (enter an email address, accept the TOS). Certbot automatically rewrites the Nginx config to reference the new certificate and sets up a renewal timer.

    Verify automatic renewal works:

    bash
    sudo certbot renew --dry-run

    Expected output includes:

    text
    Congratulations, all simulated renewals succeeded

    Reload Nginx one final time and open the site in a browser at https://tube.yourdomain.com. You should see the PeerTube welcome page.

    Step 10: Create the Admin User

    The initial admin password is generated on first boot and printed to the logs. Retrieve it:

    bash
    sudo journalctl -u peertube --no-pager | grep -i "Username: root" -A 1

    Expected output:

    text
    Username: root
    User password: 1a2b3c4d5e6f7g8h

    Visit https://tube.yourdomain.com/login, sign in as root with that password, and immediately change it under My Settings > Account settings.

    Next, run through the initial admin configuration at /admin/config:

    • Instance name and description (what appears on your homepage and in federation discovery)
    • Terms, Code of Conduct, Moderation information (linked from the footer)
    • Signup policy -- open, request-based, or invite-only
    • Default user video quota -- how much each new user can upload (e.g., 10 GB)
    • Default channels quota per user -- usually 20
    Save, then visit your public homepage to confirm everything looks right.

    Step 11: Enable Live Streaming

    PeerTube's live streaming accepts RTMP ingest (the same protocol OBS and Streamlabs use) and outputs adaptive HLS to viewers. It also supports automatic replay -- when your stream ends, PeerTube saves a VOD and publishes it to the channel.

    Enable it in production.yaml:

    yaml
    live:
      enabled: true
      allow_replay: true
      max_duration: -1
      max_instance_lives: 20
      max_user_lives: 3
      transcoding:
        enabled: true
        threads: 2
        profile: default
        resolutions:
          '240p': false
          '360p': true
          '480p': true
          '720p': true
          '1080p': true

    Then restart PeerTube:

    bash
    sudo systemctl restart peertube

    PeerTube listens for RTMP on port 1935 (which you opened in Step 1). In OBS, set:

    • Server: rtmp://tube.yourdomain.com:1935/live
    • Stream Key: (generate one in the PeerTube UI under Publish > Go live > Create a permanent live stream)
    Hit "Start Streaming" in OBS. Within 10-15 seconds, viewers refreshing your PeerTube channel page will see the live indicator and can tune in.

    For RTMPS (encrypted ingest), add a rtmps section with a certificate. For most use cases, plain RTMP with a rotating stream key is fine -- the public playback side is already HTTPS.

    Step 12: Federation with the Fediverse

    PeerTube federates over ActivityPub by default -- you do not have to do anything extra. Every video you publish is broadcast as a federated Announce activity to followers of your channel. Users on Mastodon, Misskey, Pleroma, and other PeerTube instances can follow @[email protected] and see your videos in their home feed.

    To accelerate discovery, take a few concrete actions:

  • List your instance on joinpeertube.org/instances by submitting via the form. It is the primary discovery directory.
  • Follow other PeerTube instances from the admin panel at /admin/follows/following-list. Each follow means your instance indexes their public videos into federated search.
  • Announce your launch from a Mastodon account pointing at your channel URL -- Mastodon fully renders PeerTube videos inline.
  • Enable search federation in the admin config so search queries on your instance also search across followed instances.
  • Federation identities are permanent. If you rename your domain later, every remote follower's subscription breaks -- this is why we emphasized the domain choice in Step 6.

    If you also host a Mastodon instance, the two integrate transparently: boost a PeerTube video from Mastodon and it renders inline with a playable embed.

    Step 13: Offload Storage to S3 (Optional)

    Video files are large. A 100-hour library at 1080p easily exceeds 500 GB. Rather than growing your VPS's attached disk indefinitely, PeerTube v5+ supports offloading videos, HLS playlists, and user avatars to any S3-compatible object storage provider -- AWS S3, Backblaze B2, Wasabi, Hetzner Object Storage, or your own MinIO instance.

    Add an object_storage section to production.yaml:

    yaml
    object_storage:
      enabled: true
      endpoint: 'https://s3.eu-central-1.amazonaws.com'
      region: 'eu-central-1'
      credentials:
        access_key_id: 'YOUR_S3_ACCESS_KEY'
        secret_access_key: 'YOUR_S3_SECRET_KEY'
      max_upload_part: 100MB
      streaming_playlists:
        bucket_name: 'peertube-streaming-playlists'
        prefix: ''
        base_url: 'https://peertube-streaming-playlists.s3.eu-central-1.amazonaws.com'
      web_videos:
        bucket_name: 'peertube-web-videos'
        prefix: ''
        base_url: 'https://peertube-web-videos.s3.eu-central-1.amazonaws.com'
      user_exports:
        bucket_name: 'peertube-user-exports'
        prefix: ''
      original_video_files:
        bucket_name: 'peertube-original-videos'
        prefix: ''

    Create the buckets in your S3 provider and ensure they have CORS configured to allow GET, HEAD from your PeerTube domain. Restart the service:

    bash
    sudo systemctl restart peertube

    Existing videos stay on local disk. To migrate them in bulk, use the built-in CLI:

    bash
    cd /var/www/peertube/peertube-latest
    sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config \
        NODE_ENV=production node dist/scripts/migrate-to-object-storage.js

    After migration, your VPS disk only holds configs, database files, and temporary transcoding workspace -- typically under 30 GB even for a busy instance.

    Troubleshooting

    ProblemCauseSolution
    Error: role "peertube" does not existDatabase user wasn't created or password mismatchRecheck Step 3. Re-run createuser -P peertube and update the password in production.yaml.
    Homepage loads but videos 404 on playNginx config not applying the HLS location blockConfirm you used the bundled support/nginx/peertube config. Run sudo nginx -T \</td><td>grep streaming-playlists.
    Uploads fail around 500 MBclient_max_body_size default overrideVerify client_max_body_size 12G; is present in /etc/nginx/sites-available/peertube.
    Federation broken -- remote users cannot followHTTP instead of HTTPS, or certificate invalidActivityPub requires HTTPS with a trusted cert. Run sudo certbot renew and confirm curl -I https://tube.yourdomain.com returns 200.
    High CPU during transcoding stalls the webserverToo many concurrent transcodesLower transcoding.concurrency to 1 and transcoding.threads to 2 in production.yaml.
    Live stream appears in OBS as "connected" but viewers get a spinnerTranscoding backlogCheck journalctl -u peertube -f for FFmpeg errors. Reduce the number of live transcoding resolutions.
    ENOSPC: no space left on deviceStorage directory fullEnable S3 offloading (Step 13), or add a block storage volume and symlink /var/www/peertube/storage/videos.
    502 Bad Gateway after rebootPeerTube not started yet when Nginx askedsudo systemctl status peertube. If it shows "activating" for more than 60s, check Postgres with sudo systemctl status postgresql.

    Viewing Logs

    The Node process logs go through systemd:

    bash
    sudo journalctl -u peertube -f

    Application-level logs (with more detail) are written to /var/www/peertube/storage/logs/peertube.log:

    bash
    sudo -u peertube tail -f /var/www/peertube/storage/logs/peertube.log

    For complete configuration reference and advanced tuning, see the official docs at docs.joinpeertube.org.

    FAQ

    How much bandwidth does PeerTube actually use?

    Outbound bandwidth scales with viewer count and video quality. A 1080p stream pushes roughly 4-6 Mbps per viewer via HLS. However, PeerTube's WebTorrent and HLS-over-WebRTC layers let viewers seed segments to each other -- when a video is being watched simultaneously by multiple people, peer-to-peer delivery can reduce server egress by 30-60 percent. For a small creator instance, the unmetered bandwidth on a Professional VPS is more than enough. For heavy traffic, pair PeerTube with S3 plus a CDN in front of your object storage bucket.

    How much storage do I need?

    Plan for roughly 1 GB per hour of uploaded 1080p video per enabled transcoding resolution. If you upload 10 hours of 1080p originals with 360p/480p/720p/1080p transcoding enabled, that is approximately 40 GB. The Professional VPS's 200 GB NVMe holds around 50 hours of video in that configuration before you should enable S3 offloading. With S3, the VPS disk only needs to hold temporary transcoding workspace (around 20 GB).

    Can PeerTube handle live streaming at scale?

    Yes, but with caveats. A single VPS transcoding one live stream into 4 resolutions uses about 4-6 vCPU cores and 4 GB RAM during the broadcast. A 6 vCPU Professional plan comfortably handles 1-2 concurrent live streams. For more simultaneous broadcasters, scale up vertically or move transcoding to a dedicated worker node. Viewer count is bandwidth-limited, not CPU-limited, because HLS playback is just file serving.

    How does PeerTube compare to Odysee, Rumble, and Vimeo?

    Odysee and Rumble are centralized YouTube alternatives that you still do not control. They can demonetize, ban, or deplatform you just like YouTube. Vimeo is a SaaS video hosting product that charges per-storage and per-bandwidth with no federation. PeerTube is the only option where the infrastructure is yours -- the software is AGPL-licensed, federates natively, and runs on hardware you pay for directly. The trade-off is operational: you maintain the server, you handle moderation, you respond to abuse reports. For creators who value sovereignty over convenience, PeerTube wins.

    Can I migrate my existing YouTube channel to PeerTube?

    Yes. PeerTube ships an import feature that accepts any URL supported by yt-dlp -- which includes YouTube, Vimeo, Twitch, and dozens of others. In the admin config, enable Video imports > HTTP imports and Video imports > Torrent imports, then users can paste a YouTube URL into the upload form and PeerTube will download, transcode, and publish it as a native video. For bulk migration, use the CLI: sudo -u peertube node dist/scripts/import-videos.js -u https://youtube.com/@yourchannel.

    Is PeerTube legally safe to run?

    You are responsible for the content on your instance under the laws of your hosting jurisdiction. PeerTube gives you strong moderation tools: per-video and per-user suspension, federation blocklists, NSFW flags, comment policies, and abuse reports with audit trails. Publish clear Terms of Service and a moderation policy, respond promptly to DMCA and content takedown requests, and keep logs. For EU-hosted instances, the Digital Services Act requires a designated legal contact and transparency reporting -- both are straightforward for small instances but something to plan for before launch.

    How do I keep PeerTube updated?

    Upgrades follow the same pattern as the initial install: download the new release tarball into versions/, re-point the peertube-latest symlink, run yarn install --production --pure-lockfile, and restart the service. PeerTube runs database migrations automatically on startup. Always read the release notes before upgrading major versions -- occasional breaking changes require config adjustments. The official upgrade script at support/doc/production.md#upgrade-recommended automates the entire flow.

    Next Steps

    With PeerTube live on your VPS, here are the natural follow-ons:

    • Set up automated backups -- Back up the config/ directory, the PostgreSQL database (pg_dump peertube_prod), and if not using S3, the storage/ directory. A weekly offsite backup with restic or borgbackup protects against disk failure and human error.
    • Install a Mastodon server -- Pair your PeerTube instance with a Mastodon instance on a second VPS. Boost your videos, run polls, and build an audience across both platforms with federation handling cross-posting for free.
    • Deploy MinIO for self-hosted S3 -- Rather than paying AWS or Backblaze, run your own S3-compatible object storage on a separate storage-optimized VPS and connect PeerTube to it. Keeps all your data on infrastructure you control.
    • Secure admin access with WireGuard -- Restrict /admin/* in Nginx to a private WireGuard subnet so the admin panel is never exposed to the public internet. Combine with SSH-key-only access for defense in depth.
    • Install plugins -- Browse the official plugin index at packages.joinpeertube.org for auto-captioning (Whisper), custom themes, authentication integrations (OIDC, SAML), and chat/live interaction plugins.

    Run PeerTube on Infrastructure Sized for It
    >
    A serious video platform needs serious hardware. Our Professional VPS gives you the vCPUs, RAM, and NVMe storage to transcode, stream live, and federate -- without noisy-neighbor throttling.
    >
    - 6 vCPU cores for parallel transcoding
    - 12 GB RAM for Node, Postgres, and Redis in harmony
    - 200 GB NVMe for a few hundred hours of video
    - Unmetered bandwidth so viral videos do not bankrupt you
    - 24/7 support from engineers who actually run PeerTube
    >
    Deploy Your PeerTube VPS Now -- Plans start at EUR 19.99/month.

    Was this article helpful?

    ← Back to Install GuidesBrowse all categories →

    Still have questions?

    Contact Support →Submit a Ticket