Skip to content
Guide · DBeaver

How to Connect DBeaver to PostgreSQL

Connecting DBeaver to PostgreSQL takes a host, port, database, user and password, plus an SSH tunnel or SSL settings when the server is remote. This guide follows DBeaver's documented connection wizard and explains the PostgreSQL-side errors you are most likely to meet.

Steps and facts checked 8 October 2026 against the vendor's official documentation. Versions covered: DBeaver Community 26.2.2; PostgreSQL 18 (supported versions 14 to 18). Next review due April 2027. Menus, shortcuts and prices change between releases; check the vendor's documentation for your version.
Short answer
  • Open the New Connection wizard (toolbar button or Ctrl+Shift+N), choose PostgreSQL, fill in Host, Port (default 5432), Database and credentials, then select Test Connection and Finish.
  • Use the PostgreSQL driver for current servers; DBeaver keeps a separate PostgreSQL (old) driver for versions below 8.x.
  • For a server you cannot reach directly, add an SSH tunnel from the connection dialog; for encrypted connections, add SSL and choose an SSL mode.
  • Most failures come from the server side: listen_addresses, a missing pg_hba.conf entry, or a wrong password or database name.
How we know: Research-based: the connection steps and fields were checked against the DBeaver documentation (Create connection, PostgreSQL, SSH configuration, SSL configuration, FAQ), and server-side settings and error messages against the PostgreSQL 18 and PostgreSQL JDBC driver documentation on 8 October 2026. We have not made these connections for this guide; dialog labels are quoted from DBeaver's documentation and may differ slightly between versions.

Before you start

You need DBeaver installed (see the DBeaver install guide) and these details for the PostgreSQL server: host name or IP address, port, database name, user name and password. The PostgreSQL default port is 5432. If the server is on another machine, check two server settings before you blame DBeaver:

  • listen_addresses. According to the PostgreSQL documentation, the default value is localhost, which allows only local loopback connections. A remote client cannot connect until the server listens on a network interface.
  • pg_hba.conf. The server must have a matching host-based authentication entry for your user, database and client address.

Create the DBeaver PostgreSQL connection

The steps below follow DBeaver's Create connection and PostgreSQL documentation:

  1. Select the New Connection Wizard button in the toolbar or the Connections view, or press Ctrl+Shift+N.
  2. Select PostgreSQL in the driver list (you can search for it) and select Next.
  3. On the Main tab, set Connect by to Host, then enter the Host, Port (5432 unless your server uses another port) and Database.
  4. Under Authentication, choose username and password authentication and enter the user and password. Other documented options include pgpass, Kerberos, SSPI (Windows single sign-on) and cloud IAM methods.
  5. Tick Show all databases if you want every database on the server in the Connections tree. DBeaver notes this works only when connecting by host, not by URL.
  6. Select Test Connection. The result dialog shows the driver version. Then select Finish.

The new connection appears in the Connections tree. From there you can open a SQL editor, browse schemas, or open an ER diagram of a schema.

PostgreSQL fields on the Main tab (from the DBeaver PostgreSQL documentation)
FieldWhat to enter
Connect byHost (separate fields) or URL (a JDBC URL)
HostServer name or IP address; localhost for a local or tunnelled server
Port5432 by default
DatabaseThe database to open, for example postgres or mydb
AuthenticationUsername and password, or another supported method
Driver SettingsOpens the driver editor (libraries, version, properties)

Connecting through an SSH tunnel or with SSL

SSH tunnel

Use an SSH tunnel when PostgreSQL is not reachable from your network but an SSH server in front of it is. In the connection dialog, select the plus button and choose SSH; an SSH tab appears. Enter the SSH Host/IP, Port (22 by default) and User name, choose Password, Public Key or Agent authentication, and select Test tunnel configuration.

DBeaver's SSH guide then says to set the host on the Main tab to localhost, which is right when PostgreSQL runs on the SSH server itself. DBeaver forwards a random local port to the database port automatically, but only for host-based connections: if you connect by URL, you must set the local and remote ports yourself in the tunnel's advanced settings. Jump servers are supported for multi-hop access.

SSL

Select the plus button and choose SSL. The SSL tab takes the CA certificate, client certificate and client private key paths, and an SSL Mode. The PostgreSQL JDBC driver documents the same modes as libpq: require fails if the connection cannot be encrypted, verify-ca also checks the certificate chain, and verify-full also checks that the host name matches the certificate. The driver documentation recommends verify-full in most security-sensitive environments.

If you see a PKIX path building failed error, DBeaver's SSL page points to an incorrect SSL configuration; import the server's CA certificate rather than disabling validation on production servers.

Common DBeaver PostgreSQL connection errors

These messages come from PostgreSQL, so the fix is usually on the server. The explanations follow the PostgreSQL 18 documentation.

  • Connection refused or timed out. The server is not listening on the address you used, a firewall blocks port 5432, or the host or port is wrong. Check listen_addresses (a change needs a server restart) and the firewall.
  • no pg_hba.conf entry for host ... PostgreSQL received the request but found no matching line in pg_hba.conf. Add an entry for the client address, database, user and authentication method, then reload the configuration.
  • password authentication failed for user ... The server is willing to talk to you, but the password (or Kerberos or ident setup) does not satisfy the method in pg_hba.conf.
  • database ... does not exist or user ... does not exist. Check the spelling and case of the name in the Main tab.

PostgreSQL's documentation adds that the server log often has more detail about an authentication failure than the client sees. In DBeaver, Window, Show View, Error Log shows client-side errors.

Example pg_hba.conf entry from the PostgreSQL documentation (one client address, password auth)
host    postgres        all             192.168.12.10/32        scram-sha-256
Reload the configuration after editing pg_hba.conf (PostgreSQL, run as a superuser)
SELECT pg_reload_conf();

Frequently asked questions

What port does DBeaver use for PostgreSQL?

DBeaver uses the port you enter on the Main tab, which defaults to 5432, the standard PostgreSQL port. When you use an SSH tunnel with a host-based connection, DBeaver forwards a random local port to that database port for you.

How do I see all PostgreSQL databases in DBeaver?

Edit the connection and tick Show all databases on the Main tab. It works only when you connect by host, not by URL.

How do I update the PostgreSQL driver in DBeaver?

Right-click the connection, choose Edit Connection, select Driver Settings, open the Libraries tab and use Download/Update. Test Connection shows the driver version in use.

Can DBeaver connect to a PostgreSQL server in Docker?

Yes, as long as the container publishes the PostgreSQL port to the host. Connect to localhost and the published port with the user and password set for the container.

Does DBeaver support PostgreSQL 18?

DBeaver's PostgreSQL documentation says it supports all versions of PostgreSQL, with the PostgreSQL driver for current versions and PostgreSQL (old) for versions below 8.x.

Sources

Checked 8 October 2026.

How we research tool guides: our editorial method. CodeWithSQL earns nothing from the vendors mentioned.

Still choosing a SQL client?

Read the full reviews, or compare tools side by side.