Easy to configure and very dynamic OpenVPN container. For easy but also advanced usage!
359
Please be patient: Until now this container is still BETA
This container provides a very high dynamic. In this section I´ll show you what I mean.
You can add users via environment variables. Use this structure:
| Variable name | Value | Description |
|---|---|---|
| OPENVPN_USER_n | e.g. pascal | The username while n is the indicator |
| OPENVPN_PASS_n | e.g. 123456 | The password for OPENVPN_USER_n |
| OPENVPN_HOSTNAME | e.g. host.tld | The host name used in user config |
For example if you want to add 4 users then the first user is OPENVPN_USER_1, the second OPENVPN_USER_2 and so on. The same structure with OPENVPN_PASS_1. Each user MUST HAVE a password.
It´s almost the same than pure easy-rsa names:
Variables:
EASYRSA_COUNTRY: "DE"
EASYRSA__PROVINCE: "BW"
EASYRSA_CITY: "Stuttgart"
EASYRSA_ORG: "YourOrganization"
EASYRSA_EMAIL: "[email protected]"
EASYRSA_OU: "YourOrganizationUnit"
I also provide you some hooks. You can use them to expand the container without adding own commands to your docker-compose file or building a new image.
The hooks provides you nearly unlimited freedom. You have to mount a file (you can find the paths in the next section) to the container. This file should be a bash script. There you can add anything and call what you want.
This hook will be executed before the openvpn initialization starts.
Path to mount: /opt/kronovanet_docker/hook/pre_init.sh
This hook will be executed after the openvpn initialization is finished and before the openvpn servers starts! You can modify the openvpn configurations or add your own configs and start them with this hook for example.
Path to mount: /opt/kronovanet_docker/hook/after_init.sh
version: '2'
services:
openvpn:
image: pascal20997/openvpn
container_name: kronova_openvpn
volumes:
- "./certs:/opt/certs"
ports:
- "1194:1194/udp"
- "8080:443"
restart: always
privileged: true
environment:
OPENVPN_USER_1: "myname"
OPENVPN_PASS_1: "mypass"
EASYRSA_COUNTRY: "DE"
EASYRSA__PROVINCE: "BW"
EASYRSA_CITY: "Stuttgart"
EASYRSA_ORG: "MyOrganization"
EASYRSA_EMAIL: "[email protected]"
EASYRSA_OU: "MyOrganizationUnit"
volumes:
data:
driver: local
Content type
Image
Digest
Size
62.5 MB
Last updated
over 9 years ago
docker pull pascal20997/openvpn