- Log into the Debian device
- Run the following commands in a terminal:
# update software repositories
sudo apt update
# install available updates
sudo apt upgrade -y
# install some dependencies
sudo apt install git composer apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y
# install Apache HTTPD and MySQL
sudo apt install apache2 mariadb-server mariadb-client -y
# install PHP components
sudo apt install php7.3 libapache2-mod-php7.3 php-imagick php-gnupg php7.3-common php7.3-mysql php7.3-fpm php7.3-ldap php7.3-gd php7.3-imap php7.3-json php7.3-curl php7.3-zip php7.3-xml php7.3-mbstring php7.3-bz2 php7.3-intl php7.3-gmp php7.3-xsl -y
# configure the MySQL database
sudo su
mysql_secure_installation - Press Enter to login as root
- Type Y and press Enter to set a root password, type the password twice to confirm
- Type Y and press Enter to remove anonymous users
- Type Y and press Enter to disallow root login remotely
- Type Y and press Enter to remove the test database
- Type Y and press Enter to reload privilege tables
- Run the following command to login into MySQL:
mysql -u root -p
- Authenticate with the root password set earlier
- Run the following commands to create the Passbolt database and database user
CREATE DATABASE passbolt DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL ON passbolt.* TO 'passboltuser'@'localhost' IDENTIFIED BY 'Pa$$b0lt!!';
FLUSH PRIVILEGES;
EXIT;
exit - Continue with the following commands to download and extract Passbolt in the Apache webroot
cd /var/www
# clone passbolt from github
sudo git clone https://github.com/passbolt/passbolt_api.git
# rename extracted folder passbolt
sudo mv /var/www/passbolt* /var/www/passbolt
# set the owner of the new passbolt directory to www-data
sudo chown -R www-data:www-data /var/www/passbolt
# setup composer working directory
sudo mkdir /var/www/.composer
sudo chown -R www-data:www-data /var/www/.composer
cd /var/www/passbolt
# install dependencies with composer, answer y to default permissions
sudo -u www-data composer install --no-dev
# generate a key pair
gpg --gen-key - Enter a name and email address
- Type O for Okay > Press Enter
- When prompted, leave the passwords blank
- Continue the installation with the following commands in terminal
# export the private key, replace email with the email used to create the key pair above
gpg --armor --export-secret-keys i12bretro@i12bretro.local | sudo tee /var/www/passbolt/config/gpg/serverkey_private.asc > /dev/null
# export the public key, replace email with the email used to create the key pair above
gpg --armor --export i12bretro@i12bretro.local | sudo tee /var/www/passbolt/config/gpg/serverkey.asc > /dev/null
# setup gnupg working directory
sudo mkdir /var/www/.gnupg
sudo chown -R www-data:www-data /var/www/.gnupg
# initialize the keyring for www-data
sudo su -s /bin/bash -c "gpg --list-keys" www-data
# create a copy of the configuration template file
cd /var/www/passbolt/
sudo cp config/passbolt.default.php config/passbolt.php
# display the GPG key fingerprint, update the email to what was used above, copy the output to the clipboard
gpg --list-keys --fingerprint | grep -i -B 2 'i12bretro@i12bretro.local'
# edit the passbolt config file
sudo nano config/passbolt.php - Press CTRL + W and search for fullBaseUrl
- Update the URL to http://DNSorIP/passbolt
- Press CTRL + W and search for Database configuration
- Update the database connection information
host: localhost
username: passboltuser
password: Pa$$b0lt!!
database: passbolt - Press CTRL + W and search for Email configuration
- Update the email server configuration and default sender account
- Press CTRL + W and search for fingerprint
- Paste the fingerprint from the clipboard
- Remove all spaces from the fingerprint
- Uncomment the public and private lines below the fingerprint by deleting //
- Press CTRL + W and search for passbolt
- Paste the following after the 'passbolt' => [ line to disable the SSL requirement
'ssl' => [
'force' => false,
], - Press CTRL+O, Enter, CTRL+X to write the changes to passbolt.php
- Continue the installation with the following commands
# create a passbolt apache2 config
sudo nano /etc/apache2/sites-available/passbolt.conf - Paste the following configuration into passbolt.conf
Alias /passbolt /var/www/passbolt/webroot
<Directory /var/www/passbolt/webroot>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory> - Press CTRL+O, Enter, CTRL+X to write the changes to passbolt.conf
- Run the following command to enable the passbolt site
# enable apache modules
sudo a2enmod headers rewrite
# enable the passbolt site
sudo a2ensite passbolt.conf
# restart the apache2 service
sudo systemctl restart apache2 - Run the following command to run the passbolt installer
sudo su -s /bin/bash -c "./bin/cake passbolt install --force" www-data
- When prompted, enter an email address, first name and last name to create an account
- Copy the URL output after the installation completes
- Open a web browser
- Install the Passbolt browser extension
- With the Passbolt extension installed, navigate to the URL copied from the output of the install script
- The Passbolt setup screen should be displayed
- Enter a passphrase to use for the account
- Save the recovery and store it in a safe place > Click the Next button
- Set a color and 3 letter security token > Click the Next button
- Welcome to self-hosted Passbolt Password Vault