How it works
Each entry in thecertificates list in agent.yml accepts two reload-related fields:
reload_command— a shell command string executed after the certificate files are written. The agent passes this directly to/bin/sh -c, so you can use pipes, conditionals, or any other shell syntax.reload_timeout— how long the agent waits for the command to exit before killing it and logging a timeout error. Accepts Go duration strings such as30sor2m.
The
reload_command runs as the same operating system user as the agent process. Make sure that user has permission to run the command — for example, by adding a sudoers entry or by granting the agent user membership in the appropriate systemd unit’s ExecReload policy.If
reload_command exits with a non-zero status, the agent logs an error but the certificate is still written to disk. A failed reload does not roll back the certificate or block future renewals.Complete example
The followingcertificates entry shows all relevant fields together: