SA
samsesh/openvpn-dockercompose
Quick OpenVPN server with docker-compose
OpenVPN docker compose
clone this project and go to directory
git clone https://github.com/samsesh/openvpn-dockercompose.git
cd openvpn-dockercomposerun setup for Initialize the configuration files and set port and porotcol
bash fisrtconf.shand certificates
docker compose run --rm openvpn ovpn_initpki- Start OpenVPN server process
docker compose up -d openvpn- You can access the container logs with
docker compose logs -f- Generate a client certificate for testUserName
# with a passphrase (recommended)
docker compose run --rm openvpn easyrsa build-client-full testUserName
# without a passphrase (not recommended)
docker compose run --rm openvpn easyrsa build-client-full testUserName nopass- Retrieve the client configuration with embedded certificates
docker compose run --rm openvpn ovpn_getclient testUserName > testUserName.ovpn- Revoke a client certificate
# Keep the corresponding crt, key and req files.
docker compose run --rm openvpn ovpn_revokeclient testUserName
# Remove the corresponding crt, key and req files.
docker compose run --rm openvpn ovpn_revokeclient testUserName removeDebugging Tips
- Create an environment variable with the name DEBUG and value of 1 to enable debug output (using "docker -e").
docker compose run -e DEBUG=1 openvpnOn this page
Languages
Shell100.0%
Contributors
GNU General Public License v3.0
Created April 23, 2023
Updated October 3, 2024