Legacy
...
Passwork 4
Ubuntu

Ubuntu 18.04

30min

How to install Passwork on Ubuntu 18.04

1. Get root privileges and reload local package database

Shell


Change server hostname to "passwork".

Shell


Automatic local network configuration and discovery.

Shell


Change AVAHI_DAEMON_DETECT_LOCAL from 1 to 0.

Shell


Set:

Shell


Restart:

Shell


2. Install Git and Apache2

Shell


3. Install MongoDB

Import the public key used by the package management system.

Shell


Create a /etc/apt/sources.list.d/mongodb.list file for MongoDB.

Shell


Reload local package database.

Shell


Install the latest stable version of MongoDB.

Shell


Start MongoDB Service.

Shell


Enable mongod service start on the system boot.

Shell


4. Install PHP7

Add the PPA.

Shell


Install PHP and additional extensions.

Shell


5. Install PHP Mongo driver

Shell


6. Install Phalcon PHP framework

Shell


7. Download and install Passwork

Clone the repository using your login and password.

Shell


💡 The system will ask for a login and password to the repository, which you can find in your Customer Portal. If you don't have access to the Customer Portal, contact us.

Set up permissions for the files.

Shell


Configure your Apache2.

Open Apache’s configuration file.

Shell


Make it look like this:

Shell


Enable rewrite module and restart Apache.

Shell


Open http://passwork.local or http://127.0.0.1 to access website.

8. Installation

When you open Passwork for the first time, you will see an installation wizard that will check if the server is configured correctly and allow you to enter the basic parameters.

💡 Leave all fields at their default values if you are installing a new copy of Passwork

Sign up an administrator

Enter the username and password for the first user. The user will automatically become the administrator and owner of the organization.

9. Create a SSL certificate.

First, enable the Apache SSL module.

Shell


Activate the default Apache website.

Shell


Restart Apache to put these changes into effect.

Shell


Create a new directory where we can store the private key and certificate.

Shell


Generate a new certificate and a private key to protect it.

Shell


Invoking this command will result in a series of prompts.

  • Common Name: Specify your server's IP address or hostname. This field matters, since your certificate needs to match the domain (or IP address) for your website.
  • Fill out all other fields at your own discretion.

Example answers are shown below.

Shell


Set the file permissions to protect your private key and certificate.

Shell


Your certificate and the private key that protects it are now ready for Apache to use.

10. Configuring the product to work correctly in Chrome with SSL

When working over an SSL connection (HTTPS), the Chrome browser requires the Secure and SameSite flags for the cookies. Without these flags, the browser will not accept cookies, and you will not be able to log into Passwork in Chrome.

To set these flags, enable the session.cookie_secure parameter in the /etc/php/7.3/apache2/php.ini file:

Shell


And set the parameter disableSameSiteCookie ([application] section)in file /var/www/app/config/config.ini to value Off:

Shell


💡 Do not set these parameters or reset them to their original value if you change your mind about using SSL and will be working over the HTTP protocol

11. Configure Apache to use SSL

Open the server configuration.

Shell


Locate the section that begins with <VirtualHost _default_:443> and make the following changes.

  • Add a line with your server name directy below the ServerAdmin email line. This can be your domain name or IP address:
Shell

  • Add “Directory” directive next to the “ServerName”.
Shell

  • Find the following two lines, and update the paths to match the locations of the certificate and key we generated earlier. If you purchased a certificate or generated your certificate elsewhere, make sure the paths here match the actual locations of your certificate and key:
Shell


Once these changes have been made, check that your virtual host configuration file matches the following.

Shell


Restart Apache to apply the changes.

Shell


Check SSL connection by going to https://passwork.local.

Updated 22 Nov 2023
Doc contributor
Did this page help you?