Daemon mode

Run Labyrinth in the foreground, as a background daemon, or as a systemd service — the same binary either way.

Foreground

sudo labyrinth -config labyrinth.yaml

Background daemon

sudo labyrinth -config labyrinth.yaml daemon start
sudo labyrinth -config labyrinth.yaml daemon status
sudo labyrinth -config labyrinth.yaml daemon stop

Or with the config block in labyrinth.yaml:

daemon:
  enabled: false
  pid_file: "/var/run/labyrinth.pid"

Flags go before the command

Go’s flag parser stops at the first non-flag argument, so flags placed after daemon are not applied. This starts with your custom config:

labyrinth -config /etc/labyrinth/labyrinth.yaml daemon start

systemd

The install script sets up a systemd service that starts Labyrinth automatically. Binding :53 needs privileges — the service handles that for you; running manually, either start as root or grant the binary the CAP_NET_BIND_SERVICE capability (standard Linux practice for privileged ports).

Signals

SignalAction
SIGINT / SIGTERMGraceful shutdown
SIGUSR1Flush the cache
SIGUSR2Dump cache stats to the log
SIGHUPConfig reload notification

Source: the project README. The capability note is general Linux practice, not project documentation.