Standard installation
...
Linux
Passwork Migration

Migration from Windows to Docker

10min

These instructions are intended for a single Passwork installation and are not suitable for a fault-tolerant solution

Preparation

Create a MongoDB backup

  1. Open powershell.exe as Administrator and navigate to the directory — cd "C:\Program Files\MongoDB\Server\x.x\bin"
  2. Backup examples:
    1. Local installation (MongoDB) without authorization — mongodump.exe --archive="mongo.dump"
    2. Local installation (MongoDB) with authorization — mongodump.exe --authenticationDatabase admin --username=username --password=password --archive="mongo.dump"
    3. Installing (MongoDB) on a separate server — mongodump --host host:port --authenticationDatabase admin --username=username --password=password --archive="mongo.dump"

Copy the config.ini file and the license key

  1. Create a copy of the default config.ini configuration file located:
    1. Manual installation — C:\inetpub\wwwroot\app\config\config.ini
    2. Using the Windows installer — C:\inetpub\wwwroot\passwork\app\config\config.ini
  2. Create a copy of the passwork-*.keys license key, located by default:
    1. Manual installation — C:\inetpub\wwwroot\app\keys\passwork-*.keys
    2. Using the Windows installer — C:\inetpub\wwwroot\passwork\app\keys\passwork-*.keys

Copy a certificate

If the Docker installation will use the same domain name and SSL certificate as the previous Passwork installation, you need to copy the SSL certificate manually (full certificate chain in pfx), or use the following PowerShell code:

PowerShell


Installation

Install the main components

  1. Install Docker and Docker Compose.
  2. Create and navigate to the directory where you plan to deploy the new Passwork Docker build.

Download the scripts

  1. Download the installation script — wget https://repos.passwork.pro/repository/docker/passwork_compose_install.sh
  2. Download the migration script — wget https://repos.passwork.pro/repository/docker/migrate.sh
  3. Assign execution rights — chmod +x ./*.sh

Transfer files from the Preparation stage

  1. Create a directory — mkdir ./windows
  2. Place the previously copied files from the Preparation step into the windows directory:
    1. Configuration file — config.ini
    2. License key — passwork-*.keys
    3. MongoDB backup
    4. Passwork website certificate

Start the migration process

  1. Run the script with the -mv flag — sudo ./passwork_compose_install.sh -mw
  2. The installation script will perform a basic installation of the latest version of Passwork available in your license and automatically run the migration script.

Optional steps after installation

  1. After the scripts are finished, check that the new installation is working properly and make adjustments if necessary.
  2. To add mail server or LDAPS protocol root certificates to trusted certificates, copy the .pem or .crt root certificates to the ./conf/custom_ca directory and restart the PHP container — docker compose restart passwork_php.
  3. To change the SSL certificate used, copy the certificate/certificate chain to ./conf/ssl/fullchain.pem and the private key to ./conf/ssl/privkey.pem and restart the Nginx container — docker compose restart passwork_nginx.