An s6 v3 docker-mod for LinuxServer.io containers that establishes an OpenVPN connection on container startup.
To use this mod, add the following environment variables to your LinuxServer.io container:
In docker arguments, set an environment variable DOCKER_MODS=ghcr.io/eshork/universal-openvpn:latest
to enable.
If adding multiple mods, enter them in an array separated by |
, such as DOCKER_MODS=user/repo:tag|user/repo:tag
OVPN_CONFIG
: Full path to the OpenVPN configuration file to use. Default is/etc/openvpn/config
. (Provide this file to your container as a volume mount.)OVPN_CREDENTIALS
: Full path to the credentials file to pass via--auth-user-pass
. Default is/etc/openvpn/credentials
. If not present, will not pass credentials. (Provide this file to your container as a volume mount.)OVPN_KILLSWITCH
: If set totrue
or1
, will implement a route-based traffic kill switch, attempting to prevent traffic leaking beyond your local network when the VPN tunnel is down.OVPN_SPLIT_PRIVATE
: If set totrue
or1
, will inject routes to preserve access to private network addresses (RFC1918) via the initial default route. Default isfalse
.OVPN_HALT_ON_FAILURE
: If set totrue
or1
, will issuehalt
command to stop the container if the OpenVPN connection is lost or could not be established. Default will not attempt to stop the container.OVPN_OPTS_ADD
: Additional options to append to theopenvpn
command. Default is empty.OVPN_OPTS_OVERRIDE
: If set, will completely override the generatedopenvpn
command arguments with the provided value. This is useful for advanced users who want full control over theopenvpn
command arguments, but is often not necessary. Default is empty.
ONLY TESTED ON AN ALPINE BASED CONTAINER
Based on documentation from