Want more timely Centmin Mod News Updates?
Become a Member

Migrate Domain to a different Letsencrypt

Discussion in 'Domains, DNS, Email & SSL Certificates' started by Fernando, Jan 27, 2020.

Tags:
  1. Fernando

    Fernando Member

    71
    12
    8
    Jul 21, 2017
    Ratings:
    +25
    Local Time:
    12:50 PM
    1.13.3
    10.1.25
    Hi,

    I would like to migrate my existing website from Server A to Server B.

    The current domain on Server A was configured using option 22 with letsencrypt and basically I want to rebuild the entire website on Server B also using letsencrypt.

    I would like to know if the following should work or if there's a better way so you can provide me a better suggestion :)

    1. On Server B, enable letsencrypt option in the custom config file.
    2. Use option 22 to create the vhost
    3. Select self SSL and letsencrypt
    4. The above will fail to get a certificate from letsencrypt because the A record will be pointing to Server A, but the goal is to generate the ssl vhost files and have everything in place
    5. Start developing the website on Server B
    6. Once done modify the A record to point to Server B
    7. On Server B once the A record has been propagated run:
    acmetool.sh reissue-only domain.com

    I believe step 7 will allow to get the certificate on the new server and also autorenew?

    Please let me know.
    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,468
    10,319
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,005
    Local Time:
    4:50 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    If you want to rebuild site from scratch on server B, just treat it as a new site, new letsencrypt, new centmin.sh menu option 22 with live letsencrypt ssl cert. But your method should work too.

    On the other hand if you want to transfer site from server A to server B, if you copy SSL certs from old server from /usr/local/nginx/conf/ssl/yourdomain.com directory along with nginx vhost files (/usr/local/nginx/conf/conf.d/yourdomain.com.conf and /usr/local/nginx/conf/conf.d/yourdomain.com.ssl.conf), they will work on new server. One thing is with letsencrypt they need auto renewal as they have 90 day expiry, so you need to setup addons/acmetool.sh via acmeinstall command on new server
    Code (Text):
    ./acmetool.sh acmeinstall

    and then copy over the /root/.acme.sh/yourdomain.com directory from old server too which contains the details acme.sh client needs for auto renew cronjobs. Then transfer rest of wordpress site/database normally from server A to B without needing to reissue new letsencrypt ssl certs as you use the ones copied over for now until the next renewal on server B. Just then you need to transfer wordpress auto update cronjob from server A to B (unless you do it your way and run centmin.sh menu option 22 on server B - which creates that auto update cronjob too).
     
  3. Fernando

    Fernando Member

    71
    12
    8
    Jul 21, 2017
    Ratings:
    +25
    Local Time:
    12:50 PM
    1.13.3
    10.1.25
    Hi @eva2000

    Thank you for your confirmation :)

    Really appreciate it.
    Best regards