Overview
OwnTube is a YouTube client you host yourself. One server runs the web app and a gateway that talks to YouTube; the web app, the TV app and the iPhone app all connect to that server.
How it fits together
browser / TV / iPhone
│
▼
reverse proxy (optional)
├── /media/* ──▶ gateway :8080 ──▶ YouTube
└── the rest ──▶ web app :3000
│
└── SQLite (accounts, history, subscriptions, settings)
Web app
A Next.js application. It holds accounts, subscriptions, history, playlists, the recommender and all settings, stored in a single SQLite file. It decides what to play and signs the playback URLs the gateway will accept.
Gateway
A separate Node.js process that does everything that touches YouTube: video and channel metadata, stream manifests (DASH and HLS), media segments, captions and thumbnails. It keeps a cache of metadata and images on disk. Keeping it apart from the web app means a web app restart does not cut running streams.
The gateway only serves URLs signed with GATEWAY_SIGNING_KEY, a secret it shares with the web app, so it cannot be used as an open proxy.
Clients
- Web: any modern browser, installable as a PWA.
- Apple TV, Android TV and Fire TV: a native app that uses the server's API. See TV apps.
- iPhone and iPad: a native shell around the web app with background playback and Picture-in-Picture. See iPhone and iPad.
Requirements
- A Linux host (or macOS) with Docker and Docker Compose v2.
- About 1 GB of RAM for both containers, more if you enable the PO-token browser.
- Disk for the database (small) and the gateway's image cache (1 GB by default).
- An outbound internet connection. A residential IPv4 address works best; see Troubleshooting for hosts that YouTube rate-limits.
No Google account, API key, Invidious or Piped instance is needed.
Next steps
- Install OwnTube with Docker Compose.
- Put it behind a reverse proxy with HTTPS if you want to reach it from outside your network or use the iPhone app.
- Install the TV app.