Skip to main content

Tutorial: Upgrade the Access Server Docker Image

Abstract

Upgrade the Access Server Docker image while maintaining your existing configurations and data.

Overview

Upgrading the Access Server (AS) Docker image ensures you have the latest security patches, features, and improvements. This tutorial teaches you how to upgrade the AS Docker image while maintaining your existing configurations and data. The process involves pulling the latest image, identifying the current data directory, and running the upgrade container using the same data path.

  • Docker installed on your system.

  • The current AS Docker container running and configured.\

  • Administrative access to the server hosting the Docker container.

  • Basic knowledge of using the command line and Docker commands

  1. Connect to your server where your current Access Server Docker container is running. This is typically done via SSH:

    ssh your-username1@your-server-ip2
    

    1

    Replace with your SSH user.

    2

    Replace with the IP address of the server running Docker.

  2. Once connected, run the following command to pull the latest Access Server version image from Ducker Hub:

    docker pull openvpn/openvpn-as:latest
    
    • This downloads the most up-to-date image, preparing it for deployment in later steps.

To preserve your existing configuration and data, ensure you identify which folder Access Server uses to store this information.

  1. Run the following command to inspect the container:

    docker inspect openvpn-as
    
    • This command returns detailed information about the container.

  2. Look for the "HostConfig": section, and within it, check the "Binds": array. An example output might look like:

    "HostConfig": {
        "Binds": [
            "/ExampleHostFolder/:/openvpn"
        ]
    }
    
  3. The /ExampleHostFolder/ is the directory on the host system where Access Server stores configuration and database files. This path is critical for a successful upgrade.

  • Before running the upgrade container, stop and remove the existing Access Server container:

    docker stop openvpn-as
    docker rm openvpn-as
    
    • Stopping and removing the old container ensures no conflicts when running the new one.

Now that you've downloaded the latest image and identified the data folder used by the previous container, you can launch the new container.

  • Ensure the path to the data folder remains the same to allow the new container to use your existing configuration:

  • This command starts a new container running the latest Access Server version with the previous configuration and database files.

  1. Verify a successful upgrade by checking the status of the container:

    docker ps
  2. Additionally, you can access the Access Server Admin Web UI to confirm that the version is updated and your settings are intact.