English
Get started

← All templates · Media

Deploy PeerTube in one click

Your own video platform in the fediverse: upload, stream and share videos

A self-hosted alternative to YouTube, Vimeo, and Dailymotion.

What is PeerTube?

PeerTube is an open-source video platform, a federated alternative to YouTube that runs on your own server. You upload videos, sort them into channels and playlists, and go live from OBS or any RTMP software. Each instance speaks ActivityPub, so people follow your channels from Mastodon or by RSS, with no account on your site. Viewers share the load with each other over WebRTC, and friendly instances can cache each other's videos.

People self-host PeerTube to own their videos and their audience: no ads, no tracking, and moderation rules of their own. The admin decides who may sign up and how much each user may upload. It suits a creator, a school or a community that wants a video site of its own. The catch is transcoding: every upload is re-encoded, which takes CPU time, and each extra resolution you enable adds more work and disk.

Hosting PeerTube on Pethost

  1. You sign in to Pethost with a passkey, GitHub or Google. No machine yet? You pick a plan, and the link waits until it is ready.
  2. New project opens at PeerTube. You fill in what it asks for and click Create project: Email, Admin password.
  3. In a minute or two PeerTube is live at its own address with HTTPS. Its secrets are made at random, and its data is in the nightly backup.
  4. It is a project like any other: you or your agent can change it, roll it back or restore it.

Questions about PeerTube

Is PeerTube free and open source?

Yes. PeerTube is free software under the AGPL-3.0 licence, developed by Framasoft, a French non-profit. Anyone can install it on a server and domain of their own.

Is PeerTube a good YouTube alternative?

For hosting your own videos, yes: uploads, channels, playlists and live streams, with no ads or tracking. Framasoft says plainly it is not meant to replace YouTube; its audience comes through federation rather than one central site.

Can I import videos from YouTube to PeerTube?

Yes, once the admin enables it. A video can be imported by its URL from sites youtube-dl supports, or from a torrent, and channel synchronization copies a YouTube, Dailymotion or Vimeo channel, then checks it hourly for new videos.

Does PeerTube have a mobile app?

Yes. The official PeerTube app is on the App Store, Google Play and F-Droid. It browses videos across the federation, saves them to watch offline, and publishes and manages your own videos.

Can I change the domain of a PeerTube instance?

Not officially. PeerTube's docs say it does not support changing its host, so the domain is final after the first start. Give the project its final address, your own domain or a name under yourname.pethost.app, before you upload.

How much memory and disk does PeerTube need?

PeerTube is heavy: transcoding each upload takes every core for minutes, and an hour of video takes gigabytes. On Pethost the Grow plan is enough for it, with room for other apps beside it.

PeerTube Docker Compose file

The template is this compose.yaml and the variables written into the project’s .env as it is created. Pethost runs the file as it is written.

Containers: peertube (chocobozzz/peertube:v8.3.1-trixie), postgres (postgres:17), redis (redis:7.4).

Volumes, in the nightly backup: data, config, db, redis.

# PeerTube's production docker-compose.yml without its nginx, certbot and postfix: the machine's
# proxy gives the address and HTTPS, and PeerTube serves its files itself.
services:
  peertube:
    image: chocobozzz/peertube:v8.3.1-trixie
    restart: unless-stopped
    environment:
      PEERTUBE_WEBSERVER_HOSTNAME: ${HOST}
      PEERTUBE_SECRET: ${PEERTUBE_SECRET}
      PEERTUBE_DB_HOSTNAME: postgres
      PEERTUBE_DB_USERNAME: peertube
      PEERTUBE_DB_PASSWORD: ${DB_PASSWORD}
      PEERTUBE_REDIS_HOSTNAME: redis
      PEERTUBE_ADMIN_EMAIL: ${ADMIN_EMAIL}
      # Read once, when the first start makes the user root.
      PT_INITIAL_ROOT_PASSWORD: ${ADMIN_PASSWORD}
      # Empty until SMTP_HOSTNAME and the rest are put into .env: then PeerTube sends mail.
      PEERTUBE_SMTP_HOSTNAME: ${SMTP_HOSTNAME:-}
      PEERTUBE_SMTP_PORT: ${SMTP_PORT:-587}
      PEERTUBE_SMTP_USERNAME: ${SMTP_USERNAME:-}
      PEERTUBE_SMTP_PASSWORD: ${SMTP_PASSWORD:-}
      PEERTUBE_SMTP_FROM: ${SMTP_FROM:-}
      PEERTUBE_SMTP_TLS: ${SMTP_TLS:-false}
      PEERTUBE_SMTP_DISABLE_STARTTLS: "false"
    volumes:
      - data:/data
      - config:/config
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy

  postgres:
    image: postgres:17
    restart: unless-stopped
    environment:
      POSTGRES_USER: peertube
      POSTGRES_DB: peertube
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    volumes:
      - db:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "peertube"]
      interval: 5s
      timeout: 5s
      retries: 10

  redis:
    image: redis:7.4
    restart: unless-stopped
    volumes:
      - redis:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 5s
      retries: 10

volumes:
  data:
  config:
  db:
  redis:

More in Media