Agent as a service
On a home server, a CI box or a machine that reboots, run the agent as a system service, the way ngrok service
does: it starts at boot, restarts if it stops, and logs plain lines.
Install
List your endpoints in ~/.devgate/devgate.yml, then:
$ sudo devgate service install - Linux — a systemd unit,
devgate.service, running as your user. Needs sudo. - macOS — a launchd agent in your session; run it without sudo.
- Windows — a Windows service; run it from an administrator terminal. Use the zip build: Windows doesn’t run Store apps as services.
Another config file: devgate service install --config /etc/devgate/devgate.yml.
$ devgate service status start, stop, restart and uninstall work the same
way.
Logs and updates
The service logs where agent: log in its config file says, in log_format, from
log_level — see logs. To update it, run
devgate update and then devgate service restart; if it won’t
come up, devgate diagnose with the same --config says why.
Questions people actually ask
Every endpoint in the config file it was installed with (devgate start --all). If that file lists no endpoints, the reserved endpoints pinned to this device — what a bare devgate run starts.
journalctl -u devgate on Linux, ~/Library/Logs/devgate.log on macOS, and devgate.log next to the config file on Windows — unless agent: log in the config file names another file. Without a terminal the agent logs a line when a tunnel comes online or goes offline, and one per request; log_format: json or logfmt suits a log collector.