# pgSQL root access - without? (docker)

**URL:** https://meta.discourse.org/t/pgsql-root-access-without-docker/185940
**Category:** Self-hosting
**Created:** [April 7, 2021, 6:30pm UTC](https://meta.discourse.org/t/pgsql-root-access-without-docker/185940 "2021-04-07T18:30:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lejeczek](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lejeczek](https://meta.discourse.org/u/lejeczek)
#### Post date: [April 7, 2021, 6:30pm UTC](https://meta.discourse.org/t/pgsql-root-access-without-docker/185940/1 "2021-04-07T18:30:50Z")

</div>

Hi guys.  
I’m trying to have Discourse to use already up&running, a remote pgSQL server (over which I don’t have admin control, though I can talk to the admin)  
Question - is it possible, while deploying with/in Docker container, to set up Discourse without giving out pgSQL root/admin?  
Are there any consideration in such a scenario?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 7, 2021, 6:44pm UTC](https://meta.discourse.org/t/pgsql-root-access-without-docker/185940/2 "2021-04-07T18:44:12Z")

</div>

What do you mean by “pgSQL root” ?

The PostgreSQL user supplied to Discourse doesn’t need to be a “SUPERUSER” as long as your prepare it before hand as documented in [Running Discourse with a separate PostgreSQL server](https://meta.discourse.org/t/running-discourse-with-a-separate-postgresql-server/46375)

---

<div class="post-metadata">

### Author: ![lejeczek](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lejeczek](https://meta.discourse.org/u/lejeczek)
#### Post date: [April 14, 2021, 9:52am UTC](https://meta.discourse.org/t/pgsql-root-access-without-docker/185940/3 "2021-04-14T09:52:54Z")

</div>

Does the same apply when deploying in docker?  
Can we, in docker, when deploying also tell Discourse to use external both pgSQL and Redis?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [April 14, 2021, 10:03am UTC](https://meta.discourse.org/t/pgsql-root-access-without-docker/185940/4 "2021-04-14T10:03:37Z")

</div>

Yes You can do that by defining the external Postgres & redis parameters in the yml refer [Configure Discourse to use a separate PostgreSQL server](https://meta.discourse.org/t/running-discourse-with-a-separate-postgresql-server/46375)
