---
title: "Deploy PeerTube"
description: "Federated video platform: PeerTube v8.3.2 with Postgres and Redis"
category: "Other"
url: https://railway.com/deploy/peertube-1
---

# Deploy PeerTube

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

**[Deploy PeerTube on Railway](https://railway.com/template/peertube-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/peertube-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### PeerTube https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/peertube.png

- **Source:** https://github.com/aalfath/peertube-railway-template
- **Health check:** /api/v1/ping
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# 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

* [PeerTube v8.3.2 release](https://github.com/Chocobozzz/PeerTube/releases/tag/v8.3.2)
* [PeerTube Docker documentation](https://docs.joinpeertube.org/install/docker)
* [Template source on GitHub](https://github.com/aalfath/peertube-railway-template)

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



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/peertube-1
