# Certificates and HTTPS

> Get free certificates from Let's Encrypt automatically, use wildcards via DNS-01, switch to another ACME CA or upload your own certificate, and keep an inventory of everything that expires.

Source: https://www.berthpanel.app/library/certificates/ · Category: sites · Updated: 2026-10-30

Every website on Berth can have HTTPS without manual work. Certificates come from Let's Encrypt by default, renew themselves, and are used for the website as well as for the domain's mail and webmail names. This article covers requesting and renewing certificates, wildcards, other certificate authorities, your own certificates, the TLS profile and troubleshooting.

## Automatic certificates

With automatic certificates on (the default), a daily round requests a certificate for **every domain whose DNS points at the server** and does not have one yet. A customer who adds a domain and points it at the server gets HTTPS within a day without doing anything. HTTPS then works, but plain HTTP is not redirected until the site owner chooses *Redirect HTTP to HTTPS*, so a site that is not ready for HTTPS does not break.

```bash
berth tls auto              # show the setting
berth tls auto --on=false   # turn automatic certificates off
```

## Request a certificate for a domain

On the domain page, open *Certificate and HTTPS*:

1. Under *Names on the certificate* tick *Also www.* and, if the domain allows DNS-01, *Wildcard \*.*.
2. Optionally tick *Enable HSTS*. Browsers then use only HTTPS for the domain; enable it once everything works over HTTPS.
3. Click **Request certificate**. It takes a few seconds.

By default port 80 then redirects to HTTPS. Tick *Do not redirect HTTP to HTTPS* if you need plain HTTP to keep working.

On the command line, a certificate is requested over HTTP-01 for an existing domain:

```bash
berth tls issue --domain example.com --san www.example.com --email admin@example.com
berth tls issue --domain example.com --san www.example.com --hsts
berth tls status --domain example.com
```

When you add a domain with `berth customer create … --tls`, the certificate is requested in the same step.

All certificates of the server come from one shared account at the certificate authority, which limits how many new certificates that account may order. To keep one customer from using up that allowance for everyone, requests by customers and resellers are paced: one request at a time per domain, and a limited number of new certificates per customer and per reseller per hour. Renewals, automatic certificates and requests by an administrator do not count.

## Renewal

Certificates renew automatically every day once they are within 30 days of expiry, reusing the names of the current certificate. If a renewal fails, you get an alert so it does not expire unnoticed. Manual renewal:

```bash
berth tls renew --domain example.com
berth tls renew --all --days 30
```

## Validation methods and wildcards

| Method | How it works | When to use it |
|---|---|---|
| **HTTP-01** | Let's Encrypt fetches a token from `http://<domain>/.well-known/acme-challenge/` | The default; port 80 of the domain must reach this server |
| **DNS-01 via a DNS provider** | The panel sets a TXT record at the linked provider | Wildcards, or sites behind a proxy |
| **DNS-01 on the panel's own DNS** | The record is set in the zone the server hosts | Wildcards when Berth runs your DNS |
| **DNS-01 via delegation** | One `NS` record delegates `_acme-challenge.<domain>` to the server's own responder | Wildcards while the zone stays at a provider Berth cannot reach |

Wildcard certificates (`*.example.com`) always need DNS-01. Linking a DNS provider or running your own zone is described in [DNS](https://www.berthpanel.app/library/dns/).

Delegation is useful when the DNS of a domain is somewhere else and you cannot or do not want to give the panel API access. You add one record once at the provider, and the server answers the challenge itself:

```bash
berth tls delegation --domain example.com --on
berth tls delegation --domain example.com --check   # checks publicly that the NS record is in place
```

Port 53 (UDP and TCP) of the server must be reachable from outside for delegation.

New Let's Encrypt keys are ECDSA P-256 by default.

## Other certificate authorities

Besides Let's Encrypt, Berth can request certificates over ACME from:

- ZeroSSL (DV),
- Sectigo DV, OV and EV,
- DigiCert,
- Google Trust Services,
- Buypass Go SSL,
- an internal ACME CA with your own root certificate.

Paid CAs use External Account Binding (EAB): you get a key ID and an HMAC key from the CA. Set them up under *Security → Certificates → Certificate authorities*:

```bash
berth tls ca list
berth tls ca set --preset sectigo-ov --eab-kid <kid> --eab-hmac-file - --email admin@example.com
berth tls ca domain --domain example.com --ca sectigo-ov
```

With `--customers`, customers may choose that CA for their own domains. A domain switches to the chosen CA from its next request or renewal. For an internal CA, pass its root certificate with `--ca-cert`; browsers outside your organisation will then show a warning.

## Your own certificate

For a certificate bought elsewhere, open *Certificate and HTTPS → Certificate from the supplier* and either paste certificate, intermediate certificates and key as PEM, or choose a PKCS#12 file (for example an export from Windows) with its password. The panel checks that the key matches, that the names fit the domain, that it is valid, and that the chain ends at a trusted root. It puts the chain in the right order and uses the certificate for the website and the domain's mail names.

```bash
berth tls upload --domain example.com --cert cert.pem --chain bundle.pem --key key.pem
berth tls upload --domain example.com --pfx example.p12 --password-file -
```

An uploaded certificate is **not** renewed automatically. The certificate inventory shows when it expires, and the panel warns in time.

### Create the key and CSR in the panel

If the CA needs a certificate signing request, let the panel make it: *Create request*. The private key is generated on the server and never leaves it; you send only the CSR to the supplier. Fill in organisation, unit, city, province and country for OV or EV; leave them empty for domain validation only.

```bash
berth tls csr --domain example.com --name www.example.com --key-type ecdsa-p256 --org "Acme B.V." --country NL --out example.csr
berth tls upload --domain example.com --cert cert.pem --chain bundle.pem   # no --key: uses the pending request
```

### Go back to the previous certificate

Uploading or replacing a certificate keeps the old one as the previous version. If the new one turns out wrong, **Restore previous version** puts it back after the same checks; running it again swaps them back.

```bash
berth tls restore-previous --domain example.com
```

To move from a bought certificate to a free one, use **Switch to Let's Encrypt**.

## TLS profile

The TLS settings of all websites follow the guidelines of the Dutch NCSC for TLS. The profile **Good** allows TLS 1.2 and 1.3 with modern ciphers, which is what internet.nl expects. **Sufficient** adds older ciphers for old clients.

```bash
berth tls profile
berth tls profile --set goed
```

The profile applies to the websites. Postfix and Dovecot accept only TLS 1.2 and 1.3, whichever profile is chosen.

## Certificates for mail and webmail

Each domain can have its own `mail.<domain>` and `webmail.<domain>` names, so mail clients see the customer's own name instead of the server's. Postfix and Dovecot pick the right certificate per name (SNI); a wildcard certificate on the domain covers them as well. See [Webmail and mail clients](https://www.berthpanel.app/library/webmail-and-mail-clients/).

## Certificate inventory

*Security → Certificates* lists every certificate on the server, websites, panel and mail, with the one that expires first at the top. **CSV for audits** exports the list.

```bash
berth tls inventory
```

## When a certificate does not work

Per domain, *Certificate: diagnosis* compares the certificate the server actually serves with the file on disk, and explains why a request failed: DNS that points elsewhere, port 80 that does not reach the server, a CAA record that forbids the CA, a rate limit at the CA.

```bash
berth tls diagnose --fix                       # reload what differs and check again
berth tls diagnose example.com --acme         # why a request for this domain failed
```

The domain's [quality score](https://www.berthpanel.app/library/site-quality-scores/) also flags a missing or expiring certificate, a missing redirect and missing HSTS. For HSTS duration and the other security headers, see [Web server settings](https://www.berthpanel.app/library/web-server-settings/).
