Skip to main content

Running as a service

zs-proxy proxy start backgrounds a self-managed daemon, but that daemon doesn't survive a reboot and isn't restarted if it crashes. If you want the proxy to just always be there — so your editor or agent can rely on it being up — register it as an OS service instead.

zs-proxy proxy install-service # register + enable, using your current config
zs-proxy proxy install-service --network mainnet # pin a --network/--config/--port at install time
zs-proxy proxy install-service --print # preview what would be installed, without installing
zs-proxy proxy uninstall-service # stop + remove it

This registers a launchd LaunchAgent (macOS), a systemd user unit (Linux), or a Windows service — running the proxy itself in the foreground, with its path and flags baked in. Nothing to find or hand-edit afterward.

Once installed, the same commands just work

After installing the service, zs-proxy proxy start|stop|restart|status|logs target the service automatically instead of the self-managed daemon — you don't need to learn a different set of commands. proxy logs -f tails the service's log the same way either way.

info

An installed service bakes in its --config / --network / --port at install time, so start/restart afterward can't change them — re-run install-service if you need to change one.

Per-OS notes

Installs a launchd LaunchAgent, registered per-user so the service runs in your login session — that's required for it to reach your Keychain wallet.

Homebrew installs the proxy as a cask, not a formula, so brew services does not apply — install-service above is the supported auto-start path no matter how you installed it.

On every platform:

  • Set up the wallet first. A service has no terminal to prompt you in. On Windows, a service started without a wallet refuses to run (the error lands in the service log); on macOS and Linux, it quietly generates a brand-new empty one — not the funded account you meant. So run zs-proxy proxy start once interactively first (to import or create a wallet — see Wallet & funding), then install the service.
  • Wallet unlock. A signed release (Homebrew/Scoop install) reads your OS keychain unattended automatically. A from-source build using the encrypted-file wallet backend has no terminal to prompt for the passphrase under a service — there, install-service registers the service but skips enabling it, and tells you the environment variable (ZEROSIGNAL_KEYSTORE_PASSPHRASE) to set before you enable it yourself.

What's next

  • Configuration — every config key, including the network and spend-cap settings you'd typically pin at install time.
  • Proxy CLI reference — the full command and flag list.