Installation
OwnTube runs as two containers, built from source with Docker Compose. Installing takes a few minutes, most of it the first build.
1. Get the code
git clone https://github.com/mdbraber/owntube.git
cd owntube
2. Create the secrets
OwnTube needs two random secrets in a .env file next to docker-compose.yml:
| Variable | Used for |
|---|---|
AUTH_SECRET | Signing login sessions. |
GATEWAY_SIGNING_KEY | Signing playback URLs, shared by the web app and the gateway. At least 32 characters. |
printf 'AUTH_SECRET=%s\nGATEWAY_SIGNING_KEY=%s\n' \
"$(openssl rand -base64 48)" "$(openssl rand -base64 48)" > .env
chmod 600 .env
Keep both values. Changing AUTH_SECRET signs everyone out; changing GATEWAY_SIGNING_KEY invalidates playback URLs that are already handed out.
3. Build and start
docker compose up -d --build
The gateway starts first; the web app waits until the gateway reports healthy, then runs its database migrations and starts on port 3000. Check the state with:
docker compose ps
docker compose logs -f app gateway
4. Create an account
Open http://<host>:3000/register and create the first account. Each person who uses the server gets their own account, with separate history, subscriptions and recommendations.
Registration is open to anyone who can reach the server. Keep OwnTube on your home network or a VPN, or put it behind an authenticating proxy, unless you want others to be able to sign up.
5. Bring your data
- Subscriptions: subscribe from any channel page, or import a JSON export from another OwnTube server under Settings → Import & export.
- Watch history: import
watch-history.jsonorwatch-history.htmlfrom a Google Takeout export under Settings → Import & export. The recommender uses it from the start, so recommendations are useful from day one.
Data and volumes
| Volume | Contents |
|---|---|
owntube-data | The SQLite database (owntube.db) and TV release files. Back this up. |
owntube-gateway | The gateway's metadata and image cache. Safe to delete; it is rebuilt. |
To keep data in a host directory instead, 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).
Unraid
Use docker-compose.unraid.yml with an env file based on apps/web/env.unraid.example. It stores data under /mnt/user/appdata/owntube:
cp apps/web/env.unraid.example .env.unraid # set AUTH_SECRET, GATEWAY_SIGNING_KEY, AUTH_URL
docker compose -f docker-compose.unraid.yml --env-file .env.unraid up -d --build