Move your Discourse Instance to a Different Server

In this guide we’ll move an existing Discourse instance on Linode (source) to a new Discourse instance on Digital Ocean (destination), but of course these steps will work on any other cloud providers that support Docker.

:bell: If you are using the same domain name and moving servers, you should set the TTL (time to live) on your DNS entry to a very low value in advance of the change. If you are using different domain names, this won’t matter.

Log In and Update

Only admins can perform backups, so sign in as an account with admin access on your source Discourse instance.

Ideally, both the new and old Discourses should be on the same version, to ensure proper backup/export. What you want to avoid is restoring a newer backup on an older version (the same goes for the Postgres version). That won’t work. Visit /admin/upgrade to upgrade the destination instance for sure, both instances if you can.

Create and Download Your Backup

Visit /admin/backups and click Backup button.

You will be prompted for confirmation, press Yes. You will see the log of backup processing. Once processing is finished, switch back to Backups tab.

Now you will see the newly created backup file. Click Download button and save the file.

:bell: Before you switch over to the new server, review your app.yml for any optional settings such as CDN, installed plugins, and HTTPS support between the two Discourse instances. It’s easier to make sure the two instances are identical before you begin restoring the backup.

Log In and Restore Backup

:bulb: Don’t want to deal with the web UI yet? Follow these steps to restore a backup at the command line.

Sign up and login on your destination Discourse instance.

Under /admin/site_settings search for restore and enable the allow restore setting.

Browse to /admin/backups and click Upload button, select the backup file you downloaded previously from your source Discourse instance (filename ends with .tar.gz):

Once the file is uploaded it will be listed as shown below, click Restore button:

Press Yes when prompted for confirmation. You will see restore process log, it may take some time but it’s automagically importing all your source Discourse instance data.

Once the Restore process finishes, you will be logged out.

Log In and You’re Done

:warning: If you are logging in to a backup that was taken with HTTPS, the site setting “force https” will be enabled. You either need to turn that off via the Rails console, or ensure that your restore is also properly running under HTTPS.

Once the restore process finishes, all the data from your source Discourse instance on Linode server will be imported in your destination Discourse instance on Digital Ocean, sign in with your Admin account and you are good to go!

:bell: Don’t forget to enable any optional configuration settings that require editing the app.yml and rebuilding, such as CDN, plugins, and HTTPS support.


Last Reviewed by @AlexDev on 2022-05-24T20:00:00Z

63 Likes
How to migrate Discourse to new server
How to migrate my Discourse instance to a fresh new install
Starting Over with Old Database
Configure automatic backups for Discourse
Migrating from Ning to Discourse
Move Discourse to a new server without setting up the web UI first?
How to migrate the discourse container to another machine
Exporting an AWS instance
Beginners Guide to Install Discourse on Ubuntu for Development
Migrating from GetSatisfaction to Discourse
Transfer from bitnami to normal discourse
How to move from standalone container to separate web and data containers
Postgres failing to update?
Images lost when migrating to self-hosting
Preserving user sessions when migrating between hosts
Can I restore backups from older Discourse versions?
Move Digital Ocean 1-Click install to Standard supported install
Can I retain my forum content if I change its original IP?
How to install Discourse in production (Discourse official install / standard install)
Server upgrade from ubuntu 18 to 20
How to migrate Discourse from one server to another with the same DNS name
Importing / migrating from Kunena 3
Importing / migrating Phorum to Discourse
Importing / migrating MyBB to Discourse
Importing / migrating PunBB to Discourse
Importing / migrating NodeBB (MongoDB) to Discourse
Importing / migrating from vBulletin 4
Importing / migrating NodeBB (Redis) to Discourse
Importing / migrating from phpBB3
Preserving user sessions when migrating to a new host
Trouble with postgre(maybe)
How to downgrade a Digital Ocean Virtual
How might we better structure #howto?
How to backup and restore a whole /var/discourse app folder?
How to move Discourse to a different server when using Digital Ocean's Volumes (Block Storage)
How to migrate from one Digitalocean Droplet to a another Droplet in a different Digitalocean account
Error: Can't notify admin while restoring backup during a migration to a fresh install
Migrating to Discourse from another Forum software
How to clone Discourse server to a new server?
Issues while migrating from Kunena
Seeing "welcome to nginx" after backup restore
Update from 2.9.0 beta2 to beta4 failed (my site is down)