MyOwnPKI documentation Source on GitHub

CA lifecycle: create, renew, replace

A CA is a key with a certificate. This guide covers the tasks around it: creating a root and an intermediate, renewing an intermediate before it ends, replacing one, and what you must tell clients.

When to use this

The Certificate authorities page: roots and intermediates with key storage, validity and signed certificates

Rules that never change

1. Create a root and an intermediate

Recommended: an offline root, then an online intermediate (Sign with an offline root). For tests and homelabs that accept an online root, the UI creates one directly.

  1. Certificate authorities → New CA, parent none creates an online root. Give the name, common name, algorithm (P-384 is the default; P-256, RSA 3072 and RSA 4096 are offered), validity (empty means 7300 days) and the public base URL. The result carries a warning that an online root keeps its key on this server, which is fine for tests and a homelab, and that an offline root is best practice.
  2. New CA again, parent = the root. For an intermediate, set:
    • path length, 0 so that it can issue only end-entity certificates;
    • permitted DNS names and IP ranges (name constraints), recommended: even a stolen key then cannot sign names outside them;
    • an EKU limit if it should serve only some uses, for example serverAuth;
    • the maximum certificate validity (397 days if empty) and the CRL lifetime (7 days if empty). Validity is never beyond the parent’s; empty means 3650 days.
  3. Below an online root the intermediate is signed at once. Below an offline root it waits for its signature.

The engine checks the parent: its path length must allow another level, the EKU limit must be a subset, and it warns about DNS name constraints outside the parent’s. Ed25519 is never accepted as a CA key.

2. Issue the first certificate

On the host that will use it, make a key and a request, then issue in the UI with the preset server:

openssl req -new -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes -keyout www.homelab.lan.key -out www.homelab.lan.csr -subj "/CN=www.homelab.lan" -addext "subjectAltName=DNS:www.homelab.lan"

The wizard is described in Issue a first certificate in the web UI, revoking and renewing in Renew and revoke.

3. Renew an intermediate

Certificate authorities → the CA → Manage → Renew with a new key. Pick the algorithm and validity.

4. Replace an intermediate

For a different purpose or name, create a new CA next to the old one (names cannot change). Point your ACME domains at it, then retire the old one: Manage → Retire. A retired CA signs nothing new, its certificates stay valid, its CRLs go on until everything it signed has ended, and retiring cannot be undone.

If the key may be compromised, revoke instead of only retiring:

What is not supported

What clients must do after a replacement

What changed Clients
An intermediate was renewed or replaced, the root is the same Nothing, if servers send the full chain. New certificates carry the new intermediate. Hosts with an old certificate keep working until it ends. Re-issue by hand what ACME clients and agents do not renew.
An intermediate was revoked Clients that check revocation reject its certificates once they fetch the new CRL. Re-issue below a new CA.
A root was renewed (a new key) Install the new root in every trust store before certificates below it are used, after comparing its fingerprint (Make clients trust your root). The trust page lists the older generation while it is valid.

Check it worked

When it fails

Next steps