Connect to PostgreSQL addon
Overview
Apps on Cloudron use an internal PostgreSQL addon. Access the database from inside the server via an SSH tunnel for security.
This guide explains how to connect to the PostgreSQL addon from your local machine.
Database credentials
Get the database credentials:
- Open the Web terminal of an app.
- Run
env | grep CLOUDRON_POSTGRESQL. - Note the credentials. Each app has its own separate database and credentials.

Internal IP address
The internal IP address of the PostgreSQL server is 172.18.30.2.
DB clients
CLI
Connect via PostgreSQL CLI:
- Open a Web Terminal.
- Click the
PostgreSQLbutton at the top to paste the connection command. - Press Enter to execute the command.
DBeaver
DBeaver is a free multi-platform database tool for developers and database administrators.
Connect:
- Create a new PostgreSQL connection in DBeaver.
- Fill in the credentials from above:

- Configure the SSH tunnel by clicking the SSH tab:

You can now view the database:
