Upgrade Parsec Server

This section describes the general steps required to upgrade Parsec Server.

This section assumes that you deployed Parsec following the instructions from Server deployment section. If you deployed Parsec differently, you might need to adapt this section to your custom deployment.

Follow the steps below depending on the method used to install Parsec Server:

Upgrade with Docker

Important

Before upgrading, make sure to back up the database as explained in the Backup and Restore section in case you need to roll back the update.

The following steps show how to upgrade the parsec-server service from version v3.0.0 to v3.1.0.

  1. Update the parsec-server Docker image tag in parsec-server.docker.yaml from this:

    1services:
    2  # ...
    3  parsec-server:
    4    image: ghcr.io/scille/parsec-cloud/parsec-server:v3.0.0
    5    # ...
    

    To this:

    1services:
    2  # ...
    3  parsec-server:
    4    image: ghcr.io/scille/parsec-cloud/parsec-server:v3.1.0
    5    # ...
    
  2. List migrations to be applied:

    docker compose -f parsec-server.docker.yaml run parsec-server migrate --dry-run
    

    The output should look like this:

    0001_initial.sql (already applied)
    0002_add_migration_table.sql (already applied)
    0003_human_handle.sql (already applied)
    0004_invite.sql (already applied)
    0005_redacted_certificates.sql (already applied)
    0006_outsider_enabled.sql (already applied)
    0007_users_limit.sql (already applied)
    0008_apiv1_removal.sql (already applied)
    0009_add_realm_user_change_table.sql (already applied)
    0010_add_pki_certificate_table.sql (already applied)
    0011_add_sequester_tables.sql (already applied)
    0012_add_sequester_webhook.sql (already applied)
    0013_add_shamir_recovery.sql βœ”
    0014_add_realm_archiving.sql βœ”
    

    Note

    This output is provided as an example. Don’t expect it to match your output.

    The lines ending with already applied are migrations already applied on the database whereas the one ending with βœ” are migrations to be applied.

  3. Apply database migrations:

    docker compose -f parsec-server.docker.yaml run parsec-server migrate
    
  1. Restart the parsec-server container:

    docker compose -f parsec-server.docker.yaml restart parsec-server
    

Upgrade on Linux

Important

Before upgrading, make sure to back up the database as explained in the Backup and Restore section in case you need to roll back the update.

Important

Some Parsec customizations require you to modify source files inside the installation directory. This files are overwritten during upgrade so you have to make a copy before starting, and restore them after upgrade.

Since Parsec v3.5, email templates and server pages can be loaded from a template directory outside the installation directory. This is achieved by using --template-dir option when running Parsec Server.

The following steps show how to upgrade Parsec Server directly on Linux.

  1. Stop the running Parsec Server

    This step would depend on how you run Parsec Server.

    For example if you used systemctl you would run something like:

    systemctl stop parsec.service
    
  2. Install Parsec Server and apply database migrations

    Follow the steps described in Deploy with Linux.

  3. Check that the right version is installed

    python -m parsec --version
    
  4. Restart Parsec Server

    This step would depend on how you run Parsec Server.

    For example if you used systemctl you would run something like:

    systemctl restart parsec.service
    
  5. Check that the Parsec Server is up and running.

    Open a web browser and go to the URL were you have deployed your Parsec Server.

    If web application is enabled: you should be redirected to the Welcome page.

    If web application is not enabled: you should see the page that the server is running.

    Parsec Server is up and running