Managed Postgres

Sometimes you want to use your own PostgreSQL database instead of the one provided by Supervisely. For example, you may want to use your own database for security reasons or because you already have a PostgreSQL database running in your infrastructure, or you require high availability and fault tolerance.

In this case, you will have to configure Supervisely to use your own database instead of the one provided by default.

Managed Postgres providers examples: Amazon RDS, Google Cloud SQL, Azure Database for PostgreSQL, etc.


To configure Supervisely to use your own database, you will have to edit the .env file which you can find in the workdir of your Supervisely installation. You can find the folder by running this command:

cd $(sudo supervisely where)

The .env file contains the following lines:


which is used in docker-compose.yml as:


In case you don't have POSTGRES_SSL in your configuration, you will have to upgrade your Supervisely installation to the latest version (at least 6.8.47).

You will have to change the values of the variables to match your database configuration. For example, if you are using Amazon RDS, you will have to change the values to something like this:


After that you will need to redeploy Supervisely services:

sudo supervisely up -d

In case you get errors or "License not found", please contact Supervisely support and attach the troubleshoot archive

Database migration

If you're migrating to Amazon RDS you can follow this guide as well.

In case you already have your valuable data in a local Supervisely database then you will need to transfer it to the new database. The migration is rather simple and can be done in a few steps:

  1. Stop Supervisely services and export your local database using pg_dump:

sudo supervisely stop
sudo supervisely start postgres
sudo supervisely exec postgres pg_dump -U postgres -C clicker > supervisely_postgres_dump.sql
  1. Restore the database dump to your own database:

PGPASSWORD=your_rds_password psql -h your_rds_endpoint -U your_rds_username -f /path/to/host/supervisely_postgres_dump.sql

Last updated