Same domain name certificate created on different machines

Hi,

I am replacing an environment and I need to still use the same URLs of the existing environment.
Can I create 2 certificates each one on a dedicated server but with the same domain-name?
What would be a solution?

1 Like

You can either copy the cert and the key or you use dns challange for validation

2 Likes

Hi,

So I can just copy the existing certificate from /etc/ letsencrypt /live/$domain in machine 'A' and install it on machine 'B'.
How can I install the certificate after I copy it to machine 'B'?
I am using nginx, so I will add manually the configuration after the copy action?

1 Like

Hi,

So I can just copy the existing certificate from /etc/ letsencrypt /live/$domain in machine 'A' and install it on machine 'B'.
How can I install the certificate after I copy it to machine 'B'?
I am using nginx, so I will add manually the configuration after the copy action?

If you are going to copy anything TO /etc/letsencrypt/ on the second system, you should probably copy the entire directory and ensure to preserve all symbolic links.

If you are going to copy the cert into any other location, then that shouldn't cause any problems with certbot when you run it.
[presuming you will be using certbot to renew the certs in the second system]

1 Like

That would work properly. Note that the second machine will not be able to perform a renewal on its own without other files and symbolic links from /etc/letsencrypt.

If you want this process to be automated, you can use a shell script with --deploy-hook, which the first machine can run automatically for you whenever it renews the certificate. This can be used (together with a custom script) to cause the fresh certificate to be copied elsewhere, like onto the second machine.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.