1. Server Setup
Admin This chapter is for whoever runs the server.
ShieldCinema is distributed as a private, self-contained Docker container, which is the supported way to run it. Running from source is described afterwards, for developers.
Containerized Deployment (recommended)
Requirements
- A Linux host with Docker Engine 20.10+ and Docker Compose v2
- Your media on a local or network-attached drive. A NAS over SMB/NFS is fine: mount it on the host and the container bind-mounts the host path, or let the server mount it for you (see Storage under The Admin Pages below)
- Access granted by the owner: the repository and image are private (see Getting access below)
- A GitHub Personal Access Token with the
read:packagesscope, to pull the private image
Getting access
ShieldCinema is invite-only. Send the owner your GitHub username; they add you to the repository and the container package. Then create a classic token at GitHub → Settings → Developer settings → Personal access tokens, with the read:packages scope checked.
Bring it up
# 1. Get the compose file + env template (clone the private repo)
git clone https://github.com/Publicus42/shieldcinema-server.git
cd shieldcinema-server
cp .env.example .env
$EDITOR .env # set MEDIA_PATH (your media folder), optionally TMDB_API_KEY
# 2. Log in to GHCR once so Docker can pull the private image
echo <YOUR_PAT> | docker login ghcr.io -u <your_github_username> --password-stdin
# 3. Pull the prebuilt image and start
docker compose pull
docker compose up -d
# 4. Grab the setup code (printed at every start)
docker logs shieldcinema | grep -A1 "Setup Code"
# Setup Code: SHLD-XXXX-XXXX
The full step-by-step install is the Install Guide, at http://<host_ip>:8080/install on every server. Then install the app on your Shield from http://<host_ip>:8080/apk. On the Connect to Server screen, pick your server and, the first time only, choose Connect without setup code to create the owner profile. At home any device can also use Connect without setup code; the setup code pairs a device as one of the owner’s trusted devices (see section 2). The setup code is also shown on the server’s http://<host_ip>:8080/setup page, from the home network only. All persistent state (database, thumbnails, caches, trailers, device tokens) lives in the shieldcinema-data Docker volume and survives restarts and image updates.
Configuration is through .env and the browser admin pages at http://<host_ip>:8080/admin (see below). Key .env values:
| Variable | Required | Description |
|---|---|---|
MEDIA_PATH | Yes | Your media folder, with one folder per kind inside (Movies, Shows, Music…). Read-only inside ShieldCinema as /media/library; each folder is added as a library at /admin/libraries |
LIBRARIES | No | Declare libraries instead: type:DisplayName:/container/path[, …] (types: movie, tv, videos, music, tracker, demos) |
TMDB_API_KEY | No | TMDB metadata enrichment (free at themoviedb.org) |
REMOTE_URL | No | Your Cloudflare Tunnel hostname, if any |
SERVER_PORT_HOST | No | Host port to publish (default 8080) |
COMPOSE_FILE | No | Which add-ons to use, e.g. docker-compose.yml:docker-compose.nvidia.yml (NVIDIA), …:docker-compose.storage.yml (Storage page), …:docker-compose.cloudflare.yml (remote access) |
CLOUDFLARE_TUNNEL_TOKEN | No | Your tunnel’s token, with the Cloudflare add-on (section 20) |
MODARCHIVE_API_KEY | No | Mod Archive details for tracker modules; read at the first start |
GPU transcoding is optional. Switch on the NVIDIA add-on (NVENC; needs the NVIDIA Container Toolkit) or the Intel add-on (Quick Sync) with the COMPOSE_FILE line in .env; the Install Guide’s Graphics chapter shows how. Software encoding (libx264/libx265) is the default. With an NVIDIA card you can also turn on GPU decoding, which makes 4K HDR conversions much faster; see Transcoding on the Dashboard below.
Updating
docker compose pull && docker compose up -d
The shieldcinema-data volume is kept, and database updates run automatically on the next start.
Privacy note: a fresh install contacts no metadata service. Adding TMDB_API_KEY turns on TMDB, and with it IMDb Parents Guide advisories and YouTube trailers. MusicBrainz (and with it Cover Art Archive) needs MUSICBRAINZ_ENABLED=true, and Mod Archive needs MODARCHIVE_API_KEY; both are read at the first start. There is no on/off switch for these in the apps. Find album art… (an admin’s choice, one album at a time) also asks Apple (iTunes) and Deezer, sending only the search words for that album (its artist and title, or words you type); Find a photo… for an artist sends Deezer the artist’s name (or your words); it follows MusicBrainz unless you set Search Apple and Deezer for album art yourself (web app: Settings → Server settings).
Running From Source (developers)
Requirements
- Any x86 machine (Windows, Linux, macOS) with network access to your media files
- FFmpeg installed and in PATH
- Rust 1.88+
cd shieldcinema-server
(cd web-client && npm ci && npm run build) # the web app at /app is built into the server
LIBRARIES="movie:Movies:/path/to/movies,tv:Shows:/path/to/tv" cargo run
The LIBRARIES environment variable defines your first libraries in the format type:name:path. Supported types: movie, tv, videos, music, tracker, demos. Add more later from the admin pages or the Shield’s Settings → Manage Libraries.
Environment Variables
| Variable | Description | Default |
|---|---|---|
LIBRARIES | Comma-separated library definitions | (none) |
TMDB_API_KEY | TMDB API key for metadata (also read from .env) | (none) |
HTTPS_PORT | Enable HTTPS on this port | (off) |
TLS_CERT / TLS_KEY | Custom TLS certificate paths | (generated automatically) |
MEDIA_ROOT | Where the admin pages’ folder browser starts | /media/library in the container, /media from source |
ENABLE_STORAGE_MANAGER | 1 turns on the Storage admin page (network shares); the storage add-on sets it | (off) |
SERVER_PORT | Port the server listens on | 8080 |
DATABASE_URL | Where the database lives | the data folder |
BACKUP_DIR | Where backups go when kept in ShieldCinema’s data | the data folder |
MUSICBRAINZ_ENABLED | true turns on MusicBrainz and Cover Art Archive (first start) | (off) |
MODARCHIVE_API_KEY | Mod Archive details for tracker modules (first start) | (none) |
GEOIP_DB | Location database for the device list | (built in) |
TZ | Time zone (holiday themes, nightly backups) | the host’s |
RUST_LOG | Log detail, e.g. info | info |
TMDB API Key
Create a free account at themoviedb.org and generate an API key. Put it in the .env file:
TMDB_API_KEY=your_key_here
This turns on automatic metadata: posters, backdrops, ratings, genres, cast, episode details and the “Not in your library” search results.
Server Port
The server listens on port 8080 by default (the container can publish it on another host port with SERVER_PORT_HOST). Make sure your firewall allows that port from your Shield and other devices on the home network.
The Admin Pages (/admin) Admin
The server has its own small set of web pages at http://<server-ip>:<port>/admin, for managing it from any computer on your home network, without a Shield.
- Home network only. From outside your home the pages don’t open.
- No separate sign-in. On the home network a browser with no ShieldCinema sign-in is treated as the owner, so keep your home network private. If this browser is signed in to the web app as a profile that isn’t an admin, or Require sign-in on the home network too is on, sign in to the web app as an admin first.
- The menu at the top has Dashboard, Libraries, Storage, Devices, Security log and Diagnostics. The footer shows the server version and “LAN-only admin · no telemetry”.
Dashboard
- Count cards: Libraries (with Manage libraries →), Paired devices (active devices only, with Manage devices →) and Users.
- Server table: name, version, movies indexed, shows indexed and the Setup code (shown in full; the code new devices use to pair, see section 2).
- Transcoding: a switch for GPU hardware-accelerated decoding (NVIDIA). It is the same setting as Use GPU hardware decode for transcoding in the web app’s server settings. The line under it tells you where you stand:
| Status line | Meaning |
|---|---|
| “No NVIDIA GPU detected — software decoding is used (works everywhere).” | The switch is greyed out |
| “On: 4K/HDR transcodes decode on the GPU, with automatic software fallback if the GPU is busy.” | GPU decoding is on |
| “Off: all transcoding uses software decoding. Turn on to speed up 4K/HDR playback.” | GPU decoding is off (the default) |
Libraries
- A table of your libraries: Name, Type, Path, Items (movies, shows, songs, modules or clips) and a Remove button. It refreshes every 5 seconds, so Items counts up while a new library is scanned. Remove asks first (“Its scanned items will be cleared”); files on disk are never deleted.
- Add a library:
- Browse to the folder. The browser lists the current folder’s subfolders, with .. (up one level) at the top; hidden folders are skipped. It starts in the media root (
/media/libraryin the container). - Enter a Display name (required) and check the Type: movie, tv (shows), videos (home videos), music, tracker or demos. It is pre-picked from the folder’s name (a folder called TV, Shows or Series picks tv, Music picks music, and so on).
- Press Add this folder as a library. The library is added and scanned straight away; a large library’s first scan can take an hour or more. Adding a folder that is already a library does nothing, and a folder that doesn’t exist gives Path is not an existing directory.
- Browse to the folder. The browser lists the current folder’s subfolders, with .. (up one level) at the top; hidden folders are skipped. It starts in the media root (
Storage
Mounts network shares (SMB or NFS) so you can turn them into libraries without setting up mounts on the host yourself.
- Turning it on: add the storage add-on to the
COMPOSE_FILEline in.env(for exampleCOMPOSE_FILE=docker-compose.yml:docker-compose.storage.yml), thendocker compose up -d. Drives already mounted on the host under/mntalso appear, read-only, at/media/hostmountsin the folder browser. - Shares table: Name, Type (SMB/NFS, plus “ro” when read-only), Source (
//server/share), Mount folder and Status (mounted / unmounted), with Mount, Unmount (asks first) and Remove (asks, and unmounts first). - Add a network share:
| Field | Notes |
|---|---|
| Name | Required. The share is mounted at /media/mounts/<name> |
| Type | SMB or NFS |
| Server | Required: the NAS’s name or address |
| Share / export | Required, e.g. Movies (SMB) or /volume1/movies (NFS) |
| Username, Password | Leave blank for guest access |
| Subfolder | Optional |
| Extra mount options | Optional, e.g. vers=3.0 |
| Mount read-only (recommended for media) | On by default |
Add & mount share saves the share and tries to mount it. If mounting fails, fix the details and press Mount to try again. Once it’s mounted, add it as a library on the Libraries page by browsing into its mount folder.
Devices
The “break-glass” place for device access, usable even when no Shield or approved browser is at hand.
- Remote device trust: shows ON or OFF with a button, Turn off (allow all remote devices) or Turn on (require approval). This is the same setting as Require device approval for remote sign-ins in the web app (see section 20).
- Invite codes: generate a code (“Valid 24h, single use”, shown only once). A table lists codes with Created, Expires, Status (used / unused) and Delete.
- Device table:
| Column | Shows |
|---|---|
| Device | Its name, system and app version, and the pairing number while it waits |
| User | The profile it signed in as |
| Trust | trusted, pending, blocked or revoked |
| Last seen / IP | When it was last used, its IP address and approximate location |
- Actions: a waiting device has Approve (asks you to check the pairing number) and Deny. Other active devices have Revoke (“It will need to sign in again”). Every active device has Block (“It will be denied until unblocked”). Deny revokes the device rather than blocking it, so it can ask again.
- A blocked device has Unblock (“It will be allowed in again”), which lets it straight back in.
The same list, with the same actions, is also in the web app (You → Devices) and on the Shield (Settings → Users & Security → Devices), which work from anywhere (section 20).
Security log
The newest 300 security events, with When, Event, User, IP (and location) and Details:
- Red (worth a look): failed PINs, lockouts, blocked or denied devices, failed pairings.
- Green: successful PINs and sign-ins, approved devices, used invite codes, paired devices.
- Grey: everything else.
Diagnostics
Problem reports sent from players, and what the server did for each play, kept for 14 days:
- Problem reports: When, Profile, Kind (Report from the flag in the player, or Detailed from Detailed diagnostics), Where (Home or Away), Browser, Note and Events, with Open and Download (as text). See Report a problem in section 23.
- Playback log: each play’s events (how it started, seeks, slow or missing pieces, failures, stops), filtered by Profile (Everyone or one profile) with Show. Failures are shown in red, good starts in green.