Manual installation
Windows Server
37min
installing passwork on following 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 see the technical requirements docid 0qxzmsecr2kfjk3wtcqub 2\ basic steps before installation run 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 as described below powershell \[net servicepointmanager] securityprotocol = \[net securityprotocoltype] tls12 create a temporary directory for downloading packages and archives powershell new item path "$env\ systemdrive\windows\temp\passwork install" itemtype directory override user group names using sid powershell $usergroupsid = "s 1 5 32 545" $usersecurityidentifier = new object system security principal securityidentifier($usergroupsid) $usergroupname = $usersecurityidentifier translate(\[system security principal ntaccount]) value $usergroupname = $usergroupname split("\\")\[1] $iis iusrsgroupsid = "s 1 5 32 568" $iis iusrssecurityidentifier = new object system security principal securityidentifier($iis iusrsgroupsid) $iis iusrsgroupname = $iis iusrssecurityidentifier translate(\[system security principal ntaccount]) value $iis iusrsgroupname = $iis iusrsgroupname split("\\")\[1] install the iis role with the module powershell install windowsfeature name web server includemanagementtools install windowsfeature name web cgi includemanagementtools 3\ php installation download the php archive powershell (new object system net webclient) downloadfile("https //repos passwork pro/repository/windows packages/php build/83/php latest zip", "$env\ systemdrive\windows\temp\passwork install\php latest zip") in case of an error, you can download the archive manually — https //repos passwork pro/repository/windows packages/php build/83/php latest zip https //repos passwork pro/repository/windows packages/php build/83/php latest zip unzip the contents to program files powershell expand archive ` path "$env\ systemdrive\windows\temp\passwork install\php latest zip" ` destinationpath "$env\ programfiles\\" add php utilities to the path variable environment powershell \[system environment] setenvironmentvariable("path", \[system environment] getenvironmentvariable("path", \[system environmentvariabletarget] machine) + ";c \program files\php8 3", \[system environmentvariabletarget] machine) $env\ path = \[system environment] getenvironmentvariable("path", \[system environmentvariabletarget] machine) to test it, open a new powershell window and run the php v cmdlet set users permissions to the group for the php directory powershell invoke expression "icacls '$env\ programfiles\php8 3' /grant '${usergroupname} (oi)(ci)`m'" 4\ installing mongodb database download mongodb installer powershell (new object system net webclient) downloadfile("https //repos passwork pro/repository/windows packages/mongodb database latest msi", "$env\ systemdrive\windows\temp\passwork install\mongodb database latest msi") in case of an error, you can download the installer manually — https //repos passwork pro/repository/windows packages/mongodb database latest msi https //repos passwork pro/repository/windows packages/mongodb database latest msi install mongodb by default powershell start process filepath "msiexec exe" argumentlist "/l v", "$env\ systemdrive\windows\temp\mdbinstall log", "/qb", "/i", "$env\ systemdrive\windows\temp\passwork install\mongodb database latest msi", "should install compass=0", "addlocal=router,serverservice" wait to install mongodb on another drive, you need to add "installlocation=a \mongodb" create a directory for the mongodb administration utilities powershell new item itemtype directory force path "$env\ programfiles\mongodb\tools\\" download administration utilities powershell (new object system net webclient) downloadfile("https //repos passwork pro/repository/windows packages/database tools latest zip", "$env\ systemdrive\windows\temp\passwork install\database tools latest zip") in case of an error, you can download the installer manually — https //repos passwork pro/repository/windows packages/database tools latest zip https //repos passwork pro/repository/windows packages/database tools latest zip unzip content powershell expand archive ` path "$env\ systemdrive\windows\temp\passwork install\database tools latest zip" ` destinationpath "$env\ programfiles\mongodb\tools\\" add administration utilities to the path variable environment powershell \[system environment] setenvironmentvariable("path", \[system environment] getenvironmentvariable("path", \[system environmentvariabletarget] machine) + ";c \program files\mongodb\tools", \[system environmentvariabletarget] machine) $env\ path = \[system environment] getenvironmentvariable("path", \[system environmentvariabletarget] machine) 5\ installing modules for iis download archive with modules powershell (new object system net webclient) downloadfile("https //repos passwork pro/repository/windows packages/iis package latest zip", "$env\ systemdrive\windows\temp\passwork install\iis package latest zip") in case of an error, you can download the installer manually — https //repos passwork pro/repository/windows packages/iis package latest zip https //repos passwork pro/repository/windows packages/iis package latest zip unzip modules for iis powershell expand archive ` path "$env\ systemdrive\windows\temp\passwork install\iis package latest zip" ` destinationpath "$env\ systemdrive\windows\temp\passwork install\\" install visual c++ powershell start process ` filepath "$env\ systemdrive\windows\temp\passwork install\vc redist x64 exe" ` argumentlist "/q" wait erroraction stop install php manager powershell start process filepath "msiexec exe" ` argumentlist "/i $env\ systemdrive\windows\temp\passwork install\phpmanagerforiis x64 msi /quiet /norestart" ` wait erroraction stop install url rewrite powershell start process filepath "msiexec exe" ` argumentlist "/i $env\ systemdrive\windows\temp\passwork install\rewrite amd64 en us msi /quiet /norestart" ` wait erroraction stop 6\ receiving passwork create a directory for passwork powershell new item itemtype directory force path "$env\ systemdrive\inetpub\wwwroot\passwork" go to the passwork customer portal and copy the api key create an api key variable powershell $api key = "your api key" check the available version of passwork from the customer portal powershell invoke restmethod uri "https //portal passwork pro/api/version?apikey=$api key" method get correct output powershell response \ @{last available version=xxxxxx} get passwork using a query powershell (new object system net webclient) downloadfile("https //portal passwork pro/api/download?apikey=$api key", "c \windows\temp\passwork install\passwork zip") unzip passwork to the iis directory powershell expand archive ` path "$env\ systemdrive\windows\temp\passwork install\passwork zip" ` destinationpath "$env\ systemdrive\inetpub\wwwroot\passwork\\" get and place the web config file in c \inetpub\wwwroot\passwork\public\ for redirect rules https //archbee doc uploads s3 amazonaws com/w jxazppyuprqlll6w3gi xdhtwilsezqh1ikx9glpz 20250309 203623 config set permissions for the passwork location powershell invoke expression "icacls '$env\ systemdrive\inetpub\wwwroot' /grant '${usergroupname} (oi)(ci)`m'" invoke expression "icacls '$env\ systemdrive\inetpub\wwwroot' /grant '${$iis iusrsgroupname} (oi)(ci)`m'" invoke expression "icacls '$env\ systemdrive\inetpub\wwwroot' /grant 'iusr (oi)(ci)`m'" 7\ creating a website with php connection note to ensure proper functionality of passwork, the https protocol must be used connect modules in powershell to manage iis powershell import module iisadministration import module webadministration add pssnapin phpmanagersnapin unlock the handlers configuration in iis powershell invoke expression "$env\ windir\system32\inetsrv\appcmd exe unlock config section\ system webserver/handlers" create a web site with the name passwork web site powershell new website name "passwork web site" port "5353" physicalpath "$env\ systemdrive\inetpub\wwwroot\passwork\public" force register a php version for the website powershell new phpversion scriptprocessor "$env\ programfiles\php8 3\php cgi exe" sitename "passwork web site" virtualpath "/" activate drivers and extensions for the website powershell $extensions = @( "php curl dll", "php gd dll", "php gettext dll", "php intl dll", "php ldap dll", "php mbstring dll", "php mongodb dll", "php mysqli dll", "php openssl dll", "php pdo pgsql dll", "php pdo sqlite dll", "php pgsql dll", "php soap dll", "php zip dll", "php fileinfo dll" ) foreach ($extension in $extensions) { write host "php extension activated $extension" set phpextension name $extension status enabled sitename "passwork web site" virtualpath "/" } get the php version number into a variable powershell $phpversion = (get phpconfiguration sitename "passwork web site" virtualpath "/") version update the list of http methods allowed for the php handler powershell set webconfigurationproperty pspath "iis \sites\passwork web site" filter "system webserver/handlers/add\[@name='php $phpversion']" name "verb" value "get,head,post,put,delete,patch" 8 configuring a web server for the https protocol to ensure correct operation, it is necessary to use https protocol using http will cause errors 8 1 generating self signed ssl certificate create a self signed https certificate with a server name value powershell $dnsname = "$env\ computername" $newcert = new selfsignedcertificate dnsname $dnsname certstorelocation cert \localmachine\my 8 2 creating iis binding for access to passwork over https protocol create https binding in the passwork website powershell new webbinding name "passwork web site" ipaddress " " port "443" protocol "https" get the current binding of the passwork website powershell $binding = get webbinding name "passwork web site" protocol "https" bind a previously created self signed certificate to the https protocol of the website powershell $binding addsslcertificate($newcert getcerthashstring(), "my") restart the iis web server powershell restart service name "w3svc" 9 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 change mongodb connection string to — mongodb //localhost 27017 generating an encryption key for mongodb license verification after finishing the checklist, you will be offered to create the first passwork user and set their login, password and email address for notifications the first user is the default local user and owner of passwork 10 configure background tasks background tasks are tasks that are executed by the scheduler in the background see how to set up background tasks docid\ yfbv3nwxjyj7casf5uhii background tasks are mandatory for some of the passwork functionality to work correctly, for example ldap works; sending email notifications; favicon downloads; cleanups of the session collection in the passwork database 11\ set up security before modifying security settings, we strongly recommend to make sure that passwork is stable and works correctly, and to back up the files you are making changes to 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 security settings docid\ xwwgklt56 4kib23wmmxr