Install sysPass Password Manager on Ubuntu 18.04

5
5077

In this tutorial, we are going to learn how to install sysPass password manager on Ubuntu 18.04. sysPass is opensource multiuser password manager written in PHP for business and personal use. It allows a centralized and collaborative passwords management. It saves passwords using bidirectional encryption with a master password to a database. Passwords are associated to accounts, and these have detailed information about it like: customer, category, notes, files, etc.

In our previous guide, we learnt how to install TeamPass password manager. You can check the same by following the link below;

Install TeamPass Password Manager on Ubuntu 18.04

Install sysPass Password Manager on Ubuntu 18.04

Prerequisites

In this guide, we are going to install the latest version of sysPass, v3.0. Successful setup of sysPass v3.0 requires LAMP stack installed;

  • Web server (Apache/Nginx/Lighttpd) with SSL enabled.
  • MariaDB >= 10.1
  • PHP >= 7.0
  • PHP modules; mysql, curl, json, gd, xml, mbstring, intl, readline, ldap , (optional), mcrypt (optional for importing older XML export files)

We have covered installation of LAMP stack on Ubuntu 18.04 in our previous guide. Check the link below;

Install LAMP Stack on Ubuntu 18.04

If you followed our above, some of the required modules are not installed and hence can be installed by running the command below. Note that Mcrypt has been deprecated in PHP 7.2. It is optional anyway.

apt install php-pear php php-cgi php-cli php-common php-fpm php-gd php-json php-readline php-curl php-intl php-ldap php-xml php-mbstring

Just to verify the MariaDB and PHP versions installed;

apt-cache policy mariadb-server
mariadb-server:
Installed: 1:10.1.38-0ubuntu0.18.04.1
Candidate: 1:10.1.38-0ubuntu0.18.04.1
Version table:
*** 1:10.1.38-0ubuntu0.18.04.1 500
php -v
PHP 7.2.15-0ubuntu0.18.04.2 (cli) (built: Mar 22 2019 17:05:14) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.15-0ubuntu0.18.04.2, Copyright (c) 1999-2018, by Zend Technologies

Create sysPass Database and user

Login to MariaDB and create sysPass database and user will full privileges on the database.

mysql -u root -p
create database syspass;
grant all privileges on syspass.* to [email protected] identified by "[email protected]";
flush privileges;
quit

Restart the database.

systemctl restart mariadb

Download sysPass

Run the command below to clone sysPass to web server root directory.

git clone https://github.com/nuxsmin/sysPass.git /var/www/html/syspass

Setup sysPass directories permissions

The sysPass web directory should be owned by the web server user which is www-data in this case. Hence, run the command below to set up proper permissions and ownership of the directories.

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

Install sysPass Dependencies

sysPass requires Composer that helps in managing all the required libraries and dependencies. To install Composer, navigate to the sysPass web directory and run the script below to programmatically install composer.

cd /var/www/html/syspass

Put the following content in a file, say composer-install.sh and run it as a shell script to install composer

vim composer-install.sh
#!/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

Save the file and run it as shown below;

bash composer-install.sh

Next, install the sysPass dependencies.

php composer.phar install --no-dev

Finalize sysPass Setup

Once the installation is done, access sysPass from the browser to finalize on the setup. To access sysPass from web, use the URL;

http://<syspass-server>/syspass

Configure sysPass admin and Master password.

install sysPass password manager on Ubuntu 18.04

Set the sysPass database connection details.

install sysPass password manager on Ubuntu 18.04

Choose the sysPass language, check the hosting mode box and hit install button to finalize on the setup.

install sysPass password manager on Ubuntu 18.04

Once the setup is done, you will be redirected to sysPass login page. Use the admin credentials set during setup.

install sysPass password manager on Ubuntu 18.04

When you successfully login, you will land on the default sysPass dashboard.

install sysPass password manager on Ubuntu 18.04

That is all it takes to install sysPass password manager on Ubuntu 18.04. You can now create different account, add users and access privileges. We will cover all these in our next article. In the meantime, feel free to explore this amazing tool. Enjoy

5 COMMENTS

  1. Hi! I’ve been following the instructions, and all is fine untill the point to install composer. When i run the shell script is saying it can not find the /bin/sh…i solved it follwing composer install instructions.
    But, when i go to install dependencies, it faisl again,s aying can not find the files..

      • With root user:
        [email protected]:/var/www/html/claus# php composer.phar install –no-dev
        Do not run Composer as root/super user! See https://getcomposer.org/root for details
        Loading composer repositories with package information
        Installing dependencies from lock file
        Package operations: 29 installs, 0 updates, 0 removals
        – Installing ademarre/binary-to-text-php (dev-master 5d98d17): Cloning 5d98d17be1
        Failed to download ademarre/binary-to-text-php from source: Failed to clone https://github.com/ademarre/binary-to-text-php.git, git was not found, check that it is installed and in your PATH env.

        sh: 1: git: not found

        Now trying to download from dist

        [RuntimeException]
        The zip extension and unzip command are both missing, skipping.
        Your command-line PHP is using multiple ini files. Run `php –ini` to show them.

        install [–prefer-source] [–prefer-dist] [–dry-run] [–dev] [–no-dev] [–no-custom-installers] [–no-autoloader] [–no-scripts] [–no-progress] [–no-suggest] [-v|vv|vvv|–verbose] [-o|–optimize-autoloader] [-a|–classmap-authoritative] [–apcu-autoloader] [–ignore-platform-reqs] [–] []…

        Withour root user:
        [email protected]:/var/www/html/claus$ php composer.phar install –no-dev
        Loading composer repositories with package information
        Installing dependencies from lock file
        Package operations: 29 installs, 0 updates, 0 removals

        [RuntimeException]
        /var/www/html/claus/vendor/ademarre/binary-to-text-php does not exist and could not be created.

        install [–prefer-source] [–prefer-dist] [–dry-run] [–dev] [–no-dev] [–no-custom-installers] [–no-autoloader] [–no-scripts] [–no-progress] [–no-suggest] [-v|vv|vvv|–verbose] [-o|–optimize-autoloader] [-a|–classmap-authoritative] [–apcu-autoloader] [–ignore-platform-reqs] [–] []…

        • I answer myself….sudo apt upgrade….
          Once is done, i can install dependencies 🙂
          Thanks for your interest!!!

LEAVE A REPLY

Please enter your comment!
Please enter your name here