Data & More

How to add a certificate to a DMCS

1 min readAug 25, 2026

How to add a certificate to a DMCS This article is for ubuntu admins only Before you start - make sure you have acquired a .pfx certificate for the proper

This article is for ubuntu admins only

Before you start - make sure you have acquired a .pfx certificate for the proper domain as well as the password for the .pfx certificate. 

Make sure the domain points to the external domain of the DMCS. If the DMCS is not available on the internet - make sure that you have a local DNS service to validate the certificate

  1. Upload the certificate to the server: scp -i ~/.ssh/yourkey.pem Downloads/certificatename.pfx admin@dmcs-domain:/home/myfolder/

  2. Find the location of the certs volume: docker volume inspect certs

  3. Move the pfx file to the certs directory: mv /home/myfolder/certificatename.pfx /mnt/docker/volumes/certs/_data/

  4. Go to the certs directory: cd /mnt/docker/volumes/certs/_data/

  5. Rename the pfx file: mv certificatename.pfx cert.pfx

  6. Extract the private key: openssl pkcs12 -in cert.pfx -nocerts -out key.pem

  7. Extract the full certificate chain (leaf + intermediates): openssl pkcs12 -in cert.pfx -nokeys -out fullchain.pem

  8. Remove the passphrase from the key: openssl pkey -in key.pem -out privkey.pem

  9. Verify the chain file contains more than one certificate and that the first one is your domain: grep -c 'BEGIN CERT' fullchain.pem openssl x509 -in fullchain.pem -noout -subject

  10. Restart nginx so the new certificate takes effect: docker restart nginx

Was this article helpful?