SysPass is an open-source password manager written in PHP with AES-256 CTR encryption. It is designed for centralized and collaborative password management. It offers advanced profile management, multiuser with user, group, and profile management. Supports multiple authentication methods via MySQL/MariaDB and OpenLDAP Active Directory.

SysPass provides an API that allows you to integrate other applications. Supports Keepass password database and CSV files for import and export. It also provides account history and recovery points, multiple languages, and public links without login (anonymous link).

In this guide, you will learn how to install SysPass Password Manager on Ubuntu 22.04 server. In this guide, SysPass is run with the LAMP stack, so we will also cover the basic installation of the LAMP stack (Apache2, MariaDB, and PHP) on the Ubuntu system.

Requirements

For this tutorial you will need the following prerequisites:

  • An Ubuntu 22.04 server – This guide uses the latest Ubuntu 22.04 server with the hostname “syspass“.
  • A non-root user with sudo root privileges – You can also use the root user.
  • A domain name pointing to the IP address of your server – This is especially important if you want to install SysPass in the production environment.

Now let’s move on to the installation.

Installing the Apache2 web server

SysPass is a web application written mainly in PHP. You can run SysPass with an Apache or another web server like Nginx. In this guide you will install and use Apache2.

Before installing the packages, run the following apt command to update and refresh your Ubuntu package index.

sudo apt update

Now run the following apt command to install the Apache2 web server. The default Ubuntu repository contains the latest version of the Apache2 web server.

sudo apt install apache2

When prompted to confirm the installation, type Y and press ENTER to continue.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

After Apache2 is installed, check the“apache2” service and make sure it is enabled and running. Run the following systemctl command.

sudo systemctl is-enabled apache2
sudo systemctl status apache2

You will see that the“apache2” service is enabled and runs automatically at system startup. You can also see that the “apache2” service is running.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

Finally, run the following command to add the Apache Full application profile to the UFW. Then check the list of enabled rules.

The Apache Full application profile is included in the Apache2 package. It opens both HTTP and HTTPS ports (80 and 443).

sudo ufw allow "Apach Full"
sudo ufw status

You will see that the Apache Full application profile is added.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

Installing MariaDB Server

SysPass password manager supports MySQL and MariaDB for database and authentication. In this guide you will install and use MariaDB as the default database for your installation.

The MariaDB package is available by default in the Ubuntu repository. Run the following apt command to install it.

sudo apt install mariadb-server

Type Y when prompted to confirm the installation and press ENTER to continue.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

After MariaDB is installed, you can use the systemctl command to verify that the MariaDB service is running and enabled.

sudo systemctl is-enabled mariadb
sudo systemctl status mariadb

You will see the output as in the following screenshot. The MariaDB service is enabled and running automatically at boot time. And the status of the MariaDB service is now “running”.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

Now that the MariaDB service is running, run the following command to configure your MariaDB server.

sudo mysql_secure_installation

You will be prompted to do some MariaDB server configuration. Type y for yes or n for no.

  1. Press ENTER first when prompted to enter the root password. The default installation of MariaDB does not specify a password.
  2. Change the root authentication to unix_socket? enter n.
  3. Set up MariaDB root password? Confirm with y and then enter a new password for your MariaDB server installation.
  4. Disable remote authentication for the root user? enter y.
  5. Remove anonymous user from MariaDB? enter y.
  6. Remove database test from MariaDB? enter j.
  7. Reload table permissions and apply configurations?

You have now completed and backed up MariaDB on your Ubuntu system.

Install and configure PHP

SysPass is a password manager written in PHP. So, you need to install PHP on your system. The last version of SysPass required PHP 7.4, which you will now install from the PPA repository.

Before you start the PHP installation, run the following apt command to install packages for repository management.

sudo apt install software-properties-common apt-transport-https -y

Now run the following command to add the PHP PPA repository. The default Ubuntu repository provides PHP 8.x, which is not yet supported by SysPass, so that you will use PHP 7.4.

sudo add-apt-repository ppa:ondrej/php -y

You will now see that the new PPA repository has been added, and your package index will be updated automatically.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

After the PPA repository is added, run the following apt command to install the PHP 7.4 packages. Type Y when prompted to install and press ENTER.

sudo apt install libapache2-mod-php7.4 php-pear php7.4 php7.4-cgi php7.4-cli php7.4-common php7.4-fpm php7.4-gd php7.4-json php7.4-mysql php7.4-readline php7.4 curl php7.4-intl php7.4-ldap php7.4-mcrypt php7.4-xml php7.4-mbstring

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

After PHP is installed, open the/etc/php/7.4/apache2/php.ini file with the following command. In this example, a nano editor is used.

sudo nano /etc/php/7.4/apache2/php.ini

Change the default PHP configuration with the following setting. Make sure you adjust the timezone and memory_limit to your environment.

post_max_size = 120M
upload_max_filesize = 120M
max_execution_time = 6000
memory_limit = 256M
date.timezone = Europe/Stockholm

Save the file and exit the editor when you are done. For the nano editor, press“Ctrl x” and type“y” to save and exit.

Finally, run the following systemctl command to restart the Apache2 web server and apply the PHP configurations.

sudo systemctl restart apache2

This completes the basic LAMP stack installation required to run SysPass Password Manager.

Installing the Composer

Before you begin the SysPass installation, you will also need to install Composer on your Ubuntu system. This is used to install the PHP dependencies for SysPass.

Run the following command to download and install Composer. This command should install Composer in the “/usr/bin/composer” directory.

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

Now run the following command to make sure the Composer binary is available on your system. Then check the Composer version with the command below.

which composer
sudo -u www-data composer -v

You should see that the Composer binary is available under“/usr/bin/composer” and that the installed version of Composer is v1.2.xx.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

Now the Composer is installed. Next, start the installation of SysPass.

Installing SysPass Password Manager

Before installing SysPass, run the following apt command to install and unpack the base git package.

sudo apt install git unzip -y

Now download the SysPass source code to the target directory“/var/www/syspass” using the git command below.

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

Next, create a new .cache directory for the Composer tool and change the owner to www-data.

sudo mkdir -p /var/www/.cache
sudo chown -R www-data:www-data /var/www/.cache

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

Now change the working directory to “/var/www/syspass” and run the Composer command to install the PHP dependencies.

cd /var/www/syspass
sudo -u www-data composer install --no-interaction --no-dev

In the following screenshot you can see the installation of the PHP dependencies by Composer.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

After the PHP dependencies are installed, run the following command to change the permissions and ownership of the SysPass installation directory “/var/www/syspass”.

sudo chown -R www-data:www-data /var/www/syspass
sudo chmod 750 /var/www/syspass/app/config /var/www/syspass/app/backup

Configure virtual host for SysPass

In this step you will create a new Apache2 virtual host configuration for SysPass Password Manager. Before setting up the virtual host, make sure that your domain name already points to the IP address of the server. Also, make sure that you have created SSL certificates.

Enable the Apache2 modules ssl and rewrite with the a2enmod command (see below).

sudo a2enmod ssl rewrite headers

You will see the following output.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

Now create a new virtual host file“/etc/apache2/sites-available/syspass.conf” with the following nano command.

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

Paste the virtual host configuration for SysPass at the bottom of the file. Be sure to change the domain name and the path of the SSL certificates.

#
# File: syspass.conf
#
RedirectMatch "^/$" "https://vitux.com/index.php"


DirectoryIndex index.php
Options -Indexes -FollowSymLinks -Includes -ExecCGI


Require expr "%{REQUEST_URI} =~ m#.*/index.php(?r=)?#"
Require expr "%{REQUEST_URI} =~ m#.*/api.php$#"
Require expr "%{REQUEST_URI} =~ m#^/?$#"




Require all granted



ServerName syspass.hwdomain.io

ServerAdmin webmaster@localhost
DocumentRoot /var/www/syspass

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


RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]





ServerName syspass.hwdomain.io
ServerAdmin webmaster@localhost
DocumentRoot /var/www/syspass

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

SSLEngine on

SSLCertificateFile        /etc/letsencrypt/live/syspass.hwdomain.io/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/syspass.hwdomain.io/privkey.pem


SSLOptions  StdEnvVars


SSLOptions  StdEnvVars


BrowserMatch "MSIE [2-6]" 
nokeepalive ssl-unclean-shutdown 
downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

Save the file and exit the editor when you are done.

Next, enable the virtual host file“syspass.conf” with the command a2ensite (see below). Then check the Apache configuration to make sure Apache2 is configured correctly.

sudo a2ensite syspass.conf
sudo apachectl configtest

If your Apache2 is configured correctly, you will see a message like“Syntax OK“.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

Finally, run the following systemctl command to restart the Apache2 service and apply the new configuration changes.

sudo systemctl restart apache2

You have now completed the SysPass installation and configured the Apache2 virtual host. Next, access the SysPass configuration from the web browser.

SysPass Password Manager Configuration

Open your web browser and access the domain name of your SysPass installation. In this example, SysPass Password Manager is installed on the domain https://syspass.hwdomain.io/.

Enter the username and password for the SysPass admin user. Then enter the master password.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

On the bottom page, enter the details of the MariaDB user root and password. Then, enter the database name that the installer will automatically create.

Also, change the default language or select “English” for your installation.

Click “INSTALL” to start the installation of SysPass.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

After the installation is complete, the SysPass Password Manager login page will be displayed.

Enter your admin user and password, then click the “Login” button.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

If you use the correct user and password, you should now see the SysPass user dashboard.

How to Install SysPass Password Manager on Ubuntu 22.04 linux ubuntu

Now, you can add more configurations to SysPass, such as integrating with LDAP, importing the Keepass password database or CSV, adding new users and groups, setting up email notifications, and more.

Conclusion

With these instructions, you’ve installed SysPass Password Manager on an Ubuntu 22.04 server. You’ve also installed and configured the LAMP stack (Apache2, MariaDB, and PHP) on the Ubuntu system and installed Composer to manage PHP dependencies for your applications.