How to backup the database of passbolt docker?

Currently we’re using passbolt in docker, and it’s working properly.

I changed APP_FULL_BASE_URL in passbolt.env to localhost:9000 but it’s not working when I’m hitting localhost:9000 in browser.

Do I need to run docker-compose up to make it reflected?

If I do this, will it overwrite my passbolt image in docker? and to be safe before I run this command I would like to backup first so I can restore if something wrong happened.

Hi @allenchun,

Yes. passbolt.env is an environment file passed to Docker. If you made any changes on it while the stack is running, you need to stop it and run it again, if you want your changes to be reflected.
You can run the following commands:
docker-compose stop
docker-compose up

Please note the usage of docker-compose stop.
You do not want to use docker-compose restart because it won’t reflect the changes made in your environment files.
docker-compose down is not appropriated as well, because it will destroy your containers, which is not needed for what you are doing.

Regarding the database, if you are using the docker-compose.yml file provided here:, you should be fine. Why?
Because your database is stored in a volume. It means that even if the containers are stopped, the volumes still exist. (unless you explicitly remove them)

If you want to make a backup anyway. Here is how you can do.

You need to run this command from where is located your docker-compose.yml file:
docker-compose exec db /usr/bin/mysqldump -u <your_db_username> --password=<your_db_password> <your_db_name > backup.sql

It will create a backup.sql file on your host machine.

You can find more detailed information here:

Also, out of curiosity, why do you want to make the passbolt instance reachable on the port 9000?
If it is really what you need, you also need to update your docker-compose.yml file and update the port mapping for the service accordingly. Indeed, the server is listening on port 80, but if you want that it can be reached from the port 9000, you need to add the following to the passbolt service in your docker-compose.yml file.

    - 9000:80 

Let us know how it works out for you.

1 Like

The reason I would like to run it in 9000 because the port 80 is already taken by our other application. I put port 9000:80 inside the docker-compose.yml

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.