Passbolt not using environment variables for database connection

System: VyOS 1.4-rolling-202210020218
Container environment: podman version 4.2.0
Container versions: image mariadb:10.3 image passbolt/passbolt:latest-ce

The database is running on 172.16.8.33, passbolt is running on 172.16.8.8. The environment variable is set correctly and is being read from inside of the container, it just doesn’t seem to be respected:

pg: key 50D0F8863DEE473A: "Passbolt default user <passbolt@yourdomain.com>" not changed
gpg: key 470BC8600FFC7696: "Passbolt default user <passbolt@yourdomain.com>" not changed
gpg: Total number processed: 2
gpg:              unchanged: 2
gpg: key 50D0F8863DEE473A: "Passbolt default user <passbolt@yourdomain.com>" not changed
gpg: key 50D0F8863DEE473A: secret key imported
gpg: key 470BC8600FFC7696: "Passbolt default user <passbolt@yourdomain.com>" not changed
gpg: key 470BC8600FFC7696: secret key imported
gpg: Total number processed: 2
gpg:              unchanged: 2
gpg:       secret keys read: 2
gpg:  secret keys unchanged: 2
Installing passbolt

     ____                  __          ____
    / __ \____  _____ ____/ /_  ____  / / /_
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /
 /_/    \__,_/____/____/_.___/\____/_/\__/

 Open source password manager for teams
-------------------------------------------------------------------------------
Running baseline checks, please wait...
Notice Error: Undefined index: message
In [/usr/share/php/passbolt/src/Utility/Healthchecks/DatabaseHealthchecks.php, line 72]

2022-11-28 14:39:33 notice: Notice (8): Undefined index: message in [/usr/share/php/passbolt/src/Utility/Healthchecks/DatabaseHealthchecks.php, line 72]
Exception: Connection to Mysql could not be established: SQLSTATE[HY000] [1045] Access denied for user 'passbolt'@'172.16.8.8' (using password: YES)
In [/usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Driver.php, line 133]

Running migrations

     ____                  __          ____
    / __ \____  _____ ____/ /_  ____  / / /_
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /
 /_/    \__,_/____/____/_.___/\____/_/\__/

 Open source password manager for teams
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
 Running migration scripts.
-------------------------------------------------------------------------------
using migration paths
 - /etc/passbolt/Migrations
using seed paths
Exception: There was a problem connecting to the database: SQLSTATE[HY000] [1045] Access denied for user 'passbolt'@'172.16.8.8' (using password: YES)
In [/usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php, line 96]

You can see the environment variable is set correctly here:

vbash-4.1# podman restart Passbolt
9c8bd6bb859b652736bce03f4c17854a7c08510fc1924be809904a63c161fab3
vbash-4.1# podman exec -it Passbolt bash
root@9c8bd6bb859b:/usr/share/php/passbolt# echo $DATASOURCES_DEFAULT_HOST
172.16.8.33
root@9c8bd6bb859b:/usr/share/php/passbolt#

Not sure if this is a podman issue, but I’ve noticed that I can open the container and run echo $DATASOURCES_DEFAULT_HOST, but running podman exec -it Passbolt su -c echo $DATASOURCES_DEFAULT_HOST root doesn’t seem to work. I’m considering building my own docker image because this doesn’t seem to be working correctly.


I’m unable to run a full heath check as the container dies once it fails to start, so a healthcheck can’t complete. Part of the reason I’m considering making a fresh container, but I see no reason why these environment variables are not working.

I was misreading the logs, I had the passwords set incorrectly.

1 Like