Skip to content

Run headless, in Docker or Kubernetes

naelox serve --headless never opens a browser. It listens on every interface and prints the setup link with the machine’s network addresses (skipping loopback, Docker and VPN interfaces), so setup can be finished from another computer.

Terminal window
./naelox_linux_amd64 serve --headless

naelox service install on Linux writes a unit that runs headless, so this is the normal mode on a server. Everything else is the same as a desktop install.

There is no official Naelox image yet. The binary is static and runs in any image that has ffmpeg, so a container is a short Dockerfile:

FROM debian:trixie-slim
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg ca-certificates && rm -rf /var/lib/apt/lists/*
COPY naelox_linux_amd64 /usr/local/bin/naelox
RUN chmod +x /usr/local/bin/naelox
ENV DATA_DIR=/data
EXPOSE 34200 34200/udp
VOLUME ["/data"]
ENTRYPOINT ["naelox", "serve", "--headless"]
Terminal window
docker build -t naelox .
docker run -d --name naelox \
-p 34200:34200 \
-p 34200:34200/udp \
-v naelox-data:/data \
-v /srv/media:/srv/media:ro \
--device /dev/dri \
naelox
docker logs naelox # the setup link is here

Notes:

  • Mount media at the same path inside the container that you will browse to in setup. The built-in worker sees the container’s filesystem.
  • --device /dev/dri gives the worker Intel or AMD hardware encoding through VAAPI. Leave it out for software only.
  • The Allspark queue, SQLite file and caches live under /data. Keep that volume.
  • To use Postgres, set DATABASE_URL on the container before its first start, or move later from Settings. See Move from SQLite to Postgres.

Everything lives in the data folder unless you say otherwise. To see the folders a server will use, without starting it:

Terminal window
naelox serve --print-paths

It lists seven kinds of data, each with the variable that moves it: the database (DATABASE_URL), settings (DATA_DIR), the image cache (IMAGE_CACHE_DIR), the generated-file cache for previews and thumbnails (PREVIEW_CACHE_DIR), the subtitle cache (SUBTITLE_CACHE_DIR), temporary work (WORK_DIR) and logs (LOG_DIR). Settings → Storage shows the same list.

For example, to keep previews on an SSD and leave the rest where it is:

Terminal window
PREVIEW_CACHE_DIR=/mnt/ssd/naelox-previews naelox serve --headless

Changing a variable does not move files that are already there. Stop the server, move the folder, then start it with the variable set. The caches can also be left behind; Naelox fills them again.

Naelox reports how busy it is: playback sessions, connected workers, Allspark’s queue, database connections, and request counts and timings. Nothing is sent or exposed until you turn one of these on.

Push (OpenTelemetry). Point the server at a collector:

Terminal window
OTEL_EXPORTER_OTLP_ENDPOINT=http://collector.local:4318 naelox serve --headless

SigNoz accepts this as it is. The push is OTLP over HTTP. Telegraf’s opentelemetry input only accepts gRPC, so for Telegraf and InfluxDB use the scrape below.

Scrape (Prometheus format). Give the server a second address to serve /metrics on:

Terminal window
METRICS_ADDR=127.0.0.1:9464 naelox serve --headless
curl http://127.0.0.1:9464/metrics

Telegraf’s prometheus input (for InfluxDB), a Prometheus server or an OpenTelemetry collector can read that page. It is never served on port 34200, and it has no password, so use an address only your collector can reach.

You can set both. They carry the same numbers.

The same image works as a Deployment with one replica (SQLite allows one process; move to Postgres if you want more than one), a PersistentVolumeClaim for /data, a volume for the media, and a Service on 34200. Workers on other machines join through the normal Add a computer flow, so the Service must be reachable from them at the address you set under Settings → Server → Address for workers.

A worked example with manifests is planned once the first release is out.