Add a computer as a worker
Another computer joins the same way a node joins a Kubernetes cluster: with a short-lived key and a fingerprint of the server’s certificate authority. Once joined, it runs both the Allspark worker (conversions, previews, analysis) and the media worker (streaming, scanning, tuners) for this server, as a background service.
This needs converting set to built in on the server (the default).
1. Make a key
Section titled “1. Make a key”In the web app: Workers → Add a computer. Or on the server:
naelox join-keyAdd --once for a key that works for one computer, and --server URL if other computers reach this server at a different address than the one it guesses.
The key lasts 24 hours and is reusable unless you passed --once. Only a hash of the secret is stored on the server.
2. Run the printed command on the other computer
Section titled “2. Run the printed command on the other computer”It looks like this:
curl -fsSL http://192.168.1.20:34200/join | sh -s -- \ --token 4tq8m1.x2k9p7v3c5n8b6z1 \ --ca-hash sha256:9c41e2…What the script does, in order:
- Fetches the server’s CA certificate and checks its SHA-256 against
--ca-hash. If they differ, it stops. - Downloads the
naeloxbinary for this computer from the server, over TLS pinned to that CA. - Runs
naelox join, which sends the key and a certificate request over that TLS connection and saves the signed certificate undernodein the data folder. - Installs a service that runs
naelox node: a systemd unit on Linux, a LaunchDaemon on macOS (a user unit or LaunchAgent without root).
Install ffmpeg on the new computer too; that is what the worker runs.
3. Check it
Section titled “3. Check it”The new computer appears in Workers within a minute, with its hardware and slots. Allspark’s Fleet page shows the same.
How it works
Section titled “How it works”- TLS on the same port. The server answers TLS and plain HTTP on port 34200. Workers use TLS with the certificate they were issued; browsers use plain HTTP on the LAN.
- Identity. A computer is recorded by its MAC address. Joining again replaces its record and certificate instead of adding a second one.
- Allspark stays private. The built-in Allspark listens only on loopback. The server proxies the handful of calls a worker needs and pins the worker id to the one in its certificate.
- Address changes. If the address for workers changes under Settings, each node notices within a minute and moves over once the new address answers with the same CA.
Removing a computer
Section titled “Removing a computer”Workers → remove. This revokes its certificate, drops its tunnel and deletes its Allspark worker. On the computer itself, naelox service uninstall removes the service.