# PostgreSQL Details

**URL:** https://meta.discourse.org/t/postgresql-details/227336
**Category:** Self-hosting
**Created:** [May 17, 2022, 8:18pm UTC](https://meta.discourse.org/t/postgresql-details/227336 "2022-05-17T20:18:42Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Marcell\_Csendes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcell_csendes/32/258562_2.png) [@Marcell\_Csendes](https://meta.discourse.org/u/Marcell_Csendes)
#### Post date: [May 17, 2022, 8:18pm UTC](https://meta.discourse.org/t/postgresql-details/227336/1 "2022-05-17T20:18:43Z")

</div>

Hey,

I was wondering how do you access Postgresql details? Like where would I see the pw and the user for instance? I know the rest of course.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 17, 2022, 8:26pm UTC](https://meta.discourse.org/t/postgresql-details/227336/2 "2022-05-17T20:26:56Z")

</div>

Take a look at this Topic, it gives you the series of commands you need about half way down:

> [@PostgreSQL 13 update](https://meta.discourse.org/t/postgresql-13-update/172563):
>
> warning WARNING! If your database is very large, you will need a lot of extra disk space (2x database size) and should be very careful with this upgrade! We’ve just landed changes to upgrade our Docker image to PostgreSQL 13. Any site admins rebuilding Discourse from the command line will be upgraded to PostgreSQL 13 from the previous PostgreSQL 12. Note that if you held back from upgrading when the PostgreSQL 12 update [happened back in May](https://meta.discourse.org/t/postgresql-12-update/151236), you can skip that upgrade and go straight to P…

---

<div class="post-metadata">

### Author: ![Marcell\_Csendes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcell_csendes/32/258562_2.png) [@Marcell\_Csendes](https://meta.discourse.org/u/Marcell_Csendes)
#### Post date: [May 17, 2022, 8:29pm UTC](https://meta.discourse.org/t/postgresql-details/227336/3 "2022-05-17T20:29:36Z")

</div>

I didn’t expect it to be this of a big deal to just get password and username lol

---

<div class="post-metadata">

### Author: ![cocococosti](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cocococosti/32/231474_2.png) [@cocococosti](https://meta.discourse.org/u/cocococosti)
#### Post date: [May 17, 2022, 8:40pm UTC](https://meta.discourse.org/t/postgresql-details/227336/4 "2022-05-17T20:40:15Z")

</div>

Assuming you have a standard Discourse docker installation, you can connect to the postgres database with the `postgres` user. No password needed:

```plaintext
cd /var/discourse
./launcher enter app
su postgres
psql
\c discourse

```

If you want to list all users you can run `\du`

---

<div class="post-metadata">

### Author: ![Marcell\_Csendes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcell_csendes/32/258562_2.png) [@Marcell\_Csendes](https://meta.discourse.org/u/Marcell_Csendes)
#### Post date: [May 17, 2022, 8:41pm UTC](https://meta.discourse.org/t/postgresql-details/227336/5 "2022-05-17T20:41:46Z")

</div>

I wished to access from a desktop app like DBeaver, which is why I was curious. Obviously I don’t want to force change the user password as it would break the community.

---

<div class="post-metadata">

### Author: ![cocococosti](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cocococosti/32/231474_2.png) [@cocococosti](https://meta.discourse.org/u/cocococosti)
#### Post date: [May 17, 2022, 8:53pm UTC](https://meta.discourse.org/t/postgresql-details/227336/6 "2022-05-17T20:53:44Z")

</div>

Never used DBeaver before but I think it should work with an empty password [Connection without password is not supported · Issue #6269 · dbeaver/dbeaver · GitHub](https://github.com/dbeaver/dbeaver/issues/6269)

---

<div class="post-metadata">

### Author: ![Marcell\_Csendes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcell_csendes/32/258562_2.png) [@Marcell\_Csendes](https://meta.discourse.org/u/Marcell_Csendes)
#### Post date: [May 17, 2022, 9:00pm UTC](https://meta.discourse.org/t/postgresql-details/227336/7 "2022-05-17T21:00:45Z")

</div>

Hmm, that might work but I also received “FATAL: password authentication failed for user “discourse””

---

<div class="post-metadata">

### Author: ![cocococosti](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cocococosti/32/231474_2.png) [@cocococosti](https://meta.discourse.org/u/cocococosti)
#### Post date: [May 17, 2022, 9:04pm UTC](https://meta.discourse.org/t/postgresql-details/227336/8 "2022-05-17T21:04:10Z")

</div>

Try with `postgres` as the username.

---

<div class="post-metadata">

### Author: ![Marcell\_Csendes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcell_csendes/32/258562_2.png) [@Marcell\_Csendes](https://meta.discourse.org/u/Marcell_Csendes)
#### Post date: [May 17, 2022, 9:08pm UTC](https://meta.discourse.org/t/postgresql-details/227336/9 "2022-05-17T21:08:23Z")

</div>

```plaintext
                                   List of roles
 Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
 discourse | | {}
 postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}

```

It must be discourse, but then it should be something with the authentication.

---

<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: [May 17, 2022, 10:03pm UTC](https://meta.discourse.org/t/postgresql-details/227336/10 "2022-05-17T22:03:08Z")

</div>

We configure the database to trust and allow connections from the same IP without a password, so there isn’t a password for you to find.

If you have a standard Discourse install, you will need to:

- change the app.yml configuration to expose the 5432 port to the external world

- create a new username/password pair that has read access to the tables you want

---

<div class="post-metadata">

### Author: ![Marcell\_Csendes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcell_csendes/32/258562_2.png) [@Marcell\_Csendes](https://meta.discourse.org/u/Marcell_Csendes)
#### Post date: [May 18, 2022, 8:07am UTC](https://meta.discourse.org/t/postgresql-details/227336/11 "2022-05-18T08:07:55Z")

</div>

Yeah, the port expose was clear in the first place.

Uhm, I have no idea why I didn’t think of the new user lol, that worked. Thx

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 18, 2022, 8:52am UTC](https://meta.discourse.org/t/postgresql-details/227336/12 "2022-05-18T08:52:35Z")

</div>

Consider the [data explorer](https://meta.discourse.org/t/32566?silent=true) plugin, much less hassle!

---

<div class="post-metadata">

### Author: ![Marcell\_Csendes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcell_csendes/32/258562_2.png) [@Marcell\_Csendes](https://meta.discourse.org/u/Marcell_Csendes)
#### Post date: [May 18, 2022, 9:18am UTC](https://meta.discourse.org/t/postgresql-details/227336/13 "2022-05-18T09:18:34Z")

</div>

I see your idea, the reason I went with DBeaver, is because I deal with more databases beside of Discourse’s, so that’s why decided to do this way.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 18, 2022, 9:25am UTC](https://meta.discourse.org/t/postgresql-details/227336/14 "2022-05-18T09:25:26Z")

</div>

Sure that makes complete sense. I’d have done the same had I not become more familiar with discourse’s ecosystem.

---

<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: [June 17, 2022, 9:26am UTC](https://meta.discourse.org/t/postgresql-details/227336/15 "2022-06-17T09:26:00Z")

</div>

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