Connecting to a Cloudron postgres database via metabase
  • Cloudron has a post on how to do this here. The first section below is a direct copy of that, and the last section is a condensed version with a few bits added


  • Overview

  • Apps on Cloudron use an internal PostgreSQL database (addon). For security reasons, the database is only accessible from inside the server and cannot be accessed directly from outside. Instead, the database is accessed using an SSH tunnel to the server.

  • In this guide, we will see how to connect to the PostgreSQL addon database from outside (say, your laptop/PC).

  • Database credentials

  • To get the database credentials, open the Web terminal of an app and run env | grep CLOUDRON_POSTGRESQL. Make a note of the credentials. Note that each app has it's own separate database and thus it's own database credentials.

  • Internal IP Address

  • The internal IP address of the PostgreSQL server is 172.18.30.2.


  • Summary

    • To get your connection credentials, open the Cloudron web terminal and type env | grep CLOUDRON_POSTGRESQL

    • Open Metabase and add a new table. Use the credentials from the first step. For host use 172.18.30.2

    • Enable the "Use an SSH tunnel" toggle. For host, use the ip address of the server that Cloudron is hosted on. Assuming we're on the normal VM setup, use root as the username and set the authentication depending on how we generally access that server (e.g. password or ssh key)


  • Website Page