Getting Started
This guide walks you through running NukeVideo locally for development with Docker, and then through a production install.
Prerequisites
The local stack is defined in compose.yml, Traefik included: it routes every service under *.nukevideo.localhost and needs port 80 free.
Quick Start
git clone https://github.com/xdelirio/nukevideo.git
cd nukevideo
cp .env.example .env # then set AWS_ENDPOINT, see "Local .env" below, before going on
docker compose up -d --buildOn every up, the one-shot nukevideo-init service installs the PHP dependencies, generates APP_KEY while .env has none, and runs the migrations; the API, Horizon and the scheduler start once it has finished. Its log is docker compose logs nukevideo-init.
Local .env
.env.example already holds working values for the development stack: the panel and the API on http://nukevideo.localhost (Traefik sends /api to Laravel and the rest to Vite, so the session cookie needs nothing else), the db and redis services, and the bundled RustFS with its default credentials. One value is yours to fill in, before the first docker compose up:
AWS_ENDPOINT=http://<your machine's LAN IP>:9000. Upload URLs are signed for this address and the browser sends the file straight to it, so it has to work from the browser, from the containers and from any node you deploy:http://rustfs:9000only resolves inside compose, andlocalhostinside a container is the container. If port 9000 is taken, setAWS_PORTand use that port here.
Change DB_PASSWORD before the first start if you like: MariaDB is initialised with it, and later changes do not reach an existing database.
docker compose up also runs rustfs-init, a one-shot container that creates the bucket and sets the CORS the browser's uploads need. It runs on every up and leaves a configured bucket as it was. If it exits with an error, the AWS_* keys do not match RustFS's.
Nothing else is configured on the bucket: the API learns that an upload finished when it completes it.
First Login
Open the panel (see the URL below). While the instance has no user it shows a setup screen instead of the login, and the account created there is the administrator, with a default project. It is the same screen a production install opens on (see Production).
Nodes in development
The stack runs the panel and what it needs. Videos are encoded by worker nodes and played back through proxy nodes, which are deployed over SSH exactly as in production: on this machine, or on any other you can reach. Set them up once, in this order.
The node images. A node never builds: it runs
nukevideo:node-devandnukevideo-proxy:node-dev, whichbin/push-node-devbuilds from the checkout. Run it on the host:bin/push-node-devalone is enough for nodes on this machine: they use the images it built.bin/push-node-dev user@hostalso loads them into another machine over SSH, for nodes there.- With
DOCKER_REGISTRYset in.env, it pushes them to that registry too, and nodes pull from it (over plain HTTP, every machine involved needs it underinsecure-registriesin/etc/docker/daemon.json). Optional, and only worth it for nodes on several machines.
Run it again after every change you want a node to run, and redeploy the node.
SSH access. Under Nodes → Access, generate the panel's key and add its public line to
~/.ssh/authorized_keysof the user each node connects as: any user, as long as it is root or has passwordless sudo (Prerequisites). The panel runs in a container, so it reaches this machine at its LAN IP, never atlocalhost.Addresses the nodes can reach. Names like
db,redisandnukevideo.localhostonly resolve inside the stack. Under Nodes → Environment, setDB_HOSTandREDIS_HOSTto this machine's LAN IP (compose publishes both ports), and in.envsetINTERNAL_API_URL=http://<LAN IP>:8089, where compose publishes the API: the edges ask it for the master manifests. See Database and Redis for the nodes.A worker. Create one with the LAN IP of the machine it runs on, and deploy it. The first worker also hosts the chunk store, on port 9000 of its address. On this machine that port is the stack's RustFS (
AWS_PORT): move one of them, eitherAWS_PORT=9010(withAWS_ENDPOINTto match) or the chunk store address<LAN IP>:9009under Nodes → Environment.Delivery. Under CDN → Delivery, set the token secret (
openssl rand -hex 32). Under CDN → Domains, addcdn.nukevideo.localhost: on plain HTTP it needs no certificate and no Cloudflare, and the browser resolves it to this machine. Add it before the proxy, whose deploy reads the domains.A proxy. Create it with the LAN IP and deploy it; a development panel ticks none of the host's disks, so the cache goes to a Docker volume. On this machine the stack's Traefik holds port 80: the edge sees it, joins the
traefiknetwork and serves behind it, routed by the CDN domains. On another machine, make the domain resolve to that machine instead (DNS, or itshostsfile).
Then upload a video from the Videos page: the development stack gives the first project a template, so nothing else is needed.
Local URLs
Traefik publishes each service under a *.nukevideo.localhost hostname (these resolve automatically, no /etc/hosts edits needed):
| Service | URL |
|---|---|
| Admin SPA | http://nukevideo.localhost |
| API (Laravel) | http://nukevideo.localhost/api (also published directly on http://localhost:8089) |
| Docs | http://docs.nukevideo.localhost |
| Adminer (DB UI) | http://adminer.nukevideo.localhost |
| RustFS S3 API | http://s3-data.nukevideo.localhost |
| RustFS console | http://s3-ui.nukevideo.localhost |
| RedisInsight | http://redis.nukevideo.localhost |
| Traefik dashboard | http://localhost:8080 |
Production
Release images are published to Docker Hub on every v* tag (chikenare/nukevideo, chikenare/nukevideo-proxy, for linux/amd64 and linux/arm64). compose.prod.yml runs the core stack from them: the API (which also serves the admin panel), Horizon, the scheduler, MariaDB and Redis. It is not compose.yml, which is the development stack, so name it with -f on every command.
git clone https://github.com/xdelirio/nukevideo.git && cd nukevideo
cp .env.example .env # then edit it, see the checklist below
echo "base64:$(openssl rand -base64 32)" # paste into APP_KEY
# Pin a release in .env too: TAG=X.Y.Z (the version, without the `v` of the git tag).
# Unset, every command pulls `latest`, which moves under you.
docker compose -f compose.prod.yml up -dCompose reads TAG from the .env next to compose.prod.yml, so keeping it there rather than exporting it in one shell makes every later command run the same version.
Then open APP_URL. While the instance has no user, the panel shows a setup screen instead of the login, and the account created there is the administrator. Setup closes for good as soon as that account exists. Until then whoever reaches the panel first becomes the admin, so create it right after the first start. Every other account is created by an admin from the panel's Users page.
The API container runs the migrations itself every time it starts, so there is no separate migrate step. Set APP_KEY before the first start: the migrations store encrypted settings.
compose.prod.yml publishes the API on port 8080 (API_PORT) over plain HTTP. Put a TLS-terminating reverse proxy in front of it; the panel's session cookie is only safe over HTTPS.
.env checklist
| Variable | Value |
|---|---|
APP_ENV / APP_DEBUG | production / false. Debug mode prints stack traces, and with them configuration, to anyone who triggers an error. |
APP_KEY | The openssl output above. It encrypts the stored SSH key, the Cloudflare token, the Tailscale key and the CDN certificates' private keys: keep a copy, because a lost key makes them unreadable. |
APP_URL | The public HTTPS URL you open the panel at, which is also the API's (https://video.example.com). The panel signs in with a session cookie that is only honoured for this host, so opening it at another address (the server's IP, a second domain) logs you in to nothing; add those to SANCTUM_STATEFUL_DOMAINS. |
DB_HOST / REDIS_HOST | db / redis, the service names in compose.prod.yml. Those names only resolve inside it, and the worker nodes need the database and Redis too: see Database and Redis for the nodes before deploying one. |
REDIS_PASSWORD | A strong password. compose.prod.yml refuses to start without one: the workers reach Redis over the network, and anyone who reaches it unauthenticated can put jobs on the queues. |
DB_PASSWORD | A strong password. The MariaDB container is initialised with it, as the root password as well. |
INTERNAL_API_SECRET | A random value, e.g. openssl rand -hex 32. |
AWS_* | Your S3 bucket and credentials (see S3 Storage). The bucket also needs a CORS rule for the panel's uploads, described there. |
TAG | The release to run (X.Y.Z). Read by Compose, not by the application. |
SESSION_SECURE_COOKIE | true, so the session cookie is never sent over plain HTTP. |
The full reference is on the Configuration page.
The admin panel
The API image serves the panel at the root of APP_URL, on the same origin as the API, so there is nothing else to deploy: open APP_URL, sign in with the admin you created, and continue with Nodes — workers to encode, proxies to deliver.
Delivery
Viewers reach the proxies through CDN domains you own, not through a name per server. Before deploying the first proxy:
- Register a domain for the CDN alone (
examplecdn.com), in a Cloudflare zone — why its own. - Store a Cloudflare API token with
Zone → Zone → ReadandZone → DNS → Editon that zone, under CDN → Cloudflare. It keeps the domain's records pointing at the proxies and answers the DNS challenge of the certificate the API issues for it. - Add the domain under CDN → Domains, and a second one on another registrar as a fallback if you can.
- Put the proxies on one private network and set each one's private address, so they share one cache; open
80and443to everyone and8090to the other proxies only.
The rest is automatic: records, certificates and renewals, and every proxy serving every domain. See CDN & Delivery.
Upgrading
The panel's sidebar says when a newer release is out (a build from source, whose version is dev, never does). Set TAG in .env to the new version, then:
docker compose -f compose.prod.yml pull
docker compose -f compose.prod.yml up -dThe API runs the new migrations as it starts. Nodes pull the version the panel runs, so they move to it when redeployed, once the API is up: Deploy selected on the nodes page. Read the release notes first: an upgrade that changes how nodes work says what to do and in which order.
Next Steps
- What is NukeVideo? — Architecture overview.
- Video Processing — The encoding pipeline.
- Templates — Define encoding configurations.
- Streaming & VOD — How packaged content is served.
- Nodes — Add worker and proxy nodes.
- CDN & Delivery — How proxy nodes deliver and protect playback.
- Configuration — Environment variables.
- API Reference — Start integrating with the API.