How can I use a Self Signed certificate on Passbolt Docker?


Is there a way to install a self signed ssl certificate.
I have a self hosted passbolt server on a docker container.


Hello @lahiruabo,

If you dont provide any SSL certificate, passbolt container will create a self signed SSL certificate automatically and use it.

However, if you want to use your own self signed certificates (because you want them to be persistent for example), we can refer to this documentation : Passbolt Help | Docker passbolt installation to help on your question.

The first solution would be to do it directly with docker as we show in this example for gpg key directory and adapt it for your ssl certificate directory :

docker run --name passbolt --net passbolt_network \
             --mount type=bind,\
               target=/var/www/passbolt/config/gpg \
             -p 443:443 \
             -p 80:80 \
             -e DATASOURCES_DEFAULT_HOST=mariadb \
             -e DATASOURCES_DEFAULT_PASSWORD=<mariadb_password> \
             -e DATASOURCES_DEFAULT_USERNAME=<mariadb_user> \
             -e DATASOURCES_DEFAULT_DATABASE=<mariadb_database> \
             -e APP_FULL_BASE_URL= \

The second solution would be to integrate your certificate/key path in the docker-compose.yml file like this :

      - gpg_volume:/var/www/passbolt/config/gpg
      - images_volume:/var/www/passbolt/webroot/img/public
      - PATH_TO_YOUR_SSL_KEY_CERT:/etc/ssl/certs/certificate.key
      - PATH_TO_YOUR_SSL_CERT:/etc/ssl/certs/certificate.crt

Please, notice that passbolt expects certificates to be in /etc/ssl/certs/certificate.crt and /etc/ssl/certs/certificate.key.