Fortinet white logo
Fortinet white logo

CLI Reference

system certificate letsencrypt

system certificate letsencrypt

Use this command to configure FortiWeb to obtain and manage SSL/TLS certificates automatically via the ACME protocol. While originally designed for Let's Encrypt, this command now supports any RFC 8555-compliant Certificate Authority (CA) through External Account Binding (EAB).

It is recommended to configure ACME certificates through the Web UI for a more streamlined experience. Refer to "ACME certificates" in FortiWeb Administration Guide.

To use this command, your administrator account’s access control profile must have either w or rw permission to the admingrp area. For details, see Permissions.

Syntax

config system certificate letsencrypt

edit "<certificate_name>"

set domain "<application_domain_name>"

set renewal-period <int>

set validation-method {HTTP-01 | TLS-ALPN-01 | DNS-01}

set key-type {RSA-2048 | RSA-3072 | RSA-4096}

set retry-times <integer>

set acme-email <string>

set acme-service {letsencrypt | other}

set acme-service-url <string>

set acme-eab {enable | disable}

set status <integer>

set expire-date <string>

set certificate <userdef>

set private-key <userdef>

config subject-alternative-names

edit <index>

set san-dns <domain_name>

end

next

end

Variable Description Default

"<certificate_name>"

Enter the name of a certificate file. The maximum length is 63 characters. No default.

domain "<application_domain_name>"

Enter the domain name of your application. FortiWeb will then retrieve the CA certificate for this domain from Let's encrypt.
For Let's encrypt certificate, it's supported to added add up to 11 domains. One of them should be root domain, while the rest 10 should all belong to the root domain.
It's recommended to enter the root domain here, then add the rest domain items in san-dns <domain_name>.

No default.

renewal-period <int>

Set how soon FortiWeb obtains the TLS certificate from Let’s Encrypt. The valid range is 1-60 days.

30 (days)

validation-method {HTTP-01 | TLS-ALPN-01 | DNS-01}

  • HTTP-01: Let's Encrypt will send HTTP request to FortiWeb for validation.
    When in RP mode, you must select HTTP service and uses port 80 for it in the server policy which uses the Let's Encrypt certificate.
    When in TTP mode, the back-end server which uses Letsencrypt certificate should have port 80 enabled.
    Redirect HTTP to HTTPS should not be enabled when the validation is in process.
  • TLS-ALPN-01: This method allows Let's Encrypt to send HTTPS requests to FortiWeb for validation. You must select HTTPS service in the server policy which uses the Let's Encrypt certificate.
  • DNS-01: This method allows Let's Encrypt to do validation through your DNS provider. FortiWeb will generate a TXT record, then you need to add this TXT record to the DNS record. Refer to "Fulfilling the DNS-01 challenge" in FortiWeb Administration Guide.

HTTP-01

key-type {RSA-2048 | RSA-3072 | RSA-4096}

Select Key Type. RSA algorithm with different key length can be implemented and accepted by the Let’s Encrypt Server. Those key sizes are 2048, 3072, and 4096 bits. Please note that larger keys consume more computing resources, however, achieve better security.

RSA-2048

retry-times <integer>

The number of times FortiWeb polls the CA for the authorization status before timing out. Increase this value if your CA or DNS provider is slow to update/respond. Range: 5–20.

10

acme-email <string>

The contact email registered with the CA. The CA uses this to send expiration warnings if the automated renewal fails, or for critical security notices.

No default.

acme-service {letsencrypt | other}

Choose the CA that will issue your certificate:

  • letsencrypt — The default non-profit CA. This allows for an anonymous, automated handshake without prior account setup.

  • other — Select this option if you are using a commercial or enterprise provider (e.g., ZeroSSL, Sectigo, or a private CA).

letsencrypt

acme-service-url <string>

Provide the directory URL for the third-party CA. Only required if acme-service is set to other.

No default.

acme-eab {enable | disable}

Enable this and select a pre-configured EAB Account. This links your FortiWeb to your specific corporate or paid subscription at the CA. If ACME EAB is disabled, the certificate issuance will fail when the provider requires the EAB credentials.

disable

status <integer>

Displays the certificate status.

  • 3 (Pending) — Manual action required (e.g., adding a TXT record for DNS-01).

  • 6 (Success) —Certificate is issued and active. This certificate can now be referenced in the Server Policy.

  • 7 (Failed) — Request failed; check network connectivity or CA rate limits.

N/A

expire-date <string>

Displays the expiration timestamp. FortiWeb uses this date as the baseline to trigger renewals based on the renew-period.

N/A

certificate <userdef>

Displays the PEM-formatted public certificate string obtained from the CA after successful issuance.

N/A

private-key <userdef>

Displays the PEM-formatted private key generated locally by FortiWeb for this certificate request.

N/A

config subject-alternative-names

san-dns <domain_name>

Enter domain names. Up to 10 items can be added and they all should belong to the same domain.

No default.

Related topics

system certificate letsencrypt

system certificate letsencrypt

Use this command to configure FortiWeb to obtain and manage SSL/TLS certificates automatically via the ACME protocol. While originally designed for Let's Encrypt, this command now supports any RFC 8555-compliant Certificate Authority (CA) through External Account Binding (EAB).

It is recommended to configure ACME certificates through the Web UI for a more streamlined experience. Refer to "ACME certificates" in FortiWeb Administration Guide.

To use this command, your administrator account’s access control profile must have either w or rw permission to the admingrp area. For details, see Permissions.

Syntax

config system certificate letsencrypt

edit "<certificate_name>"

set domain "<application_domain_name>"

set renewal-period <int>

set validation-method {HTTP-01 | TLS-ALPN-01 | DNS-01}

set key-type {RSA-2048 | RSA-3072 | RSA-4096}

set retry-times <integer>

set acme-email <string>

set acme-service {letsencrypt | other}

set acme-service-url <string>

set acme-eab {enable | disable}

set status <integer>

set expire-date <string>

set certificate <userdef>

set private-key <userdef>

config subject-alternative-names

edit <index>

set san-dns <domain_name>

end

next

end

Variable Description Default

"<certificate_name>"

Enter the name of a certificate file. The maximum length is 63 characters. No default.

domain "<application_domain_name>"

Enter the domain name of your application. FortiWeb will then retrieve the CA certificate for this domain from Let's encrypt.
For Let's encrypt certificate, it's supported to added add up to 11 domains. One of them should be root domain, while the rest 10 should all belong to the root domain.
It's recommended to enter the root domain here, then add the rest domain items in san-dns <domain_name>.

No default.

renewal-period <int>

Set how soon FortiWeb obtains the TLS certificate from Let’s Encrypt. The valid range is 1-60 days.

30 (days)

validation-method {HTTP-01 | TLS-ALPN-01 | DNS-01}

  • HTTP-01: Let's Encrypt will send HTTP request to FortiWeb for validation.
    When in RP mode, you must select HTTP service and uses port 80 for it in the server policy which uses the Let's Encrypt certificate.
    When in TTP mode, the back-end server which uses Letsencrypt certificate should have port 80 enabled.
    Redirect HTTP to HTTPS should not be enabled when the validation is in process.
  • TLS-ALPN-01: This method allows Let's Encrypt to send HTTPS requests to FortiWeb for validation. You must select HTTPS service in the server policy which uses the Let's Encrypt certificate.
  • DNS-01: This method allows Let's Encrypt to do validation through your DNS provider. FortiWeb will generate a TXT record, then you need to add this TXT record to the DNS record. Refer to "Fulfilling the DNS-01 challenge" in FortiWeb Administration Guide.

HTTP-01

key-type {RSA-2048 | RSA-3072 | RSA-4096}

Select Key Type. RSA algorithm with different key length can be implemented and accepted by the Let’s Encrypt Server. Those key sizes are 2048, 3072, and 4096 bits. Please note that larger keys consume more computing resources, however, achieve better security.

RSA-2048

retry-times <integer>

The number of times FortiWeb polls the CA for the authorization status before timing out. Increase this value if your CA or DNS provider is slow to update/respond. Range: 5–20.

10

acme-email <string>

The contact email registered with the CA. The CA uses this to send expiration warnings if the automated renewal fails, or for critical security notices.

No default.

acme-service {letsencrypt | other}

Choose the CA that will issue your certificate:

  • letsencrypt — The default non-profit CA. This allows for an anonymous, automated handshake without prior account setup.

  • other — Select this option if you are using a commercial or enterprise provider (e.g., ZeroSSL, Sectigo, or a private CA).

letsencrypt

acme-service-url <string>

Provide the directory URL for the third-party CA. Only required if acme-service is set to other.

No default.

acme-eab {enable | disable}

Enable this and select a pre-configured EAB Account. This links your FortiWeb to your specific corporate or paid subscription at the CA. If ACME EAB is disabled, the certificate issuance will fail when the provider requires the EAB credentials.

disable

status <integer>

Displays the certificate status.

  • 3 (Pending) — Manual action required (e.g., adding a TXT record for DNS-01).

  • 6 (Success) —Certificate is issued and active. This certificate can now be referenced in the Server Policy.

  • 7 (Failed) — Request failed; check network connectivity or CA rate limits.

N/A

expire-date <string>

Displays the expiration timestamp. FortiWeb uses this date as the baseline to trigger renewals based on the renew-period.

N/A

certificate <userdef>

Displays the PEM-formatted public certificate string obtained from the CA after successful issuance.

N/A

private-key <userdef>

Displays the PEM-formatted private key generated locally by FortiWeb for this certificate request.

N/A

config subject-alternative-names

san-dns <domain_name>

Enter domain names. Up to 10 items can be added and they all should belong to the same domain.

No default.

Related topics