# Upgrading Avantra Server

| Starting with Avantra 24.0 Server, only Java 17 is supported.

| Before upgrading your Avantra system, please read the upgrade notes, the release notes changes page, and the known issues page. If you have any questions on any of these changes, please reach out to Avantra support. When upgrading through multiple major/minor versions at once, also read the notes and changes for all versions skipped by performing this upgrade.

| When planning an upgrade of your Avantra server, please make sure you take a database backup first. Many (but not all) Avantra Server upgrades and patches make changes to the underlying database structure, and this prevents downgrading in the case of an issue. As an in-place downgrade of the Avantra server is not possible, a database restore may be required. It is your responsibility to ensure you have an available database backup to revert to if there is an issue.

## Upgrading Avantra Server (Linux)

Procedure: Upgrading Avantra Server on Linux

1. Log into the server and stop Avantra services. You can stop your Avantra services either using `systemd` or via the Avantra rc files (systemctl is recommended)

       $ sudo systemctl stop avantra-server
       $ sudo systemctl stop avantra-ui

   OR

       $ /opt/avantra/master/rc.master stop
       $ /opt/avantra/xangui/rc.xangui stop

2. Switch user to the service user running your Avantra services and change into the avantra directory. The example below assumes the service user is called `avantra` and Avantra is installed to the directory `/opt/avantra`.

       $ sudo su avantra
       avantra$ cd /opt/avantra/

3. Download `avantra-server-24.0.n-linux.bin` from the Avantra Customer Hub and make sure the file is executable:

       avantra$ curl -o avantra-server-24.0.n-linux.bin 'https://........link...from...customer...hub....'
       avantra$ chmod +x avantra-server-24.0.n-linux.bin

4. Perform the upgrade of your Avantra services

   Note that we use the `--no-start` flag in this case so we can manually restart our Avantra services after the upgrade using `systemctl`. If you are using the `rc.master` or `rc.xangui` files to start and stop your services, you do not need the `--no-start` flag.

       avantra$ ./avantra-server-{product-release-n}-linux.bin -- --no-start

5. Restart your Avantra services

   First we `exit` back to a sudo-capable user.

       avantra$ exit
       $ sudo systemctl start avantra-server
       $ sudo systemctl start avantra-ui

   OR

       avantra$ /opt/avantra/master/rc.master start
       avantra$ /opt/avantra/xangui/rc.xangui start

| Once your upgrade is completed you must log into the UI as an administrator to trigger the completion of any database migrations. Until you do this, non-administrator logons may fail.

## Upgrading Avantra Server (Windows)

Follow these steps to upgrade your Avantra Server components to Version 24:

Procedure: Running the Avantra Windows Installer

1. Download `avantra-server-24.0.n-win64.exe` from the Avantra Customer Hub.

2. Open the installer, push Next on the welcome screen and accept the license using the I agree option on the license screen.

3. You are asked to install either the Avantra Server, the UI, or both. Usually you will leave the default and install both. Push Next to continue.

4. Choose an appropriate installation location and push Next.

5. Choose the ports for incoming HTTP and or HTTPS connections of the web UI. You may push the Verify Ports button in order to check if the ports are free. Press Next.

6. Verify the Windows Firewall configuration rules that will be added/updated in your system. Press Next to proceed.

7. Choose the (Windows) user to run the Windows services as. If you use Windows Authentication for the Microsoft SQL Server (which is the default in Step 4 of the Procedure: Installing Microsoft SQL Server Express Edition), make sure you use the same user here as for the Microsoft SQL Server.

   If you did not change the command in Step 4 of Procedure: Installing Microsoft SQL Server Express Edition, leave it to the default `LocalSystem` here. If your Microsoft SQL Server is running with a different user, fill in the same user. Press Next to proceed.

8. Push Install.

9. On the final screen, make sure you have checked Install UI and Server and push Finish.