Mattermost, Inc.

Postgres connection settings

When connecting to a PostgreSQL database, what is allowed for the password? Currently only unencrypted passwords with limited special characters are accepted. This is on the Mattermost side of the connection.

vers mm 5.23 postgres 9.5

Could any of these docs help?


Thanks but they all show the password used in the config.json Data connection string as not encrypted.

So not a solution.


Hello, @jhemrick

Based on my understanding, your concern here is that the password stored in config.json is plaintext and unencrypted. For example:

ahmaddanial@mattermost:/opt/mattermost/logs$ cat /opt/mattermost/config/config.json | grep -w "DataSource"
        "DataSource": "mattermost:P@55W0rD123!@tcp(,utf8\u0026readTimeout=30s\u0026writeTimeout=30s",

In this example, the password used for user mattermost to access the database is P@55W0rD123! and directly visible from config.json. What you are trying to achieve is to make that password encrypted. For example using MD5:


or other encryption types. Is that right?