# How to connect to the database externally under discourse container deployment method, for example using DBeaver

**URL:** https://meta.discourse.org/t/discourse-dbeaver/367730
**Category:** Support
**Created:** [May 27, 2025, 9:05am UTC](https://meta.discourse.org/t/discourse-dbeaver/367730 "2025-05-27T09:05:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![singi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/singi/32/269285_2.png) [@singi](https://meta.discourse.org/u/singi)
#### Post date: [May 27, 2025, 9:05am UTC](https://meta.discourse.org/t/discourse-dbeaver/367730/1 "2025-05-27T09:05:11Z")

</div>

In the discourse container deployment method, how to connect to the database externally, for example using DBeaver to connect

---

<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: [May 27, 2025, 7:33pm UTC](https://meta.discourse.org/t/discourse-dbeaver/367730/3 "2025-05-27T19:33:55Z")

</div>

You’d need to look at the two-container setup, or find some other way to assign a password to the Discourse user and expose the postgres port, something like

```plaintext
expose:
  - "80:80" # http
  - "443:443" # https
  - "127.0.0.1:5432:5432"

```

But what problem are you solving? Maybe just use [Discourse Data Explorer](https://meta.discourse.org/t/discourse-data-explorer/32566).

---

<div class="post-metadata">

### Author: ![singi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/singi/32/269285_2.png) [@singi](https://meta.discourse.org/u/singi)
#### Post date: [May 28, 2025, 2:37am UTC](https://meta.discourse.org/t/discourse-dbeaver/367730/4 "2025-05-28T02:37:00Z")

</div>

Thank you very much, I will try this plugin.
