Search code examples
postgresqldockerpasswordsthingsboard

Which are the user and password for the Postgres database inside the thingsboard/tb-cassandra Docker container?


The Docker image for Thingsboard with Cassandra (thingsboard/tb-cassandra) also has a Postgres database to store metadata among other things.

I need to connect to this Postgres database from outside the container with a monitoring and administration tool. For that, I need the user and password that were provided for the database when the image was created, and I couldn't find this information in the Thingsboard documentation. I don't want to change the credentials because that might cause problems with the other components of the Docker container.

Does anybody know this user/password combination?


Solution

  • According to thingsboard compose file:

        environment:
          POSTGRES_DB: thingsboard
          POSTGRES_PASSWORD: postgres
    

    And according to Postgress:

    POSTGRES_USER

    This optional environment variable is used in conjunction with POSTGRES_PASSWORD to set a user and its password. This variable will create the specified user with superuser power and a database with the same name. If it is not specified, then the default user of postgres will be used.

    So user/password should be postres/postgres.