Openvpn in docker

Hi guys

Premise:
yesterday I was looking for a personal VPN, I’m using Arch as daily distro and official Openvpn project is not supported in Arch based distros, so I tried to find some docker images for managing the VPN.

The solution:
I come into this githgub repository: GitHub - d3vilh/openvpn-server: Fast Docker container with OpenVPN Server living inside.
I tried to install it on my Arch VM and everything is working very great.

Some notes:

  • for better usability you need to have a static IP
  • you need to use TCP 1194 port instead using UDP protocol and open it in your router for external access
  • you are not able to change default 8080 port of the administrative tool gui
  • is better to keep your port 8080 closed and safe on your router!
  • for change your gui admin username and password you are not able to do it in docker-compose.yml, you need to do it trought the web interface

As I followed the docker compose guideline, now I’m able to turn on my VPN and connect to my homelab when I’m outside.

-ricky

1 Like

Nice! Thanks for sharing.

1 Like

Update January 2025:

with Openvpn UDP port is suggested instead using TCP port because it tent to be quicker on transfer rate. You can configure it trough docker-composer.yaml file.

BTW I was using this docker and UDP port, but connection was so slow as well.

I ended up by using native Wireguard on Arch Linux over Kernel, now speed is much more better.

In case if anyone need to create a VPN in Linux I suggest to use native Wireguard.
On Arch Linux I followed this tutorial: Install and Configure Wireguard VPN Server on Arch Linux: Guide and I installed the GUI “Wireguird” from official Arch repositories for manage the VPN tunnel (you can find Wireguird on most distributions software center or public repositories).

I ended up with this setup and I’m pretty satisfied: speed is good and Samba shared folders are quick browseable.

2 Likes