Your video library, your server, every screen. Self-hosted viewer with native TV and phone apps.
1.8K
Your video library, your server, every screen. MytView is a clean, fast player for a video
library you host yourself: video files plus their metadata sidecars (.info.json, or Kodi/Emby
.nfo for TV series and movies). Run this container on your NAS, home server or mini-PC and watch
in any browser, or with the native iPhone / iPad / Apple TV, Android / Google TV and
Samsung TV apps.
:ro; MytView never writes to, moves, or deletes your files.Website: https://mytview.com · Privacy: https://mytview.com/privacy/ · Source (GPL-3.0): https://github.com/fbartolini/mytview-server
# docker-compose.yml
services:
mytview:
image: fbartolini/mytview:latest
container_name: mytview
restart: unless-stopped
ports:
- "8700:8700"
environment:
ALLOW_SIGNUP: invite # first account becomes the owner
# ORIGIN: https://mytview.example.com # only behind a reverse proxy / TLS
volumes:
- /path/to/your/library:/media:ro # your video library, READ-ONLY
- mytview-data:/data # accounts + watch state + index (keep this)
# - /path/to/scratch:/transcodes # live-transcode segments + image cache (optional)
volumes:
mytview-data:
docker compose up -d
Open http://your-host:8700 and sign up: the first account becomes the owner. Then add your
libraries under Admin → Libraries (a folder, a format: channels, series or movies). After that,
signup needs a single-use invite unless ALLOW_SIGNUP=all.
| Container path | Purpose | Notes |
|---|---|---|
/media | Your video library | Mount read-only (:ro). MytView never modifies it. |
/data | Accounts, sessions, watch state, the index | Durable: back this up. The index rebuilds from disk; your users and progress do not. |
/transcodes | Scratch for live-transcode segments and the image cache | Optional but recommended. Segments exist only while someone is watching and are swept on idle and at start-up. Never inside your library. |
| Variable | Default | Purpose |
|---|---|---|
ALLOW_SIGNUP | invite | invite (first account = owner, then invite-only), all (open signup) or off. |
ALLOW_INVITES | owner | Who may create invite links: owner or all. |
ORIGIN | Your external URL. Set only behind a reverse proxy / TLS. | |
EXTERNAL_URL | The address other MytView servers reach you at, if it differs from what the app can derive (federation only). | |
TRANSCODE_HWACCEL | 0 | 1 enables Intel VAAPI hardware encoding (needs /dev/dri passed through, amd64). Falls back to CPU automatically. |
HLS_DIR | /transcodes/hls | Where live-transcode segments are written. off disables live transcoding entirely (files then play only where the device can decode them). |
HLS_MAX_SESSIONS | 3 (6 with hardware encoding) | Concurrent live encodes. Raise it if your CPU or GPU keeps up (the About page shows encoder use). |
HLS_MAX_COPY_SESSIONS | 4 | Concurrent stream-copy sessions (remux only, no encoder): what the apps' offline downloads of H.264 files use. |
IMAGE_CACHE_DIR | /transcodes/imgcache | Resized artwork for the apps. off serves originals. |
SCAN_INTERVAL | 300 | Seconds between library rescans (0 = only on start and on demand). |
Baked into the image (override only if you must): PORT=8700, HOST=0.0.0.0,
MEDIA_ROOT=/media, DB_PATH=/data/index.db, TRANSCODE_DIR=/transcodes, and
KEEP_ALIVE_TIMEOUT=65 / HEADERS_TIMEOUT=66 (idle connections stay open longer than a reverse
proxy's upstream keep-alive, so the proxy never reuses a connection the server just closed — if
your proxy keeps upstream connections longer than 60 s, raise both to match).
environment:
TRANSCODE_HWACCEL: "1"
devices:
- /dev/dri:/dev/dri
Behind a reverse proxy, allow at least 60 s of read timeout on /hls/ (a first segment of a cold
transcode can take a while; the server itself never holds a request beyond ~45 s, and answers
503 + Retry-After when it needs the client to come back later).
Live transcoding is on by default and only runs when a device cannot play a file directly. Without
a GPU it uses the CPU (libx264); on arm64 it is CPU-only. Check the container's VA stack with
docker exec mytview vainfo.
docker compose exec mytview node scripts/set-password.mjs <username>.latest, and one tag per release (0.4.7, ...).The first visit shows Sign up: create the owner account, add a library, and the index builds in
the background (you can browse while it fills). Point the mobile and TV apps at the server address
and sign in with the same account. Rescan any time from the web UI (or POST /api/scan).
Content type
Image
Digest
sha256:d9d7d69e2…
Size
264.1 MB
Last updated
about 1 month ago
docker pull fbartolini/mytview