Move Discourse Between Subdomains - Will This Work?


Note: Both instances below (server 1 and 2) running in docker containers on two different servers. Both servers running on both HTTP and HTTPS (ports 80 and 443) with Let’s Encrypt certs:

  1. Discourse fully running on server 1 with IP address 1, both HTTP and HTTPS:
  2. Discourse initialized and running (no additional posts or topics yet) on server 2 with IP address 2, both HTTP and HTTPS:


Move all from server 1 (testing) to server 2 (production) changing domain from to

Proposed Approach:

  1. Take a backup of Discourse on server 1
  2. Restore backup of Discourse (from server 1) on server 2

This should work flawlessly?

Or is there some gotacha’ to look out for?

Thanks for any pointers.


That should work. Do a

script/discourse remap // //

after the restore.



Worked… thanks.

But the avatars and did not restore, for some reason.

Maybe because this fails ?

script/discourse remap // //

Traceback (most recent call last):

2: from script/discourse:4:in `<main>'

1: from /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'

/usr/local/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- thor (LoadError)
1 Like

This worked:

su discourse -c 'bundle exec script/discourse remap // //

… and ran OK…

But the avatars not did port over in this restore process (we selected include images in the backup).


We got the avatars to work by porting over the images from server 1 to server 2 from here:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.