- 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.
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:
- Select the New Connection Wizard button in the toolbar or the Connections view, or press Ctrl+Shift+N.
- Select PostgreSQL in the driver list (you can search for it) and select Next.
- On the Main tab, set Connect by to Host, then enter the Host, Port (5432 unless your server uses another port) and Database.
- 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.
- 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.
- 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.
| Field | What to enter |
|---|---|
| Connect by | Host (separate fields) or URL (a JDBC URL) |
| Host | Server name or IP address; localhost for a local or tunnelled server |
| Port | 5432 by default |
| Database | The database to open, for example postgres or mydb |
| Authentication | Username and password, or another supported method |
| Driver Settings | Opens 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.
host postgres all 192.168.12.10/32 scram-sha-256SELECT 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
- DBeaver docs: Create connection
- DBeaver docs: PostgreSQL
- DBeaver docs: SSH configuration
- DBeaver docs: SSL configuration
- DBeaver docs: FAQ (driver version)
- PostgreSQL 18 docs: Connection settings
- PostgreSQL 18 docs: The pg_hba.conf file
- PostgreSQL 18 docs: Authentication problems
- PostgreSQL JDBC driver: Using SSL
- PostgreSQL versioning policy
Checked 8 October 2026.
How we research tool guides: our editorial method. CodeWithSQL earns nothing from the vendors mentioned.