Windows Server
Obtaining the latest Passwork version
- Go to the Customer portal;
- Authorise on the customer portal with your email address;
- In the bottom left corner, click on the Update → Manual tab and download the latest Passwork version in
.zipformat:

- Move the
.ziparchive to the server with Passwork.
Creating a backup and configuration file
Creating a backup
To create a MongoDB backup, you can use the following instructions — Examples of creating and restoring MongoDB backups
If Passwork is installed on a virtual or cloud-based operating system, we recommend creating a restore point so that you can quickly roll back in case of errors
Creating a copy of the configuration file
The main Passwork parameters are specified in the config.ini configuration file. Create a copy of the file and save it in a separate or root directory of the user:
- PowerShell
Copy-Item `
-Path "C:\inetpub\wwwroot\passwork\app\config\config.ini" `
-Destination "$PWD\" -Force
Updating the Passwork code and creating an archive of the old version
Create a directory to store the temporary files of the old version:
- PowerShell
mkdir C:\inetpub\copy_files
Create a copy of the config.ini configuration file and the license key:
- PowerShell
Copy-Item `
-Path "C:\inetpub\wwwroot\passwork\app\config\config.ini" `
-Destination "C:\inetpub\copy_files\" -Force
Copy-Item `
-Path "C:\inetpub\wwwroot\passwork\app\keys\passwork*" `
-Destination "C:\inetpub\copy_files\" -Force
Create an archive of the old version of Passwork in C:\inetpub\:
- PowerShell
$version = Get-Content "C:\inetpub\wwwroot\passwork\version"
Compress-Archive -Path "C:\inetpub\wwwroot\passwork\*" -DestinationPath "C:\inetpub\$version.zip"
Remove the old version from the physical location of the code:
- PowerShell
Remove-Item -Path "C:\inetpub\wwwroot\passwork\*" -Recurse -Force
Extract the new version of Passwork to C:\inetpub\wwwroot\passwork\:
- PowerShell
Expand-Archive `
-Path "$PWD\Passwork-xxxxxx.zip" `
-DestinationPath "C:\inetpub\wwwroot\passwork\"
Move the configuration file and license key to the new version:
- PowerShell
Move-Item `
-Path "C:\inetpub\copy_files\config.ini" `
-Destination "C:\inetpub\wwwroot\passwork\app\config\" -Force
Move-Item `
-Path "C:\inetpub\copy_files\passwork*" `
-Destination "C:\inetpub\wwwroot\passwork\app\keys\" -Force
After the steps are completed, you can delete the temporary directory with the location of the configuration file and license key:
- PowerShell
Remove-Item -Path "C:\inetpub\copy_files" -Recurse -Force
Create overwrite rules and assign permissions to Passwork code
Create rules that modify URL requests in IIS
Create a web.config for the URL Rewrite module:
- PowerShell
"<?xml version=`"1.0`" encoding=`"UTF-8`"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name=`"Imported Rule 1`" stopProcessing=`"true`">
<match url=`"^app/(.*)/(.*)/template.([a-z-A-Z0-9]+).html`" ignoreCase=`"false`" />
<conditions logicalGrouping=`"MatchAll`">
<add input=`"{REQUEST_FILENAME}`" matchType=`"IsFile`" ignoreCase=`"false`" negate=`"true`" />
</conditions>
<action type=`"Rewrite`" url=`"app/{R:1}/{R:2}/template.html`" />
</rule>
<rule name=`"Imported Rule 2`" stopProcessing=`"true`">
<match url=`"^extension/js/(.*)/(.*)/template.([a-z-A-Z0-9]+).html`" ignoreCase=`"false`" />
<action type=`"Rewrite`" url=`"extension/js/{R:1}/{R:2}/template.html`" />
</rule>
<rule name=`"Imported Rule 3`" stopProcessing=`"true`">
<match url=`"^(.*)$`" ignoreCase=`"false`" />
<conditions logicalGrouping=`"MatchAll`">
<add input=`"{REQUEST_FILENAME}`" matchType=`"IsDirectory`" ignoreCase=`"false`" negate=`"true`" />
<add input=`"{REQUEST_FILENAME}`" matchType=`"IsFile`" ignoreCase=`"false`" negate=`"true`" />
</conditions>
<action type=`"Rewrite`" url=`"index.php?_url=/{R:1}`" appendQueryString=`"true`" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>" | Out-File -FilePath "C:\inetpub\wwwroot\passwork\public\web.config" -Encoding UTF8
Assign rights to Passwork physical location
After that you need to change the system permissions of the directories and set permissions for the IIS web server:
- PowerShell
Invoke-Expression "icacls 'C:\inetpub\wwwroot' /grant 'Users:(OI)(CI)`M'"
Invoke-Expression "icacls 'C:\inetpub\wwwroot' /grant 'IIS_IUSRS:(OI)(CI)`M'"
Invoke-Expression "icacls 'C:\inetpub\wwwroot' /grant 'IUSR:(OI)(CI)`M'"
Register the PHP version and restart the web server
Register PHP for the new version of Passwork
Import modules for IIS and PHP Manager:
- PowerShell
Import-Module IISAdministration
Import-Module WebAdministration
Add-PsSnapin PHPManagerSnapin
Unlock the IIS configuration file for PHP registration:
- PowerShell
Invoke-Expression "$env:windir\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/handlers"
Register the PHP version for the updated version of Passwork:
- PowerShell
New-PHPVersion -ScriptProcessor "$env:ProgramFiles\php8.2\php-cgi.exe" -SiteName "Passwork Web Site" -VirtualPath "/"
Restart the IIS web server
To activate changes in IIS, you must restart the IIS web server:
- PowerShell
Restart-Service -Name "W3SVC"