Renew an Expired Zimbra Self-Signed Certificate

For a single-server Zimbra installation that uses a self-signed certificate, renew the server certificate with zmcertmgr createcrt -new -days 365, deploy it with zmcertmgr deploycrt self, verify the deployed certificate, and restart Zimbra. If only the server certificate has expired, preserve the existing self-signed certificate authority (CA) when possible; replacing the CA changes what clients must trust. The commands and permissions differ by Zimbra release, so check the installed release’s certificate procedure before running them.

This procedure is for a Zimbra-generated self-signed certificate on a single server. It does not renew a commercial certificate or a Let’s Encrypt certificate. A self-signed certificate may still trigger a browser trust warning after renewal: renewal resets its validity dates, but does not make it trusted by browsers or unmanaged mail clients.

Confirm the certificate type and hostnames

First verify that the expired certificate is the Zimbra self-signed certificate, rather than a commercial certificate deployed with deploycrt comm. Changing the certificate type with the wrong deployment command can leave services using mismatched files. If you are unsure, review the certificate details in the Zimbra Administration Console or ask the person who maintains TLS for the server.

Terminal showing a root shell switching to the zimbra account
On Zimbra 8.7 and later, the certificate manager is run as the zimbra system user; confirm the rule for your installed release.

For Zimbra 8.7 and later, the certificate CLI documentation says to run zmcertmgr as the zimbra user. Before 8.7, it says to run it as root. The example below uses the newer convention:

su - zimbra

Identify the exact fully qualified domain names (FQDNs) users and Zimbra services connect to, including proxy or mailbox hostnames if they differ. A certificate that is valid in date but omits a service hostname can still fail TLS hostname checks. Zimbra’s certificate guidance notes that the Subject Alternative Name (SAN) list must include the names to be trusted; in Zimbra 8.7 and later, zmcertmgr normally adds the current Zimbra hostname unless that default is disabled.

Check expiry, then generate the replacement

Inspect certificates before changing them. The certificate manager can check certificates that expire within a specified number of days:

Terminal showing the zmcertmgr checkcrtexpiration command
Check the certificate manager’s reported expiry before generating a replacement.
/opt/zimbra/bin/zmcertmgr checkcrtexpiration all -days 30

Save a protected backup or server snapshot before replacing certificate material. Treat the private CA key as sensitive; keep its backup access-controlled. Then create a new self-signed certificate for the existing CA:

Terminal showing the createcrt command with a 365-day validity and mail.example.com SAN
Generate a replacement certificate with a validity period and SANs that match the hostnames clients actually use.
/opt/zimbra/bin/zmcertmgr createcrt -new -days 365 -subjectAltNames "mail.example.com"

Replace mail.example.com with the actual names required by your deployment. Include every relevant hostname in the comma-separated SAN list when needed. On versions where the current Zimbra hostname is automatically added, do not assume that this covers proxy aliases or other service names; inspect the staged or deployed certificate to confirm. The -days 365 value is an example. Choose a validity period supported by your release and operating policy.

Some Zimbra procedures include createca -new and deployca when regenerating a self-signed certificate. The single-server renewal instructions state that creating a new CA is optional and not required for every renewal. Do not rotate the CA just to replace an expired server certificate unless you have planned the client trust change. If the CA itself has expired, or the existing CA key is unavailable, stop and follow the release-specific CA replacement guidance; an ordinary certificate renewal may not be sufficient.

Deploy the certificate and restart Zimbra

Deploy the generated self-signed certificate to the services on this server:

Terminal showing deploycrt self, viewdeployedcrt, and zmcontrol restart commands
Deploy the self-signed certificate, inspect the local deployed certificate, then restart Zimbra so services reload it.
/opt/zimbra/bin/zmcertmgr deploycrt self
/opt/zimbra/bin/zmcertmgr viewdeployedcrt
zmcontrol restart

Review the output from viewdeployedcrt before restarting. Confirm the certificate is present for the expected local services and that its subject, SANs, and validity period match the plan. If deployment reports a validation error, do not proceed as if the certificate installed; retain the full error, confirm the certificate names and CA files, and use the guidance for your Zimbra version.

A restart interrupts active Zimbra services while they stop and start. Schedule it in an approved maintenance window, especially if users depend on webmail, IMAP, SMTP submission, or proxy access. Wait for services to return before testing. If the restart leaves a service stopped, inspect the relevant service logs and certificate error output rather than repeatedly redeploying.

Verify what clients receive

After the restart, run zmcertmgr viewdeployedcrt again and check the expiry with zmcertmgr checkcrtexpiration all -days 30. These commands report the local server’s deployed certificates; in a multi-server deployment, the view command is local to the node, so it does not prove that every server has the new certificate.

Test the actual HTTPS address users enter, plus any IMAP, SMTP, or proxy endpoints that use TLS. Confirm the presented certificate has the new validity dates and contains the requested hostname in its SAN list. A browser warning that says the certificate is untrusted can remain expected with a self-signed CA. If clients must trust the service without manual certificate installation, plan a certificate from a publicly trusted certificate authority instead.

For a multi-server Zimbra deployment, do not stop after running the single-server commands on one node. Zimbra documents an all-server deployment option, but notes that it depends on working SSH access and the local certificate view only shows the local node. Follow the Zimbra multi-server self-signed certificate procedure, then verify each node and public endpoint individually.

Sources

Leave a Comment

How to