Skip to content

Run Naelox in the background

naelox service install keeps Naelox running after the terminal closes and starts it at boot or login. It refuses to install while a foreground naelox serve still holds the port, or while the Mac menu bar app already manages Naelox; stop that first.

Terminal window
./naelox_darwin_arm64 service install

No sudo. It writes a LaunchAgent for your user and logs to logs/naelox.log in the data folder.

The Mac menu bar app does the same job with a menu: it shows the server’s name, version, how many are watching and how many workers are connected, and offers Open, Restart and Stop. Use one or the other, not both.

Terminal window
sudo ./naelox_linux_amd64 service install

This writes /etc/systemd/system/naelox.service. The unit runs naelox serve --headless as the user who ran sudo, with that user’s data folder, so a library set up in the terminal carries over. Logs go to journalctl -u naelox.

Without sudo, it installs a user unit instead, which runs while that user is logged in. To keep a user unit running without a login, enable lingering: loginctl enable-linger $USER.

Terminal window
naelox service status
naelox service start
naelox service stop
naelox service restart
naelox service uninstall

Units restart only on failure. A restart from Settings → Server re-executes in place, so the service manager does not see it exit. naelox service stop stays stopped until you start it again.

Settings → Server shows how the server was started on the Start at login row: systemd, launchd, or app for the menu bar app.

  • macOS: ~/Library/Application Support/Naelox/logs/naelox.log
  • Linux: journalctl -u naelox -f
  • Anywhere: naelox serve --log-file naelox.log writes everything, including the workers’ output, to that file under the data folder, and rotates it to .1 when it passes 10 MB.
Terminal window
naelox healthcheck && echo up

Exits 0 when the local server answers.