# Install the docker version with a remote postgresql

**URL:** https://meta.discourse.org/t/install-the-docker-version-with-a-remote-postgresql/46329
**Category:** Self-hosting
**Created:** [June 23, 2016, 12:48pm UTC](https://meta.discourse.org/t/install-the-docker-version-with-a-remote-postgresql/46329 "2016-06-23T12:48:54Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Bertrand\_Bellenot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bertrand_bellenot/32/91890_2.png) [@Bertrand\_Bellenot](https://meta.discourse.org/u/Bertrand_Bellenot)
#### Post date: [June 23, 2016, 12:48pm UTC](https://meta.discourse.org/t/install-the-docker-version-with-a-remote-postgresql/46329/1 "2016-06-23T12:48:54Z")

</div>

Hello,

We are migrating our phpbb3 forum to discourse (yeah!)  
So I’m trying to install (configure) a standard discourse (docker version) with a remote postgresql server (centrally provided by IT, for which I don’t have superuser permission)  
Is there a simple explanation (or a concrete example) how to do it?  
Thanks in advance!

Cheers, Bertrand.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 23, 2016, 5:28pm UTC](https://meta.discourse.org/t/install-the-docker-version-with-a-remote-postgresql/46329/2 "2016-06-23T17:28:16Z")

</div>

Unfortunately I don’t think it will be possible to install Discourse without super user account in Postgres.

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [June 23, 2016, 11:29pm UTC](https://meta.discourse.org/t/install-the-docker-version-with-a-remote-postgresql/46329/3 "2016-06-23T23:29:12Z")

</div>

> [@codinghorror](#):
>
> Unfortunately I don’t think it will be possible to install Discourse without super user account in Postgres.

Hmm, I dunno… the only thing you should need superuser for is to create the DB and role; from there, the regular user can do everything. So if Central IT (all praise the glorious Leader!) do those bits, and the config in `app.yml` is setup with the correct creds, surely it’d work OK?

`/me gives it a go`

OK, that worked well enough (for the most part). I’ll write up a howto topic and link it from here, since there are a few steps to making it work right.

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [June 23, 2016, 11:48pm UTC](https://meta.discourse.org/t/install-the-docker-version-with-a-remote-postgresql/46329/4 "2016-06-23T23:48:31Z")

</div>

Give [this new, shiny howto](https://meta.discourse.org/t/running-discourse-with-a-separate-postgresql-server/46375) a go, and post in that topic if you’ve got any problems.

---

<div class="post-metadata">

### Author: ![Bertrand\_Bellenot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bertrand_bellenot/32/91890_2.png) [@Bertrand\_Bellenot](https://meta.discourse.org/u/Bertrand_Bellenot)
#### Post date: [June 24, 2016, 6:29am UTC](https://meta.discourse.org/t/install-the-docker-version-with-a-remote-postgresql/46329/5 "2016-06-24T06:29:28Z")

</div>

Thank you very much everybody, I will give it a try and let you know.

Cheers, Bertrand.

---

<div class="post-metadata">

### Author: ![Bertrand\_Bellenot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bertrand_bellenot/32/91890_2.png) [@Bertrand\_Bellenot](https://meta.discourse.org/u/Bertrand_Bellenot)
#### Post date: [June 24, 2016, 10:24am UTC](https://meta.discourse.org/t/install-the-docker-version-with-a-remote-postgresql/46329/6 "2016-06-24T10:24:30Z")

</div>

Hi Matt,

It seems to work! Thank you very much! 😀  
I’ll post again if something goes wrong with the DB…

Cheers, Bertrand.

---

<div class="post-metadata">

### Author: ![Bertrand\_Bellenot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bertrand_bellenot/32/91890_2.png) [@Bertrand\_Bellenot](https://meta.discourse.org/u/Bertrand_Bellenot)
#### Post date: [February 23, 2017, 9:42pm UTC](https://meta.discourse.org/t/install-the-docker-version-with-a-remote-postgresql/46329/7 "2017-02-23T21:42:04Z")

</div>

Do we have to modify the web.template.yml file?  
In particular this part:

```
env:
  # You can have redis on a different box
  RAILS_ENV: 'production'
  UNICORN_WORKERS: 3
  UNICORN_SIDEKIQS: 1
  # this gives us very good cache coverage, 96 -> 99
  # in practice it is 1-2% perf improvement
  RUBY_GLOBAL_METHOD_CACHE_SIZE: 131072
  # stop heap doubling in size so aggressively, this conserves memory
  RUBY_GC_HEAP_GROWTH_MAX_SLOTS: 40000
  RUBY_GC_HEAP_INIT_SLOTS: 400000
  RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR: 1.5

  DISCOURSE_DB_SOCKET: /var/run/postgresql
  DISCOURSE_DB_HOST:
  DISCOURSE_DB_PORT:

```

Shouldn’t this also point to our remote postgresql instance?  
(same question for any other configuration file…)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 23, 2017, 9:58pm UTC](https://meta.discourse.org/t/install-the-docker-version-with-a-remote-postgresql/46329/8 "2017-02-23T21:58:04Z")

</div>

Not really , everything in ‘app.yml’ overrides the templates it mixes in

---

<div class="post-metadata">

### Author: ![Bertrand\_Bellenot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bertrand_bellenot/32/91890_2.png) [@Bertrand\_Bellenot](https://meta.discourse.org/u/Bertrand_Bellenot)
#### Post date: [February 23, 2017, 10:01pm UTC](https://meta.discourse.org/t/install-the-docker-version-with-a-remote-postgresql/46329/9 "2017-02-23T22:01:39Z")

</div>

OK, thanks! And BTW, I really love Discourse! 🙂  
Thanks to your help, we finally migrated from our phpBB forum to Discourse (today) 🙂

Cheers, Bertrand.
