# Change server to a two-container setup

**URL:** https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424
**Category:** Self-hosting
**Tags:** two-container
**Created:** [July 13, 2024, 3:16pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424 "2024-07-13T15:16:56Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![Saiano](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saiano/32/153394_2.png) [@Saiano](https://meta.discourse.org/u/Saiano)
#### Post date: [July 13, 2024, 3:16pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/1 "2024-07-13T15:16:56Z")

</div>

Hi,  
I have two questions:

- Wich domain name should I use when setting up a staging server to a local server?
- Is it possibile to install the staging server with 2 containers mode and restore data automatically from s3?  
Thank you

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 13, 2024, 3:21pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/2 "2024-07-13T15:21:17Z")

</div>

> [@Saiano](#):
>
> Is it possibile to install the staging server with 2 containers mode and restore data automatically from s3

Yes.

> [@Saiano](#):
>
> Wich domain name should I use when setting up a staging server to a local server?

Whatever domain the staging server has? I don’t understand the question. A local (development) server is on localhost and has no domain.

---

<div class="post-metadata">

### Author: ![Saiano](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saiano/32/153394_2.png) [@Saiano](https://meta.discourse.org/u/Saiano)
#### Post date: [July 13, 2024, 3:33pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/3 "2024-07-13T15:33:28Z")

</div>

> [@pfaffman](#):
>
> Whatever domain the staging server has? I don’t understand the question. A local (development) server is on localhost and has no domain.

Let’s explain better.

I want to migrate my single container forum to a new server with more ram, disk and cpu, switching to a 2 containes installation to speed up updates.

Doing a fresh install on the new server, I got an error indicating my actual forum domain.  
Maybe I made a mistake doing this [discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 14, 2024, 9:32am UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/4 "2024-07-14T09:32:04Z")

</div>

The easiest is to run discourse-setup with the - - two-container switch and restore your backup there.

> [@Saiano](#):
>
> Doing a fresh install on the new server, I got an error indicating my actual forum domain.

What error? When?

---

<div class="post-metadata">

### Author: ![Saiano](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saiano/32/153394_2.png) [@Saiano](https://meta.discourse.org/u/Saiano)
#### Post date: [July 14, 2024, 12:57pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/6 "2024-07-14T12:57:02Z")

</div>

> [@Saiano](#):
>
> This suggests that [frb.forumrossoblu.org](http://frb.forumrossoblu.org) resolves to some IP address that does not reach this  
> machine where you are installing discourse.

I think I missed the dns configuration.

---

<div class="post-metadata">

### Author: ![Saiano](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saiano/32/153394_2.png) [@Saiano](https://meta.discourse.org/u/Saiano)
#### Post date: [July 14, 2024, 2:49pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/7 "2024-07-14T14:49:44Z")

</div>

I’m wandering wich domain indicate installing staging server.  
Staging server will not be public, so I thought to use my website domain without changing DNS.  
I was wrong.

Any suggestions?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 14, 2024, 3:14pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/8 "2024-07-14T15:14:38Z")

</div>

You have to use some domain that resolves to your server just like they error message says. It doesn’t matter what it is, but it has to be public and work.

---

<div class="post-metadata">

### Author: ![Saiano](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saiano/32/153394_2.png) [@Saiano](https://meta.discourse.org/u/Saiano)
#### Post date: [July 15, 2024, 4:56pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/9 "2024-07-15T16:56:45Z")

</div>

Dns problem solved.

I’d like to turn off https for the staging server

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 15, 2024, 5:23pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/10 "2024-07-15T17:23:33Z")

</div>

> [@Saiano](#):
>
> I’d like to turn off https for the staging server

No. You would not. Discourse doesn’t work without https and even if it did your staging site would then be different from your production site so it would not be a very good test.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [July 15, 2024, 7:05pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/11 "2024-07-15T19:05:57Z")

</div>

I’m not totally sure if the topic was ever about stage server at this point, because

> [@Saiano](#):
>
> I want to migrate my single container forum to a new server with more ram, disk and cpu, switching to a 2 containes installation to speed up updates

Then staged will be very different than production one.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 15, 2024, 8:00pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/12 "2024-07-15T20:00:46Z")

</div>

> [@Jagster](#):
>
> I’m not totally sure if the topic was ever about stage server at this point, because

Well, if that’s the case then this should be in another topic.

@Saiano are you trying to have one server that you’re changing to a 2-container setup or do you want what the OP is about and have a second server to use to test upgrades before deploying them to the production server?

---

<div class="post-metadata">

### Author: ![Saiano](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saiano/32/153394_2.png) [@Saiano](https://meta.discourse.org/u/Saiano)
#### Post date: [July 15, 2024, 8:15pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/13 "2024-07-15T20:15:51Z")

</div>

> [@pfaffman](#):
>
> @Saiano are you trying to have one server that you’re changing to a 2-container setup or do you want what the OP is about and have a second server to use to test upgrades before deploying them to the production server?

I have one server with one container installation.  
I need to change hosting and test updates / bew feature before releasing in production installation.  
So i decided to

build a local instance with two container.  
Test the migration. (Online server —\> local staging)

Then I’ll buy a new server.  
Migrate my discourse to new hosting  
And keep local staging server to test.

Sorry if I made too many questions.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 15, 2024, 8:20pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/14 "2024-07-15T20:20:53Z")

</div>

The problem is that the local server will be an entirely different development installation, which will be different from a production deployment.

I recommend that you start at the “buy a new server” step, or make your “local server” be a VM with at least 2GB of RAM. You can follow [Move a Discourse site to another VPS with rsync](https://meta.discourse.org/t/move-a-discourse-site-to-another-vps-with-rsync/43812) with some modifications to set up the new server with the cert from the existing server and then do local DNS changes to point to it.

OR you can just set up the test server on a new temporary test subdomain and skip the fancy DNS stuff. And if you do it this way and just have them share S3 backup config set in the `yml` files, then you can restore the database from the existing site to the new one directly from the s3 bucket.

---

<div class="post-metadata">

### Author: ![Saiano](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saiano/32/153394_2.png) [@Saiano](https://meta.discourse.org/u/Saiano)
#### Post date: [July 16, 2024, 4:50am UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/15 "2024-07-16T04:50:45Z")

</div>

I’ll try this way. I already have backups on s3.  
Maybe I use [test.mydomain.com](http://test.mydomain.com) then restore and change domain name to the original one?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 16, 2024, 12:32pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/16 "2024-07-16T12:32:31Z")

</div>

It’ll be easier to change the new server domain name and then restore the backup again. That will handle all of the hostname mapping stuff.

---

<div class="post-metadata">

### Author: ![Saiano](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saiano/32/153394_2.png) [@Saiano](https://meta.discourse.org/u/Saiano)
#### Post date: [July 27, 2024, 8:00pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/17 "2024-07-27T20:00:34Z")

</div>

> [@pfaffman](#):
>
> sier to change the new server domain name and then restore the backup again. That wi

Trying doing this, I have problems changing the domain name. The site was not accessible.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 27, 2024, 8:52pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/18 "2024-07-27T20:52:06Z")

</div>

If you tried to get a certificate several times, say by rebuilding when dns wasn’t right then you may be rate limited. If that’s the case you can wait a week or add another hostname like

[Set up Let’s Encrypt with multiple domains / redirects](https://meta.discourse.org/t/set-up-let-s-encrypt-with-multiple-domains-redirects/56685)

---

<div class="post-metadata">

### Author: ![Saiano](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saiano/32/153394_2.png) [@Saiano](https://meta.discourse.org/u/Saiano)
#### Post date: [July 29, 2024, 8:06pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/19 "2024-07-29T20:06:16Z")

</div>

I moved the letsencrypt folder from the old site to the new one and it works.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [August 28, 2024, 8:06pm UTC](https://meta.discourse.org/t/change-server-to-a-two-container-setup/316424/20 "2024-08-28T20:06:54Z")

</div>

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