I have, running a domain server A www.example.com . I’m preparing now a Server B for this domain. When the server will be ready I want stop server A and run server B www.example.com.
Anybody can send me a link to know how to do this?
This question isn’t appropriate for this forum. Maybe try Server Fault?
You’ll probably be able to do this simply by changing the DNS record for www.example.com to point to the IP address of server B at the appropriate time.
I mean how to pass the certificates from one server to another.
Because if in the new server I try to create the old certificates I get a error and I cannot delete de certificates in the old server because it is yet in production.
Oh, I see! So that is relevant to this forum after all.
Certificates are not specific to the machine where they were issued, so you should be able to copy them over using a tool like rsync. They can be installed and used on more than one machine at a time.
If you use Certbot specifically, please be sure to copy everything in /etc/letsencrypt, including symbolic links, in order to allow automated renewal to continue to work properly on the new system.
(If, for some reason, you need to issue new certificates directly on a machine that isn’t yet pointed to by the DNS name that the certificates will refer to, you can also use Let’s Encrypt’s DNS-01 challenge method to issue the certificates, which doesn’t require you to receive an inbound connection from the Let’s Encrypt CA during verification. It does require you to be able to create DNS TXT records in the associated DNS zone, normally using a DNS provider API.)