Manual installation

Windows Server

37min

Instructions for installing Passwork on the OS:

  • Windows Server 2016
  • Windows Server 2019
  • Windows Server 2022

1. Minimum system requirements

Passwork is not resource demanding. The amount of resources required (RAM, CPU, HDD) and the number of servers depend on the number of active users, the amount of data stored, and the requirements for system fault tolerance.

2. Basic steps before installation

Open PowerShell as "Administrator":

  • Right-click on the Start icon in the lower left corner of the screen;
  • Select "Windows PowerShell (Administrator)" from the context menu.

If Windows Server 2016 is used, you must enable the TLS protocol to download packages to the operating system:

PowerShell


Create a temporary directory for downloading packages and archives:

PowerShell


Override user group names using SID:

PowerShell


Install the IIS role with the module:

PowerShell


3. PHP installation

Download PHP archive:

PowerShell


In case of an error, you can download the archive manually — https://repos.passwork.pro/repository/windows_packages/php_build/82/php_latest.zip

Unzip the contents to — Program Files:

PowerShell


Add PHP utilities to the PATH variable environment:

PowerShell


To test it, open a new PowerShell window and run the cmdlet — php -v

Set Users permissions to the group for the PHP directory:

PowerShell


4. Installing MongoDB database

Download MongoDB Installer:

PowerShell


In case of an error, you can download the installer manually — https://repos.passwork.pro/repository/windows_packages/mongodb_database_latest.msi

Install MongoDB by default:

PowerShell


To install MongoDB on another drive, you need to add — "INSTALLLOCATION=A:\MongoDB"

Create a directory for the MongoDB administration utilities:

PowerShell


Download administration utilities:

PowerShell


In case of an error, you can download the installer manually — https://repos.passwork.pro/repository/windows_packages/database_tools_latest.zip

Unzip content:

PowerShell


Add administration utilities to the PATH variable environment:

PowerShell


5. Installing modules for IIS

Download archive with modules:

PowerShell


In case of an error, you can download the installer manually — https://repos.passwork.pro/repository/windows_packages/iis_package_latest.zip

Unzip modules for IIS:

PowerShell


Install Visual C++:

PowerShell


Install PHP Manager:

PowerShell


Install URL Rewrite:

PowerShell


6. Getting the latest version of Passwork

Create a directory for the Passwork location:

PowerShell


Go to the Passwork customer portal and copy the certificate number:

Document image


Get an up-to-date version of Passwork by entering your certificate number:

PowerShell


Unzip Passwork to the IIS directory:

PowerShell


Create a web.config for redirect rules:

PowerShell


Set permissions for the physical location of the Passwork:

PowerShell


7. Configuring IIS web server

Connect modules in PowerShell to manage IIS:

PowerShell


Unlock the handlers configuration in IIS:

PowerShell


Get the ports in use in the operating system:

PowerShell


Check busy default ports for the website:

PowerShell


Create a website (Passwork Web Site) with HTTP protocol:

PowerShell


Register a PHP version for the website:

PowerShell


Activate drivers and extensions for the website:

PowerShell


Restart the IIS web server:

PowerShell


Open http://localhost:80 or http://localhost:5353 test the connection to Passwork.

7. Passwork parameter checklist

When you connect to Passwork for the first time, you will need to go over the checklist that includes:

  • Automatic parameter checking
  • Checking connection to MongoDB database
  • Generating an encryption key for MongoDB
  • License verification

Leave all fields as they are if you are installing a new Passwork copy

After finishing the checklist, you will be offered to create the first Passwork user and set their login, password and email address for notifications.

Note. This user is always local and "Owner" of Passwork by default, in case of assigning — "Owner" LDAP/SSO user, it will automatically become local and you will not be able to authorise in Passwork

8. Configuring Passwork for HTTPS access

8.1 Generating self-signed SSL certificate

Check busy default ports for the website:

PowerShell


Create a self-signed HTTPS certificate with a server name value:

PowerShell


8.2 Creating IIS binding for access to Passwork over HTTPS protocol

Create HTTPS binding in the Passwork website:

PowerShell


Get the current binding of the Passwork website:

PowerShell


Bind a previously created self-signed certificate to the HTTPS protocol of the website:

PowerShell


Restart the IIS web server:

PowerShell


Open https://localhost:443 or https://localhost:444 test the connection to Passwork.

8.3 Configuring Passwork to work over HTTPS protocol

When using a secure SSL connection (HTTPS), client browsers require certain flags to process Passwork data. These flags are called session.cookie_secure and disableSameSiteCookie. If these flags are not set, browsers will not be able to establish connections and the connection will be rejected, which can lead to authorisation errors — "The session of this browser tab is out of date".

Set the ;session.cookie_secure parameter in the file C:\Program Files\php8.2\php.ini:

bash


Set the disableSameSiteCookie parameter in C:\inetpub\wwwroot\passwork\app\config\config.ini to Off:

bash


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

9. Configure background tasks

Background tasks are tasks that are executed by the scheduler in the background. For example, LDAP synchronisation, loading favicons, and other tasks that are time-consuming, persistent, or resource-allocating.

See a guide on setting up background tasks.

10. Set up security

Before performing actions to modify and configure security settings, we strongly recommend that you make sure that Passwork is stable and working correctly, and that you back up the files to which you are making changes.

Server security is an important part of ensuring the protection of valuable company data and resources. It is a process that requires planning and execution to ensure maximum protection against various threats.

Look through the overview of Passwork security settings.