Linux
This instruction assumes the following location of Passwork — /var/www/
Preparation
- Before updating, if Passwork is installed in a cloud/virtual environment, create a snapshot of the OS virtual state to restore functionality in case of incorrect update;
- Obtain
rootrights and update the local package database:
- Shell
sudo -i
apt-get update
Obtaining current version of Passwork
Create a temporary directory to obtain Passwork:
- Shell
mkdir /tmp/update_passwork
If the server with Passwork is located in a closed network, you need to go to the Passwork Customer Portal and manually obtain version 7 and move it to the server in a directory named — /tmp/update_passwork/passwork.zip
::
Go to the Passwork Customer Portal and copy the API key to obtain the current version:

Create the API_KEY variable:
- Shell
API_KEY=your_api_key
Check the available Passwork version from the client portal using the copied API key with the request:
- Shell
curl -X GET "https://portal.passwork.pro/api/version?apikey=$API_KEY" -w "\n"
Correct output
- PowerShell
{"response":{"last-available-version":"07xxxx"}}
Make sure that version 7 of Passwork — 07xxxx is available for download
Obtain version 7 of Passwork with the request:
- Shell
curl -o "/tmp/update_passwork/passwork.zip" "https://portal.passwork.pro/api/download?apikey=$API_KEY"
Clear the API_KEY variable:
- Shell
unset API_KEY
Updating to current version
Get the current Passwork version into a variable:
- Shell
# Get Passwork version from the version file
version=$(cat /var/www/version)
Copy the Passwork configuration file to a separate directory:
- Shell
cp /var/www/app/config/config.ini /var/
Create an archive of the current Passwork version for rollback possibility:
- Shell
# Install zip if an error occurs during execution
apt install zip -y
yum install zip -y
zip -r /var/passwork-$version.zip /var/www/*
Delete all contents from the Passwork directory:
- Shell
rm -rf /var/www/* && rm -rf /var/www/.*
Extract version 7 of Passwork to the physical location:
- Shell
unzip /tmp/update_passwork/passwork.zip -d /var/www/
Set permissions for the physical location of Passwork:
- DEB
- RPM
find /var/www/ -type d -exec chmod 755 {} \;
find /var/www/ -type f -exec chmod 644 {} \;
find /var/www/init -type f -exec chmod 600 {} \;
chown -R www-data:www-data /var/www/
find /var/www/ -type d -exec chmod 755 {} \;
find /var/www/ -type f -exec chmod 644 {} \;
find /var/www/init -type f -exec chmod 600 {} \;
chown -R apache:apache /var/www/