Tutorial: Upgrade the Access Server Docker Image
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
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
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.
Run the following command to inspect the container:
docker inspect openvpn-as
This command returns detailed information about the container.
Look for the
"HostConfig":
section, and within it, check the"Binds":
array. An example output might look like:"HostConfig": { "Binds": [ "/ExampleHostFolder/:/openvpn" ] }
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:
docker run -d \ --name=openvpn-as --cap-add=NET_ADMIN \ -p 943:943 -p 443:443 -p 1194:1194/udp \ -v <path to data>1:/openvpn \ openvpn/openvpn-as
Replace
<path to data>
with the actual data folder path from the previous step (e.g.,/ExampleHostFolder/
).This command starts a new container running the latest Access Server version with the previous configuration and database files.
Verify a successful upgrade by checking the status of the container:
docker ps
Additionally, you can access the Access Server Admin Web UI to confirm that the version is updated and your settings are intact.