Replace the Deployment Certificate Authority#

Use this guide to replace the certificate authority (CA) created by Dioptra and all server certificates it issued for your deployment. Replacement briefly stops affected services. Browsers and external clients that trust the old CA must trust the new CA before they can reconnect. Certificates you obtained from another provider remain unchanged.

For routine server certificate replacement using the existing CA, see Replace Deployment Certificates.

Prerequisites#

  • An initialized Dioptra deployment with a Dioptra-generated certificate for the API, nginx, or both.

  • Python 3.11 or newer.

  • Docker with Docker Compose.

  • Terminal access to the deployment directory as the user who owns its files.

  • A protected backup of the certificate and recovery files.

  • Permission to update certificate trust settings on affected workstations and external clients.

Replacement#

Step 1: Replace the CA and Its Server Certificates#

Run the replacement command:

python3 scripts/manage_ssl.py replace-ca

Wait for the command to report successful replacement and HTTPS checks. Record the reported location and fingerprint of the new public CA certificate. If the command reports an interrupted operation, follow Recover an Interrupted Certificate Operation using the reported operation ID.

Step 2: Check the Installed Certificates#

Check the installed certificates:

python3 scripts/manage_ssl.py validate

Confirm that validation succeeds with no unavailable checks.

Step 3: Update Trust on Your Workstations and Clients#

Use the new public CA certificate at ssl/ca-certificates/dioptra-local-ca.crt to update the browsers and Python clients you manage.

For browsers that access nginx with a Dioptra-generated certificate, follow workstation trust setup. For Python clients that connect to a service using a Dioptra-generated certificate, follow Python client trust setup with the new CA certificate.

Step 4: Send the CA Certificate to Other Users#

Send ssl/ca-certificates/dioptra-local-ca.crt to other users who need it, or to the administrators who manage their certificate trust settings. Share the reported fingerprint in a message recipients can verify came from you, for example through your organization’s authenticated messaging service. Tell the recipients to follow the workstation or Python client instructions to verify the received certificate’s fingerprint and configure trust.

Step 5: Verify Access#

Open the deployment’s HTTPS address in your browser and confirm that the frontend loads without certificate warnings. If you have an account, log in to check authenticated access. For external Python clients, repeat the client connection and login checks.

Update your protected backup with the new CA and server certificates, their private keys and the recovery files. See Certificate Backups for the files to retain.

See Also#