Home / Acmefyer / FortiGate certificate

AcmefyerAgent-based Certificate Manager

Renew FortiGate certificates automatically, with Let’s Encrypt.

On a FortiGate one certificate is used in several places: the admin interface, the SSL VPN, the authentication portal and VIPs. Every replacement means importing it and switching each of these places. Acmefyer obtains the certificate via ACME, for example for free from Let’s Encrypt, and an agent installs it through the FortiGate’s REST API and switches every place that uses it.

01By handWhat every replacement involves

How to replace the SSL certificate on a FortiGate by hand.

The new certificate is imported under System → Certificates as a local certificate, with its key or as a PKCS#12 file. FortiOS does not replace a certificate in place: the new one gets a name of its own, and every place that uses the old one is switched individually. In the CLI for example:

config vpn ssl settings
    set servercert "example-com-2027"
end
config system global
    set admin-server-cert "example-com-2027"
end

Only when no place points to the old certificate any more can it be deleted.

Every use
Admin interface, SSL VPN, authentication portal, SAML connections and VIPs with SSL offloading each refer to the certificate on their own.
Several systems
Often the same wildcard certificate also sits on web servers and the mail system. The same replacement is then due there once more.
How often
Since March 2026 public certificates are valid for at most 200 days, from 2029 for only 47 days. The replacement is then due roughly every month.
02With AcmefyerWhat the agent takes care of

The agent imports the certificate and switches every use.

The Acmefyer server obtains the certificate from Let’s Encrypt or another ACME certificate authority and renews it about 30 days before expiry. An Acmefyer agent on a Windows or Linux server near the FortiGate installs it through its REST API. It then switches every place that uses the previous certificate to the new one and removes the previous one.

Nothing is installed on the FortiGate itself. The Acmefyer server needs no access to the firewall: only the agent talks to it, from the network it is managed from.

REST-API
A REST API administrator with a token on the FortiGate. Enter the agent’s address as its trusted host. Acmefyer stores the token encrypted.
Uses
The first time, you choose where the certificate goes: admin interface, SSL VPN, authentication portal (also for the SAML sign-in of the IPsec dial-up VPN) or VIPs with SSL offloading.
Renewal
Every renewal arrives on the FortiGate under a name of its own with the date of issue. The agent switches every place that uses the previous certificate. The admin interface comes last, since it restarts briefly.
Takeover
Under “Take over from” you name certificates already on the FortiGate that are to be replaced, for example one bought before.
Cleanup
Finally the agent removes the previous certificates. Whatever is still in use somewhere stays, and its log names it.
Validation
With DNS-01 the FortiGate does not have to be reachable from the internet for the domain validation. This also covers a wildcard certificate.
03SetupSet up once, then it runs on its own
  1. 01

    Create API access

    Create a REST API administrator with a token on the FortiGate, with the agent as trusted host.

  2. 02

    Add a domain

    For example vpn.example.com or *.example.com, with Let’s Encrypt and validation via DNS-01.

  3. 03

    Create the deployment

    Target FortiGate with address and token, then choose the agent and the uses.

  4. 04

    Done

    From now on Acmefyer renews the certificate in time and reports every result.

04FAQFrequently asked questions about FortiGate certificates

Does Let’s Encrypt work with a FortiGate?

Yes. A FortiGate accepts any certificate with its key as a local certificate. Let’s Encrypt issues it for free via ACME, and Acmefyer installs it through the REST API and switches SSL VPN, admin interface, authentication portal and VIPs.

FortiOS can obtain certificates via ACME itself. Why Acmefyer then?

The built-in feature obtains a certificate for that one FortiGate, and the FortiGate has to be reachable from the internet under that name for it. Acmefyer pays off when the same certificate also sits on other systems, such as a wildcard certificate on web servers and Exchange, when validation should run via DNS-01, or when all certificates are to be managed, monitored and reported in one place.

Does anything have to be installed on the FortiGate?

No. The Acmefyer agent runs on a Windows or Linux server and talks to the FortiGate’s REST API. It is best placed in the network the FortiGate is managed from. It connects to the Acmefyer server outbound only.

What happens to the old certificate on the FortiGate?

The agent removes it once every place has been switched to the new one. The FortiGate does not delete a certificate that is still in use somewhere. It then stays, and the agent’s log names it.

What about SAML?

When the certificate of a SAML connection changes, check whether the identity provider, such as Entra ID, needs to know the FortiGate’s certificate. The new certificate then belongs there as well.

Can the same certificate go to other systems as well?

Yes. A certificate can have any number of targets: the FortiGate, plus IIS, Exchange or NGINX. After every renewal Acmefyer installs it everywhere again.