{"id":21102172,"url":"https://github.com/juanelas/openvpn-docker","last_synced_at":"2026-02-03T15:33:51.617Z","repository":{"id":94108670,"uuid":"260054429","full_name":"juanelas/openvpn-docker","owner":"juanelas","description":"A just-working, easily-configurable OpenVPN docker","archived":false,"fork":false,"pushed_at":"2024-12-06T09:13:26.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T03:57:08.064Z","etag":null,"topics":["docker","docker-compose","openvpn","vpn"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juanelas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-29T21:55:53.000Z","updated_at":"2024-12-06T09:13:30.000Z","dependencies_parsed_at":"2025-04-13T03:57:09.121Z","dependency_job_id":"e14901cb-7e57-40bf-854f-f211236cb7f3","html_url":"https://github.com/juanelas/openvpn-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/juanelas/openvpn-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanelas%2Fopenvpn-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanelas%2Fopenvpn-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanelas%2Fopenvpn-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanelas%2Fopenvpn-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juanelas","download_url":"https://codeload.github.com/juanelas/openvpn-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanelas%2Fopenvpn-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29047918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:19:55.533Z","status":"ssl_error","status_checked_at":"2026-02-03T15:13:09.723Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","openvpn","vpn"],"created_at":"2024-11-19T23:54:18.264Z","updated_at":"2026-02-03T15:33:51.593Z","avatar_url":"https://github.com/juanelas.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openvpn-docker\n\nOpenVPN server with easy setup and client management in a minimal docker container (Alpine).\n\n## Setup\n\nThe PKI and OpenVPN are configured with environment variables that can be directly passed to docker or use .env files with docker-compose. Example files would be:\n\n- `easy-rsa.env`\n  \n  ```conf\n  # The common name for the CA certificate \n  EASYRSA_REQ_CN=OpenVPN Root CA\n\n  # Use Elliptic Curve Cryptography (RECOMMENDED)\n  EASYRSA_ALGO=ec\n\n  # Define the named curve. One of: openvpn --show-curves\n  EASYRSA_CURVE=secp384r1\n\n  # In how many days should the root CA key expire?\n  EASYRSA_CA_EXPIRE=3652\n\n  # In how many days should certificates expire?\n  EASYRSA_CERT_EXPIRE=1826\n\n  # How many days until the next CRL publish date. You can check your crl with openssl crl -in crl.pem -noout -text\n  EASYRSA_CRL_DAYS=3652\n  ```\n\n- `openvpn.env`\n  \n  ```conf\n  # The public IP of your web server\n  PUBLIC_IP=0.0.0.0\n\n  # Either udp (recommended) or tcp\n  PROTO=udp\n\n  # The port your server will listen on\n  PORT=1194\n\n  # The subnet of your VPN\n  IP_SUBNET=192.168.131.0\n  IP_MASK=255.255.255.0\n\n  # Set CLIENT_TO_CLIENT to 1 to allow different clients to be able to \"see\" \n  # each other. By default, clients will only see the server.\n  CLIENT_TO_CLIENT=1\n\n  # A DNS server that is accesible from your server\n  DNS_SERVER=1.1.1.1\n\n  # Set to 1 if multiple clients might connect with the same certificate/key\n  # files or common names (not recommended)\n  DUPLICATE_CN=0\n  ```\n\n### Single server\n\nA named volume or a bind mount should be created for the PKI (server and clients's keys) to persist. An example `docker-compose.yml` file would be:\n\n```yaml\nversion: '3.4'\n\nservices:\n  openvpn:\n    image: juanelas/openvpn\n    container_name: openvpn\n    cap_add: \n      - NET_ADMIN\n    env_file: \n      - easy-rsa.env\n      - openvpn.env\n    ports: \n      - 1194:1194/udp\n    volumes:\n      - easy-rsa:/etc/openvpn/easy-rsa\n    restart: always\n\nvolumes:\n  easy-rsa:\n```\n\n### Multiple servers\n\nIf you want to run several openvpn servers sharing the same PKI volume you can run one docker container as before and pass the option `no-init-pki` to the rest ones. You will need one ovenpn .env file for every server. An example `docker-compose.yml` file with two servers listening on 1194/udp and 443/tcp woul be:\n\n```yaml\nversion: '3.4'\n\nservices:\n  openvpn1194udp:\n    image: juanelas/openvpn\n    container_name: openvpn_udp\n    cap_add: \n      - NET_ADMIN\n    env_file: \n      - easy-rsa.env\n      - openvpn-udp1194.env\n    ports: \n      - 1194:1194/udp\n    volumes:\n      - easy-rsa:/etc/openvpn/easy-rsa\n    restart: always\n\n  openvpn443tcp:\n    depends_on: \n      - openvpn1194udp\n    image: juanelas/openvpn\n    container_name: openvpn_tcp\n    cap_add: \n      - NET_ADMIN\n    env_file: \n      - easy-rsa.env\n      - openvpn-tcp443.env\n    ports: \n      - 443:443/tcp\n    command: no-init-pki  # don't try to init the PKI (it's going to be intialized in other container)\n    volumes:\n      - easy-rsa:/etc/openvpn/easy-rsa\n    restart: always\n\nvolumes:\n  easy-rsa:\n```\n\n## PKI management\n\nExec the following commands in a running container for:\n\n- `pki-list-clients [-revoked]` returns a list with all the active clients. If you need a list of revoked clients, call it with `-revoked`\n- `pki-new-client clientName` creates a new client `clientName`\n- `pki-revoke-client clientName` revokes existing client `clientName`\n- `get-client-ovpn clientName` gets .ovpn file (required for OpenVPN connect App) for client `clientName`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanelas%2Fopenvpn-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuanelas%2Fopenvpn-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanelas%2Fopenvpn-docker/lists"}