Installation
OwnTube runs as two containers, the web app and the gateway, built from source with Docker Compose. Most of the time goes into the first build.
-
Get the code
Terminal window git clone https://github.com/mdbraber/owntube.gitcd owntube -
Create the secrets
OwnTube needs two random secrets in a
.envfile next todocker-compose.yml:Variable Used for AUTH_SECRETSigning login sessions. GATEWAY_SIGNING_KEYSigning playback URLs. Shared by the web app and the gateway; at least 32 characters. Terminal window printf 'AUTH_SECRET=%s\nGATEWAY_SIGNING_KEY=%s\n' \"$(openssl rand -base64 48)" "$(openssl rand -base64 48)" > .envchmod 600 .envKeep both values. A new
AUTH_SECRETsigns everyone out; a newGATEWAY_SIGNING_KEYinvalidates playback URLs already handed out. -
Build and start
Terminal window docker compose up -d --buildThe Unraid compose file keeps data under
/mnt/user/appdata/owntube.Terminal window cp apps/web/env.unraid.example .env.unraid# set AUTH_SECRET, GATEWAY_SIGNING_KEY and AUTH_URLdocker compose -f docker-compose.unraid.yml --env-file .env.unraid up -d --buildThe gateway starts first. The web app waits until the gateway reports healthy, applies its database migrations and listens on port 3000. Follow it with:
Terminal window docker compose psdocker compose logs -f app gateway -
Create your account
Open
http://<server>:3000/register. Everyone who uses the server gets their own account. -
Bring your history
Under Settings → Import & export, import
watch-history.jsonorwatch-history.htmlfrom a Google Takeout export of YouTube. The recommender uses it right away.Subscribe to channels from their channel pages. Moving from another OwnTube server? Import its JSON export on the same page.
Where the data lives
Section titled “Where the data lives”| Volume | Contents |
|---|---|
owntube-data |
The SQLite database (owntube.db) and TV releases. Back this up. |
owntube-gateway |
The gateway’s metadata and image cache. Safe to delete; it is rebuilt. |
To keep the data in a host directory, replace the named volumes with bind mounts, as docker-compose.unraid.yml does. A bind-mounted gateway directory must be writable by the container’s node user (uid 1000).
Next steps
Section titled “Next steps”- Put the server behind a reverse proxy with HTTPS.
- Install the TV app or the iPhone app.
- Set up backups.