Update passbolt on Centos 7
For this tutorial, you will need:
- A minimal CentOS 7 server.
- Passbolt installed with the CentOS install script.
1. Take down your site
It is generally a good idea to stop running the site prior to the upgrade. This is to avoid having side effects
such as active users corrupting the data in the middle of an upgrade. For example if you are using
nginx as a
sudo systemctl stop nginx
If you feel a bit more fancy, you can change your web server configuration to point to an “under maintenance” page. It is a good practice to announce such maintenance window to your users in advance, so that they can also plan for the update, for example by downloading some key passwords they may need.
2. Backup your instance
First things first, as this is a sensitive operation a backup of the instance must be performed to prevent any data loss. You can follow our backup process.
3. Get the latest code version
Pull the latest version directly from master:
cd /var/www/passbolt git pull origin master
4. Update the dependencies
Some libraries are not packaged with the software but need to be updated using composer, based on what is recommended in the composer.lock. This file is provided by passbolt.
Passbolt requires composer v2, check the version you have already installed:
composer.phar --version > Composer version 2.0.9 2021-01-27 16:09:27
To get the latest version of composer, you can check the composer installation instructions.
Update the dependencies:
php -d allow_url_fopen=on composer.phar install --no-dev -n -o
5. Migrate your data
A new version can come with a data structure change. You can run the migration scripts as follow:
sudo -H -u nginx bash -c "./bin/cake passbolt migrate"
6. Clear the cache
Finally make sure you clear the application cache, to make sure any changes in the database structure are reflected in model cache files:
sudo -H -u nginx bash -c "./bin/cake cache clear_all"
7. Take your site back up
sudo systemctl start nginx
Verifying the status of the application
Optionally, you can login as an administrator and check the status on the healthcheck page:
You can also run the following command:
$ sudo -H -u www-data bash -c "./bin/cake passbolt healthcheck"
If you run into some issues
If you run into some issues:
- Make a copy or screenshot of the errors messages displayed on the screen
- Check for error message in the
- Check for error message in the browser console
- Checkout the previous working version using git
- Drop the database and load your backup data to restore to a previously working version
- Note down the the details of you environment: your OS, php, mysql environment versions.
Where to get help:
- If you are a Passbolt Pro Edition subscriber send us an email with the details.
- If you are a Passbolt Community Edition user you can open new thread on the community forum.
The more information you provide about what you did, what you tried, how your environment look like, the easiest it will be for people to help you.
This article was last updated on February 8th, 2021.