- Get the new domain name to replace the old one (e.g. move from
yyy.com
tozzz.com
). - Setup DNA records on the domain provider. Point the hostname to the IP address of virtual server. (e.g. figure below shows the setting for Digital Ocean)
- ssh to the virtual server. Setup the new domain, disable HTTPS, remove
certs
files.sudo nextcloud.occ config:system:set trusted_domains 1 --value=zzz.com sudo nextcloud.disable-https sudo rm -rf /var/snap/nextcloud/current/certs
- Install
certbot
and updatecerts
files.sudo snap install certbot cd /var/snap/nextcloud/current sudo mkdir certs sudo cp -a /snap/certbot/current/. /var/snap/nextcloud/current/certs/certbot/
- Update Let's Encrypt for the new domain.
sudo snap remove certbot sudo ufw allow 80,443/tcp sudo nextcloud.enable-https lets-encrypt
- Wait until the new domain presents a Nextcloud login page.
Back to Memo