Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openvpn-server-easy-docker

OpenVPN Server in a Docker container that is easy to setup

This OpenVPN Sever setup automation closely follows best practices such as those found in official Ubuntu OpenVPN documentation.

Quick Start

  1. Run the Docker container:

    docker run --name openvpn-server-easy --restart=unless-stopped -d -p 1194:1194/udp --device=/dev/net/tun --cap-add=NET_ADMIN warfront1osed/openvpn-server-easy:latest && docker logs -f openvpn-server-easy
  2. Wait for OpenVPN to start:
    You will see Initialization Sequence Completed in the logs when OpenVPN is ready to use.

  3. Obtain client credentials:

    Tip: To run the next command, you can either open a new terminal or press Ctrl+C to exit the log stream.

    docker cp openvpn-server-easy:/client_credentials/. ./

    This command copies the client configuration files from the container to your current directory.

  4. Connect to the VPN:
    The easiest way to connect is by importing the client.ovpn file into an OpenVPN client.

    We recommend OpenVPN Connect, the official client, which is available on:

    • 🪟 Windows
    • 🍏 macOS
    • 🐧 Linux
    • 📱 iOS
    • 🤖 Android
    • 🌐 ChromeOS

    If your client does not support .ovpn profiles, or you prefer to configure it manually, use the following files:

    • ca.crt
    • client.crt
    • client.key
    • ta.key

Advanced

Environment Variables

Most users can ignore this section. These variables are optional and only needed for non-default setups.

Variable Default Description
REDIRECT_GATEWAY_LOCAL false Set to true to also push the local flag for redirect-gateway. Needed when a client and the server are on the same LAN/subnet (e.g., same Wi-Fi) — it skips creating a static route to the server via the original default gateway. Default false suits remote clients on a different subnet.

About

OpenVPN Server in a Docker container that is easy to setup.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages