Skip to main content
The certgov-agent is an open-source binary that runs on your infrastructure and handles everything that requires on-premises execution: delivering certificates to local file paths, automating renewal on network devices via scripts, and signing against on-premises CAs. The agent is stateless and requires no inbound firewall rules. It polls CertGov for pending jobs, executes them, and reports back.

What the agent handles

One agent binary covers all three. You deploy as many agents as your network topology requires — one per site, one per VLAN, or one per device cluster.

Prerequisites

  • A CertGov account with admin or operator role
  • A host with outbound HTTPS to app.certgov.app:443 (and usagent.certgov.app:8443 for mTLS)
  • For device automation: TCP access from the agent host to the device management IP and port

Step 1 — Download the agent binary

Download the latest release directly from GitHub and install it: Linux (amd64):
Linux (arm64 — Raspberry Pi, AWS Graviton, etc.):
Windows (PowerShell):

Step 2 — Create a service user


Step 3 — Enroll the agent

Enrollment exchanges a one-time token for a mutual-TLS certificate. The agent uses that certificate for all future connections — no API key stored in config. In CertGov: Integrations → Connector Agents → + Enroll Agent
  1. Give the agent a label (e.g. hq-linux, dc2-network-devices)
  2. Click Generate Token — CertGov shows a one-time token
  3. On the target host, run:
Enrollment creates /etc/certgov-agent/ and writes four files:
The enrollment token is single-use and expires in 10 minutes. If it expires before you run the command, generate a new one in the UI.
After enrollment, grant the service user read access:

Step 4 — Review the configuration file

The enrollment command wrote a complete agent.yaml. You do not need to create it. To optionally set a log level, edit it once:
The file will look like:

API key fallback

If your environment can’t reach the enrollment endpoint, use an API key instead:
Create the key at Settings → API Keys → Add Key with the connector scope.

Step 5 — Create the systemd service


Step 6 — Verify enrollment

The agent appears in Integrations → Connector Agents in CertGov within 60 seconds of starting. It shows an online status, hostname, architecture, and version.

What to configure next

Once the agent is online:
  • Local application cert delivery (nginx, Apache, HAProxy, …) — see Local Application Cert Delivery
  • Network device automation (F5, SBCs, gateways, …) — see Network Device Automation
  • Private CA signing — assign a CA connector to this agent in Integrations → CA Connectors → Edit
  • Delivering certificates whose key is in your vault — add a vault: section to agent.yaml (agent v0.1.11+). See Keep Private Keys in Your Vault

Firewall / egress requirements

The agent requires outbound HTTPS only — no inbound ports needed.

mTLS certificate rotation

The mTLS client certificate has a fixed validity period. When it nears expiry, re-run certgov-agent enroll with the same --label to issue a new credential set. The old certificate continues to work until the new one is deployed. To revoke a certificate immediately: Integrations → Connector Agents → Revoke Cert.

Docker

--network host is required when the agent needs to reach devices on private management VLANs.

Windows

Enrollment writes agent.crt, agent.key, server.crt, and agent.yaml into C:\certgov-agent\. Do not recreate agent.yaml — it is written by enrollment with the correct mTLS endpoint, agent ID, and cert paths. Run as a Windows service with NSSM:

Troubleshooting