Deploy PeerTube

Federated video platform: PeerTube v8.3.2 with Postgres and Redis

Deploy PeerTube

/data

/var/lib/postgresql/data

Just deployed

/data

Deploy and Host PeerTube on Railway

PeerTube is a free, open-source video platform (AGPL-3.0) developed by Framasoft. You host your own YouTube-style site: upload videos, organise them into channels and playlists, stream live, and let viewers comment. Instances federate over ActivityPub, so they can follow each other and Mastodon users can follow channels.

About Hosting PeerTube

PeerTube needs three parts: the Node.js server, which serves the web app and API and transcodes videos with ffmpeg; PostgreSQL for its data; and Redis for job queues and sessions. This template deploys PeerTube v8.3.2 from the official image, pinned by digest, with Railway Postgres 18 and Redis, wired over the private network. Videos, thumbnails, plugins and the admin settings live on a volume at /data. The server secret and the root password are generated at deploy, and the public URL is the service's Railway domain. Transcoding runs on CPU, so size the service for your uploads.

Common Use Cases

  • A video site for a creator, school, club or company, with no ads and no tracking
  • Internal training and meeting recordings, with private or unlisted videos
  • A federated instance that follows other PeerTube instances and the Fediverse

Dependencies for PeerTube Hosting

  • PostgreSQL (Railway Postgres 18, bundled)
  • Redis (Railway Redis, bundled)

Deployment Dependencies

Implementation Details

Services in this template:

  • PeerTube: web UI, API, federation, HLS streaming, transcoding and background jobs. Health check /api/v1/ping. Volume at /data.
  • Postgres: the database, on its own volume. PeerTube enables pg_trgm and unaccent itself.
  • Redis: job queues, sessions and caches, on its own volume.

PeerTube starts after Postgres and Redis answer on the private network. Nothing has to be filled in at deploy.

After deploy:

  1. Open the PeerTube service's domain and log in as root with the PT_INITIAL_ROOT_PASSWORD value from the PeerTube service's Variables. Change the password and email under My account.
  2. Configure the instance in Administration → Configuration (name, signups, transcoding resolutions).
  3. Want your own domain? Add it in Railway and set PEERTUBE_WEBSERVER_HOSTNAME to it before you upload or federate: the hostname is the instance's federated identity.
  4. Optional: add PEERTUBE_SMTP_HOSTNAME, PEERTUBE_SMTP_PORT, PEERTUBE_SMTP_USERNAME, PEERTUBE_SMTP_PASSWORD and PEERTUBE_SMTP_FROM for signup and notification emails, PEERTUBE_OBJECT_STORAGE_* for S3-compatible storage, or a TCP proxy to port 1935 for live streaming.

Updates: the PeerTube service builds from the GitHub repo above. When we bump the pinned version, Railway shows an update notice on your project and you apply it when you choose. Read the repo's CHANGELOG first, and back up Postgres before a major upgrade.

Why Deploy PeerTube on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying PeerTube on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0