Updating domain name for SSL certificate in Sync endpoint server

Hi Mandy,

While I haven’t tested this exact scenario, I think you should login to the container running ‘certbot’ with an interactive shell to issue a certificate for the new domain. Then that new certificate’s *.pem-files should be placed in the volume shared with the nginx container… So if you replace YOUR_EMAIL_ADDRESS and THE_NEW_DOMAIN with the real values in the statements below, I believe it should work.

The first line starts an interactive shell on the certbot container.
The second line runs certbot to generate the new certificates, and
The third line copies the new certificates into the folder configured in nginx

docker exec -it $(docker ps -aqf "name=certbot") /bin/sh
certbot certonly --webroot -w /var/www/certbot --email YOUR_EMAIL_ADDRESS -d THE_NEW_DOMAIN --rsa-key-size 4096 --agree-tos --cert-name renewal-staging --keep-until-expiring --non-interactive
cp /etc/letsencrypt/live/renewal-staging/*.pem /etc/letsencrypt/live/production

If that works, then we need to also make sure the automatic renewals use the correct domain name going forward, which is defined in the configuration of the certbot container - specifically in the file located at config/https.env under your odk-x folder.

If you edit that file to reflect the new domain name and then restarts the certbot container, I think it should use the updated values… (you probably want to check the logs from the certbot container, to make sure that it worked as expected).

//emil