To generate synthetic databases, MOSTLY AI requires an empty database that it can use to write synthetic databases to. If there’s no possibility of creating an empty database in your existing systems, this short guide will help you create an empty Postgres database on your local machine that MOSTLY AI can access.

  1. Download, install, and launch Docker desktop

  2. Install and configure ngrok
    It’s free, but you have to sign up to use it.

  3. Create a file named mostly-ai-postgresql-compose.yml and paste the below contents.

    version: '3.7'
        image: postgres
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: changeme
          POSTGRES_DB: my_synthetic_db
          - "5432:5432"
          - mostly_ai_sd_db:/var/lib/postgresql/data
  4. Now you have everything ready to launch the enpty Postgres database.
    Open a terminal and execute docker compose -f ./mostly-ai-postgresql-compose.yml up -d

  5. To verify that your empty database is running, run docker compose -f ./mostly-ai-postgresql-compose.yml logs and check that the last line mentions database system is ready to accept connections.

  6. Lastly, you can expose your empty database to the internet by running ngrok tcp 5432.
    The output text shows what address and port you must use to create your connector.

To terminate your database, run docker compose -f mostly-ai-postgresql-compose.yml down in the folder where you saved the docker compose file.