Skip to content

How to run VpnHood Server on Linux using docker

Trudy edited this page Aug 20, 2023 · 8 revisions

Automatic Installation on Linux

To install VpnHoodServer by docker, you can run the following command. It installs VpnHoodServer and Updater on your docker.

sudo su -c "bash <( wget -qO- https://github.com/vpnhood/VpnHood/releases/latest/download/VpnHoodServer.docker.sh)"

You can use the following command to generate an AccessKey if you don't use VpnHood Access Server:

docker run -v "/opt/VpnHoodServer/storage:/app/storage" "vpnhood/vpnhoodserver" gen

To config VpnHood, you can put the configuration files in "/opt/VpnHoodServer".

Manual Installation

You can install VpnHood Server Docker Image manually from the docker hub by the following command, but in this case, you need to

  • Understand how to use docker
  • Create a docker volume for the storage folder or mount it in your OS file system to put VpnHood Server config there.

VpnHoodServer storage in docker is "/app/storage".

Pulling the image:

docker pull vpnhood/vpnhoodserver:latest

Creating the container:

docker run --network host --volume /opt/VpnHoodServer:/app/storage --name MyVpnHoodServer -d vpnhood/vpnhoodserver

👉 Note: "host network mode," is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server. So, If you install it using a bridge network, you need to configure the UDP and TCP port mapping. More Info about host NetWorking.