How to Install sysPass Password Manager on Ubuntu

sysPass is a free, open-source password manager that utilizes HTML5, PHP, and powerful AES-256-CTR encryption for maximum protection. We’ll guide you through its installation on Ubuntu, so you can start storing passwords securely in no time.

How to Install sysPass Password Manager on Ubuntu

Before installing sysPass password manager on Ubuntu, You need to install the web server so that sysPass can work fluently as sysPass is a PHP-based web application that needs a web server along with a database.

Install Apache HTTP server on Ubuntu

Run the following commands to install the Apache web server on Ubuntu.

sudo apt update
sudo apt install apache2

Now, Run the following commands to stop, start and enable Apache to automatically start up when Ubuntu starts up.

sudo systemctl stop apache2
sudo systemctl start apache2
sudo systemctl enable apache2

Now, Open the following address in your favorite internet browser.

http://localhost

Now, Install database.

Install MariaDB database server

Run the commands below to install MariaDB server on your Ubuntu.

sudo apt update
sudo apt install mariadb-server

Run the following commands to stop, start and enable MariaDB to automatically start up when  Ubuntu starts up.

sudo systemctl stop mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb

MariaDB security configuration:

Run the following command to create root login details for MariaDB in  Ubuntu.

sudo mysql_secure_installation

Now, run the following command to install PHP on Ubuntu.

Run the following command to add the PPA repository on Ubuntu

sudo add-apt-repository ppa:ondrej/php

Now run the commands below on your Ubuntu to install PHP version 7.4.

sudo apt install libapache2-mod-php7.4 php7.4 php7.4-mysqli php7.4-pdo php7.4 php7.4-cgi php7.4-cli php7.4-common php7.4-gd php7.4-json php7.4-readline php7.4-curl php7.4-intl php7.4-ldap php7.4-xml php7.4-mbstring git

Now create a database for sysPass in Ubuntu

sudo mysql -u root -p

Type the root password.

Then run the commands below to create a database named syspassdb.

CREATE DATABASE syspassdb;

Now create a database user account named syspassdbuser and set a password for it.

CREATE USER 'syspassdbuser'@'localhost' IDENTIFIED BY 'newpasswordhere';

Then grant the user full access to the database.

GRANT ALL ON syspassdb.* TO 'syspassdbuser'@'localhost' WITH GRANT OPTION;

Exit with the following command.

FLUSH PRIVILEGES;
exit;

Install sysPass

Run the following commands to download sysPass files.

git clone https://github.com/nuxsmin/sysPass.git

Next, Go to the Apache root directory, and change the permissions and ownership.

sudo mv sysPass /var/www/html/syspass
sudo chown -R www-data:www-data /var/www/html/syspass
sudo chmod 750 /var/www/html/syspass/app/{config,backup}

Now, run the following command to create a composer script.

sudo nano /var/www/html/syspass/install-composer.sh

Now copy the content below and paste it into the file, then save and exit.

#!/bin/sh
 EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
 php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
 ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
 if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
 then
     >&2 echo 'ERROR: Invalid installer signature'
     rm composer-setup.php
     exit 1
 fi
 php composer-setup.php --quiet
 RESULT=$?
 rm composer-setup.php
 exit $RESULT

Now, Run the following command to run the composer script that you have created above, and install required PHP dependencies on Ubuntu.

cd /var/www/html/syspass/
sudo sh install-composer.sh
sudo php composer.phar install --no-dev

Configure Apache for sysPass

Run the following commands to create an Apache server block file for sysPass.

sudo nano /etc/apache2/sites-available/syspass.conf

Copy and paste the following code into the file and save.

<VirtualHost *:80>
  ServerName syspass.example.com
  ServerAlias www.syspass.example.com
  ServerAdmin admin@example.com
  DocumentRoot /var/www/html/syspass
    
  <Directory /var/www/html/syspass/>
       Options FollowSymlinks
       AllowOverride All
       Require all granted
  </Directory>

       ErrorLog ${APACHE_LOG_DIR}/error.log
       CustomLog ${APACHE_LOG_DIR}/access.log combined
    
</VirtualHost>

Now, enable the configuration above and restart Apache.

sudo a2ensite syspass
sudo systemctl restart apache2

Finally, open your internet browser and run the following web address.

http://syspass.example.com

Leave a comment

Your email address will not be published. Required fields are marked *