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.
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
- macOS
- Linux
- Windows
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.
Installs a systemd user unit, registered per-user so the service runs in your login session — that's required for it to reach your Secret Service wallet.
Installs a Windows service that runs as the account that installs it, so it can read that account's Credential Manager wallet.
Installing needs administrator rights — if you aren't already elevated, it
raises a UAC prompt and continues, still configured to run as you. It asks
(with hidden input) for your Windows account password, which the service
manager needs to register a service that runs as your user, and it handles
the "log on as a service" permission automatically, so you shouldn't need to
touch secpol.msc.
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 startonce 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-serviceregisters 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.