# Configure Discourse to use a separate PostgreSQL server

**URL:** <https://meta.discourse.org/t/configure-discourse-to-use-a-separate-postgresql-server/46375>\
**Category:** Self-Hosting\
**Tags:** how-to\
**Created:** [6월 23, 2016, 11:48오후 UTC](https://meta.discourse.org/t/configure-discourse-to-use-a-separate-postgresql-server/46375 "2016-06-23T23:48:02Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)\
**Post date:** [9월 22, 2017, 5:44오전 UTC](https://meta.discourse.org/t/configure-discourse-to-use-a-separate-postgresql-server/46375/13 "2017-09-22T05:44:44Z")

</div>

Hi guys, possible of my personal server configuration or what else.. But I found a solution by running a docker in hosted mode (not bridged as default):

```plaintext
/var/discourse/launcher rebuild app --docker-args --net=host --skip-mac-address

```

After that the discourse engine could connect to external postgres database, run at 127.0.0.1:5432. Default bridged mode [does not allow](https://stackoverflow.com/a/24326540/3013944) docker to access ports listening at the host without tricks.

Hope this might help somebody.

---

_[View the full topic](https://meta.discourse.org/t/configure-discourse-to-use-a-separate-postgresql-server/46375)._
