OwnTube

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

Requirements

No Google account, API key, Invidious or Piped instance is needed.

Next steps

  1. Install OwnTube with Docker Compose.
  2. Put it behind a reverse proxy with HTTPS if you want to reach it from outside your network or use the iPhone app.
  3. Install the TV app.