Migrating over to a new instance in new hosting provider

We have a forum running in AWS, on a custom domain with SSL via LetsEncrypt and we’re looking to move to Digital Ocean, ideally without downtime. Is there a recommended best practice as I’ve encountered a variety of problems?

I first tried setting up the new instance and enabling LetsEncrypt but this caused all sorts of problems (e.g. SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE) – presumably because I was trying to set up the new instance using the same domain name in the configuration as the existing live site.

I then tried setting up the instance without SSL (but with the instance configured on the same domain name) and restoring a backup from the live site. This time the restore process failed with what looked like issues around the domain name.

Setting up a new instance on a new domain is really easy (thank you! :pray:) but trying to create a new instance that I can then just do a DNS switch over to in order to migrate appears to be really hard. Unless, that is, I’m just doing it wrong!

Any help would be appreciated.

1 Like

I’m not making any promises, but if the current site is a standard install, you can copy over your the letsencrypt and ssl directories and those certs should get copied over and it’ll rebuild just fine. It can be a bit tricky, though.

Worst case, you’ll need to rebuild the site after the DNS switch.


Would INSTALL-cloud.md instructions work modified like this, on the new target host?:

sudo -s
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
[copy letsencrypt, ssl directories & containers/app.yml from current running instance]

Then on to using the web UI to restore from backup, and DNS switch?

Any recommendations for tests to perform before the DNS switch?

Many thanks for any helpful pointers!

You don’t need discourse-setup, just ./launcher rebuild app. You should be able to change your local DNS to point it to the new server and have it work.

1 Like

Excellent, thanks for the tips!