Run a VPN in a Docker container using SoftEther
This tutorial uses the siomiz/softethervpn Docker image to launch a SoftEther VPN server inside a Docker container. You can then connect to this VPN from your desktop or laptop computer, and use it to access the Internet through a secure tunnel. This method is fast and easy, and requires you to run only one command on your server.
SoftEther has clients available for Windows, Linux, and Mac OS. This allows you to browse the Internet securely even if you are on an unsecured wifi connection. It is an excellent security solution for those who travel often, or who work from public internet connections such as those found in coffee shops and public libraries.
Requirements
- A Cloud Server running Linux (CentOS 7 or Ubuntu 16.04)
- A fully-qualified domain name (example.com).
- Docker installed and running.
For information on getting started with Docker, see our article Installing and Running Docker on a Linux Server.
Firewall access
If you have a firewall, you will need to allow access to the following ports:
- UDP: 500
- UDP: 4500
- TCP: 1701
- TCP: 5555
Start the Docker container
Launch a Docker container running SoftEther with the following command:
For example, to set up the SoftEther VPN server with the passphrase En4EW25eI0, username jdoe, and password Qt0JYyx07E, the command is:
After the command has completed, you can verify that the container is running with the command:
The server will respond with a list of all active Docker containers:
- Unlimited traffic
- Fast SSD NVMe storage
- Free Plesk Web Host Edition
Connect to the VPN server
In order to connect to the SoftEther VPN server in your Docker container, you will need to download and install the SoftEther client on your desktop or laptop computer.
Download the appropriate installer from the SoftEther download page and follow the instructions to install the SoftEther client.
To configure the VPN connection on Windows, double-click Add VPN Connection.
Fill out the Setting Name, Host Name, User Name, and Password. Everything else can be left at the defaults. Then click OK.
Right-click on your VPN connection and choose Connect.

You will be connected to the VPN.
To verify that you are on the VPN, go to a website such as WhatIsMyIPAddress.com. If you are connected to the VPN, this website will see the IP address of your server, not the IP or MAC address of your computer.