Skip to main content

Troubleshooting Docker

Prerequisite Steps

Connect yourself inside passbolt docker container (replace passbolt-container-name with your own):

docker exec -ti passbolt-container-name bash

All troubleshooting commands must be launched as www-data user. It is the case if you are running non-root docker images but for root images, switch as www-data user:

su -s /bin/bash www-data

Then to be able to launch some commands, you must retrieve PASSBOLT_GPG_SERVER_KEY_FINGERPRINT environment variable:

export PASSBOLT_GPG_SERVER_KEY_FINGERPRINT="$(gpg \
--home $GNUPGHOME\
--list-keys \
${PASSBOLT_KEY_EMAIL:[email protected]} | \
grep -Ev "^(pub|sub|uid|^$)" | tr -d ' ')"

Alternatively if you are using Docker Secrets you’ll need to run the following to access the secrets as environment variables:

source /etc/environment

Passbolt commands

Status report

./bin/status-report

Healthcheck

./bin/cake passbolt healthcheck

Send a test email

./bin/cake passbolt send_test_email \
[email protected]

Datacheck

./bin/cake passbolt datacheck --hide-success-details

Server logs

To retrieve the server logs, run this command outside of the container (replace passbolt-container-name with your own):

docker logs passbolt-container-name

To create a file that contain these logs, you can run:

docker logs passbolt-container-name > error_logs 2>&1

Database migrations status

./bin/cake migrations status

Database container

To connect into mysql container console (replace db-container-name with your own):

docker exec -ti db-container-name bash -c \
'mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE}'