# Various multisite installation questions

**URL:** https://meta.discourse.org/t/various-multisite-installation-questions/398693
**Category:** Self-hosting
**Created:** [June 20, 2024, 10:52pm UTC](https://meta.discourse.org/t/various-multisite-installation-questions/398693 "2024-06-20T22:52:39Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Isambard](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@Isambard](https://meta.discourse.org/u/Isambard)
#### Post date: [June 20, 2024, 10:52pm UTC](https://meta.discourse.org/t/various-multisite-installation-questions/398693/1 "2024-06-20T22:52:39Z")

</div>

I was wondering what does the `db_id: 2` value in the suggested config above do?

Also, what is the procedure to add a new site to the existing multisite set-up? Is it just:

- Update yaml
- ./launcher bootstrap multisite \[1\]
- ./launcher start multisite

I was wondering if there was a way to avoid impacting all the other existing sites by doing a full bootstrap or rebuild and somehow just add the extra database needed?

* * *

1. I tried `./launcher rebuild multisite` first, but this seems to fail

---

<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: [June 20, 2024, 11:10pm UTC](https://meta.discourse.org/t/various-multisite-installation-questions/398693/2 "2024-06-20T23:10:47Z")

</div>

I think that the db id is no longer needed.

You can just edit the multisite file with the new site and do a

```
sv restart unicorn

```

And then migrate the database.

---

<div class="post-metadata">

### Author: ![Isambard](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@Isambard](https://meta.discourse.org/u/Isambard)
#### Post date: [June 20, 2024, 11:38pm UTC](https://meta.discourse.org/t/various-multisite-installation-questions/398693/3 "2024-06-20T23:38:35Z")

</div>

You are a life-saver!

> [@pfaffman](#):
>
> `sv restart unicorn`

I was missing this command to restart (I also tried sv reload unicorn but somehow that wasn’t enough).

In terms of creating the database, is there already a way to do this automatically? It would be nice to have `rake db:create[mynewdbname]`. Otherwise, I can write a short shell script.

At the moment, I create manually (create db and set permissions) and then do a RAILS\_DB=newdb rake db:migrate to populate it.

---

<div class="post-metadata">

### Author: ![Isambard](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@Isambard](https://meta.discourse.org/u/Isambard)
#### Post date: [June 20, 2024, 11:42pm UTC](https://meta.discourse.org/t/various-multisite-installation-questions/398693/4 "2024-06-20T23:42:03Z")

</div>

And just to check if I’m doing something stupid:

- At the moment, I’m editing the multisite file within docker (/var/www/discourse/config/multisite.yml)
- Creating the db manually
- Running rake db:migrate
- sv restart unicorn
- I then also have to edit the yaml file outside of docker so that the multisite config is in sync in case of any future rebuild or upgrades.

Am I being silly editing the mutisite config in 2 different places when there’s already a way to edit in one place and push the changes through?

---

<div class="post-metadata">

### Author: ![lorentedford](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lorentedford/32/435026_2.png) [@lorentedford](https://meta.discourse.org/u/lorentedford)
#### Post date: [August 2, 2024, 8:17am UTC](https://meta.discourse.org/t/various-multisite-installation-questions/398693/5 "2024-08-02T08:17:57Z")

</div>

Is it possible to clean up this documentation a bit and provide a bit more directions in it? I am extremely new to Docker first off and although I have linux server experience I am not a pro at it. I am an old schooler love my cron jobs and shell scripts and you know weird stuff like that with apache multi site etc. But this is a bit more complex and using a different programming language than I am use to.. Maybe even possibly an Demonstration video of some kind? It would be nice if discourse was just made multi site ready and that way all you would have to do is just edit a few files etc.

---

<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: [August 2, 2024, 10:25am UTC](https://meta.discourse.org/t/various-multisite-installation-questions/398693/6 "2024-08-02T10:25:30Z")

</div>

Just paste in that stanza of text and edit it to suit.

You also then either need a reverse proxy or to follow [Set up Let’s Encrypt with multiple domains / redirects](https://meta.discourse.org/t/set-up-let-s-encrypt-with-multiple-domains-redirects/56685) to get certs for all of the domains.

See also [Setup Multisite Configuration with Let’s Encrypt and no Reverse Proxy](https://meta.discourse.org/t/setup-multisite-configuration-with-lets-encrypt-and-no-reverse-proxy/175285). But that needs to get updated to have another line required that you can get from the previous link. I’ve been meaning to update it but haven’t managed

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [February 16, 2025, 1:45am UTC](https://meta.discourse.org/t/various-multisite-installation-questions/398693/7 "2025-02-16T01:45:29Z")

</div>

If I’m doing multisite, where should I point my domain to? The same IP as the server (which hosts another forum)?

---

<div class="post-metadata">

### Author: ![bananaman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bananaman/32/493705_2.png) [@bananaman](https://meta.discourse.org/u/bananaman)
#### Post date: [March 13, 2025, 9:40am UTC](https://meta.discourse.org/t/various-multisite-installation-questions/398693/8 "2025-03-13T09:40:19Z")

</div>

Yes, point all domains to the same server IP.  
Set up a revers proxy with Nginx or Caddy server.  
[Caddy](https://meta.discourse.org/t/use-caddy-instead-of-ngnix-as-your-reverse-proxy/54716) is the best as it gives free automatic SSL certs to all your domains.

---

<div class="post-metadata">

### Author: ![Padoup-Padoup](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/padoup-padoup/32/335841_2.png) [@Padoup-Padoup](https://meta.discourse.org/u/Padoup-Padoup)
#### Post date: [January 19, 2026, 8:38pm UTC](https://meta.discourse.org/t/various-multisite-installation-questions/398693/9 "2026-01-19T20:38:42Z")

</div>

I followed this tutorial to set up with success a multisite install with Docker. I recently [ran into an error when trying to upgrade](https://meta.discourse.org/t/mutlisite-installation-pnpm-permission-error-during-rebuild/393702/2) and I believe the line:

```plaintext
    - exec: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate

```

Should be edited to:

```plaintext
    - exec: cd /var/www/discourse && sudo -H -E -u discourse bundle exec rake multisite:migrate

```

Could anyone confirm/edit the tutorial?

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [January 19, 2026, 9:15pm UTC](https://meta.discourse.org/t/various-multisite-installation-questions/398693/10 "2026-01-19T21:15:09Z")

</div>

Yes. I ran into this too. You want to make that change otherwise your bootstrap will fail.
