Upstream repo: https://github.com/Chocobozzz/PeerTube
PeerTube is a free, open-source, and decentralized video platform powered by ActivityPub. This package runs PeerTube on StartOS with a PostgreSQL database and Valkey cache.
- Image and Container Runtime
- Volume and Data Layout
- Installation and First-Run Flow
- Configuration Management
- Network Access and Interfaces
- Actions (StartOS UI)
- Backups and Restore
- Health Checks
- Dependencies
- Limitations and Differences
- What Is Unchanged from Upstream
- Contributing
- Quick Reference for AI Consumers
| Container | Image | Architectures |
|---|---|---|
| peertube | chocobozzz/peertube:v8.1.8 |
x86_64, aarch64 |
| postgres | postgres:17-alpine |
x86_64, aarch64 |
| valkey | valkey/valkey:9-alpine |
x86_64, aarch64 |
All three containers share the host network namespace. PeerTube communicates with PostgreSQL and Valkey over localhost.
| Volume | Container Mount | Purpose |
|---|---|---|
main |
/data (peertube) |
Uploads, thumbnails, HLS streams |
main |
/config (peertube) |
Runtime config, local overrides |
db |
/var/lib/postgresql (postgres) |
PostgreSQL data |
store.json (inside main) holds generated secrets (postgres password, PeerTube secret, admin password) and the user-selected primary URL.
- Install — StartOS pulls all three images.
generateSecretsruns on init and writespostgresPasswordandpeertubeSecrettostore.json.generateConfigwriteslocal-production.jsonwith transcoding resolutions pre-configured (360p/480p/720p). - Critical task: Set Admin Password —
watchCredentialscreates this task becauseadminPasswordis not yet set. The user runs the Set Admin Password action, which generates a password, stores it instore.json, and displays it. - Primary URL (auto-set) —
taskSetPrimaryUrltries to auto-select the.localLAN URL. If none is available, a critical task prompts the user to run Set Primary URL. - Service starts — PostgreSQL initializes, Valkey starts, PeerTube starts with
PT_INITIAL_ROOT_PASSWORDfromstore.json. On first boot PeerTube creates therootadmin with that password.
Configuration is passed entirely through environment variables. There is no production.yaml managed by the package. Key variables:
| Variable | Source |
|---|---|
PEERTUBE_DB_HOSTNAME |
localhost (hardcoded) |
PEERTUBE_DB_USERNAME |
peertube (hardcoded) |
PEERTUBE_DB_PASSWORD |
store.postgresPassword |
PEERTUBE_REDIS_HOSTNAME |
localhost (hardcoded) |
PEERTUBE_SECRET |
store.peertubeSecret |
PT_INITIAL_ROOT_PASSWORD |
store.adminPassword |
PEERTUBE_WEBSERVER_HOSTNAME |
parsed from store.primaryUrl |
PEERTUBE_WEBSERVER_PORT |
parsed from store.primaryUrl |
PEERTUBE_WEBSERVER_HTTPS |
parsed from store.primaryUrl |
PEERTUBE_TRUST_PROXY |
["loopback","uniquelocal"] (hardcoded) |
PT_INITIAL_ROOT_PASSWORD is only applied by PeerTube on the very first database initialization. After that it is ignored. Rotating the admin password requires PeerTube's web interface.
| Interface | Port | Protocol | Purpose |
|---|---|---|---|
| Web UI | 9000 | HTTP | PeerTube web application |
| Action | Visibility | Allowed When | Description |
|---|---|---|---|
| Set Admin Password | Enabled | Any | Shows stored root credentials. Generates on first call. |
| Set Primary URL | Enabled | Any | Pick which hostname PeerTube uses for video links and federation. |
Included in backup:
- PostgreSQL database (
pg_dumpviasdk.Backups.withPgDump()) mainvolume (uploads, config, store.json)
Restore behavior: pg_dump is restored into a fresh PostgreSQL instance. The main volume is restored in full including store.json (secrets carry over).
| Check | Method | Daemon |
|---|---|---|
| PostgreSQL | pg_isready -U peertube |
postgres |
| Valkey | valkey-cli ping |
valkey |
| Web Interface | Port listening (9000) | peertube |
The postgres and valkey checks are internal (display: null) and are only used for startup ordering. Only the Web Interface check is shown to the user.
None. PostgreSQL and Valkey run as sidecars within this package.
- RTMP live streaming not exposed — PeerTube supports RTMP on port 1935 for live streaming ingest, but StartOS does not currently support raw TCP port exposure. Live streaming via browser-based WebRTC still works.
- Admin password rotation —
PT_INITIAL_ROOT_PASSWORDonly applies on first DB init. Rotate via PeerTube's web interface (Admin → Users → root → Change password). - SMTP not pre-configured — Configure email via PeerTube's admin panel (Admin → Configuration → Email).
- No riscv64 support — The upstream
chocobozzz/peertubeimage is not published for riscv64.
The PeerTube container image is used unmodified (chocobozzz/peertube:v8.1.8). No patches are applied. All configuration is injected via environment variables.
See CONTRIBUTING.md for build instructions and development workflow.
package_id: peertube
containers:
peertube:
image: chocobozzz/peertube:v8.1.8
mounts:
- main/data -> /data
- main/config -> /config
postgres:
image: postgres:17-alpine
mounts:
- db -> /var/lib/postgresql
valkey:
image: valkey/valkey:9-alpine
architectures: [x86_64, aarch64]
ports:
ui: 9000
dependencies: none (postgres and valkey are sidecars)
store_json_keys:
adminPassword: root account password (generated by setAdminPassword action)
postgresPassword: internal postgres auth (generated on install)
peertubeSecret: JWT/session secret (generated on install)
primaryUrl: external URL for video links and federation
actions:
set-admin-password: show/first-set root credentials
set-primary-url: pick external URL
critical_tasks:
- set-admin-password: blocks startup until admin password is set
- set-primary-url: fires only if stored URL becomes unavailable