--- id: agent-config title: Agent configuration sidebar_label: Agent config --- The agent reads no environment variables. Everything is in one YAML file. ## Location | Platform | Path | | -------- | ----------------------------------- | | Linux | `/etc/vantage/config.yaml` | | Windows | `%ProgramData%\vantage\config.yaml` | Directory `0700`, file `0600`. The install script sets both. ## Contents ```yaml server_url: "vantage.yourdomain.com:9090" server_id: "" pre_reg_token: "" # cleared once the agent has registered agent_token: "" # written by the agent when it registers poll_interval: 30s tls: true ``` | Field | Meaning | | --------------- | --------------------------------------------------------------------- | | `server_url` | The `host:port` the agent connects to. Comes from your `GRPC_HOST` | | `server_id` | The identity issued when the enrolment was created | | `pre_reg_token` | Single-use, one hour. Cleared once registration succeeds | | `agent_token` | The permanent credential, written by the agent itself | | `poll_interval` | How often the agent polls for key state. Default `30s` | | `tls` | Whether to use TLS. Leave `true` | :::danger This file is the credential `agent_token` exists in full only in this file. Anyone who can read it can act as this agent. ::: ## Service management ### Linux Unit at `/etc/systemd/system/vantage-agent.service`, `Restart=always`, running as root. ```bash systemctl status vantage-agent systemctl restart vantage-agent journalctl -u vantage-agent -f ``` ### Windows A service registered through NSSM, or installed by the MSI. ```powershell Get-Service vantage-agent Restart-Service vantage-agent ``` ## Moving an agent to a new control plane Change `server_url`, clear `agent_token`, set a fresh `pre_reg_token` from a new enrolment, and restart. The old control plane still holds a server record that will go `offline`; delete it there. ## Uninstalling ```bash systemctl disable --now vantage-agent rm -f /usr/local/bin/vantage-agent /etc/systemd/system/vantage-agent.service rm -rf /etc/vantage systemctl daemon-reload ``` Keys already written to `authorized_keys` remain on disk, because the agent is no longer running to remove them. Revoke first if that matters.