Skip to main content
CertGov automates certificate delivery to local applications — servers running nginx, Apache, HAProxy, Postfix, databases, or any process that reads TLS files from disk — through the same Application + Delivery Target model used for network devices and SBCs.
The agent runs on the application host, picks up delivery jobs, writes the cert and key to the paths you configure, and runs a reload command so the application picks up the new certificate automatically.

Prerequisites

  • certgov-agent installed and enrolled on the application host — see CertGov Agent
  • A Domain Trust Profile covering the domain — see Domain Trust Profiles
  • The agent running as a user that can write the cert/key paths (typically root)

Setup

1 — Register the server as a Managed Host

In CertGov: Apps / Hosts → Managed Hosts → + Add Host Set the driver to local_bash (or the appropriate agent script driver). This registers the server where the agent and application are both running.

2 — Create an Application

In CertGov: Apps / Hosts → + New Application

3 — Add a Delivery Target

On the Application record: + Add Delivery Target Save and click Deliver to trigger the first issuance and delivery cycle.

Approval

If the Domain Trust Profile requires human approval, the job enters Pending Approval and appears in the Approvals queue. An authorized approver must act before issuance proceeds. For fully automated renewal, enable Auto-Approve on the Trust Profile.

Application recipes

Each built-in template pre-configures the correct script for its target application. The tables below show the file paths and reload commands used by each template. Adjust paths to match your actual configuration if they differ.

nginx

cert.pem receives the full bundle (leaf + intermediates + root), which is what ssl_certificate expects. chain.pem receives the intermediates-only chain for apps that configure ssl_trusted_certificate separately.

Apache (Debian / Ubuntu)

Point SSLCertificateFile at cert.pem and SSLCertificateKeyFile at key.pem.

Apache (RHEL / CentOS / AlmaLinux)


HAProxy

HAProxy reads cert and key from a single combined file. Use the reload command to concatenate them after delivery: Point the bind line at bundle.pem:

Postfix + Dovecot

Both services read the same files — one delivery target covers both: In main.cf:
In dovecot.conf:

PostgreSQL

PostgreSQL requires the key file to be owned by the postgres user and mode 0600 — the ownership step in the reload command handles this. In postgresql.conf:

MySQL / MariaDB

MySQL requires a restart (not reload) to pick up new TLS certificates. For MariaDB: systemctl restart mariadb. In my.cnf:

Node.js / custom applications

For any application that reads cert files directly: If the application watches for file changes and reloads automatically, no reload command is needed.

Renewal

CertGov schedules automatic renewal based on cert expiry and the renewal lead configured in the Domain Trust Profile (default 30 days). When the renewal window opens, a new job is queued automatically — no manual steps required. To trigger early renewal, click Deliver on the delivery target.

How the private key is handled

The agent generates the private key on the local host before submitting the CSR. This means:
  • The key never leaves the host
  • If the agent restarts mid-cycle, the key is already in place when the cert arrives
  • The key on disk always matches the issued certificate

Troubleshooting

Job stuck in pending_csr — the agent isn’t running or can’t reach CertGov. Check journalctl -u certgov-agent. Reload command failed — the command exited non-zero. The error output is in the Phase Log on the job detail page. Common causes: wrong path, missing permissions, or the application isn’t running. Fix the template’s reload script, then re-deliver. Key values mismatch on reload — cert and key on disk don’t match. This can happen if the cert was written by a different process after the agent wrote the key. Trigger a fresh delivery to generate a new key and matching cert.