Skip to content
Mint Service Desk Documentation centre

Replacing a certificate in Docker secrets

Disconnect the existing certificate secrets from the Reverse Proxy service, replace them and reconnect the new secrets.

To replace a certificate secret, first disconnect it from the running Reverse Proxy service:

$ docker service update --secret-rm Certificate__pem --secret-rm CertificateKey__key mintsd_reverse-proxy

Remove the existing secrets from the secret store:

$ docker secret rm Certificate__pem CertificateKey__key

Create new secrets from the certificate and key:

'$ docker secret create Certificate__pem certificate_name.pem'
'$ docker secret create CertificateKey__key key_name.key'

Connect the new secrets to the Reverse Proxy service:

$ docker service update \
  --secret-add source=Certificate__pem,target=/etc/ssl/private/fullchain.pem \
  --secret-add source=CertificateKey__key,target=/etc/ssl/private/privkey.key \
  mintsd_reverse-proxy