{"id":22970717,"url":"https://github.com/janole/vpn","last_synced_at":"2025-10-15T02:53:24.958Z","repository":{"id":244108823,"uuid":"796178714","full_name":"janole/vpn","owner":"janole","description":"Simple dockerized OpenVPN with automatic setup","archived":false,"fork":false,"pushed_at":"2024-11-08T09:08:41.000Z","size":90,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-08T09:32:01.754Z","etag":null,"topics":["docker","docker-compose","docker-image","openvpn","openvpn-server","split-tunneling","split-vpn","vpn","vpn-server"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/janole/vpn","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-05-05T07:07:03.000Z","updated_at":"2024-11-08T09:08:43.000Z","dependencies_parsed_at":"2024-06-13T00:23:07.779Z","dependency_job_id":"fa0b1383-17cb-472c-a560-3f13fce5c28a","html_url":"https://github.com/janole/vpn","commit_stats":null,"previous_names":["janole/vpn"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janole%2Fvpn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janole%2Fvpn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janole%2Fvpn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janole%2Fvpn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janole","download_url":"https://codeload.github.com/janole/vpn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229759841,"owners_count":18119874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","docker-image","openvpn","openvpn-server","split-tunneling","split-vpn","vpn","vpn-server"],"created_at":"2024-12-14T22:14:25.375Z","updated_at":"2025-10-15T02:53:24.905Z","avatar_url":"https://github.com/janole.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Docker Image Build Status](https://github.com/janole/vpn/workflows/Docker%20Image/badge.svg) ![8x8](https://github.com/janole/vpn/assets/1439712/a135a230-a2c3-492e-92a7-def4d4d6f292) ![Security Scan Status](https://github.com/janole/vpn/workflows/Security%20Scan/badge.svg)\n\nAn easy-to-use OpenVPN server running in a Docker container. \n\n### Requirements\n\n- Linux host with Docker\n- OpenVPN compatible client on your laptop, desktop computer or mobile phone\n\n### Set-up\n\nCreate a `compose.yaml` file with the following content:\n\n````yaml\nname: vpn\n\nservices:\n  tcp: \u0026vpn\n    image: ${IMAGE:-janole/vpn}\n    restart: unless-stopped\n    volumes:\n      - ./conf/openvpn:/conf/openvpn\n    cap_add:\n      - NET_ADMIN\n    devices:\n      - /dev/net/tun\n    ports:\n      - ${VPN_PORT:-1194}:${VPN_PORT:-1194}/tcp\n    depends_on:\n      config:\n        condition: service_completed_successfully\n\n  udp:\n    \u003c\u003c: *vpn\n    ports:\n      - ${VPN_PORT:-1194}:${VPN_PORT:-1194}/udp\n    environment:\n      - SERVERCONF=/conf/openvpn/udp-server.conf\n\n  config:\n    image: ${IMAGE:-janole/vpn}\n    env_file:\n      - .env\n    volumes:\n      - ./conf:/conf\n    command: \"/init-vpn.sh\"\n````\n\nCreate a `.env` configuration file with the following content:\n\n````env\nCA_CN=\"ca.my-own-site.org\"\nVPN_CN=\"vpn.my-own-site.org\"\nCLIENT_CN=\"my-vpn-client\"\n````\n\n- `CA_CN` can be a random name\n- `VPN_CN` should be the domain name (\"FQDN\") of your VPN\n- `CLIENT_CN` is just a name for your client profile\n\nNow you can start the VPN with the following command:\n\n````bash\n$ docker compose up -d\n[+] Running 4/4\n ✔ Network vpn_default     Created                                         0.1s \n ✔ Container vpn-config-1  Exited                                          1.3s \n ✔ Container vpn-tcp-1     Started                                         2.7s \n ✔ Container vpn-udp-1     Started                                         2.6s \n````\n\nCongratulations! The VPN should be up and running after a while ...\n\n(Please note that on **first start**, the `config` container will create all the necessary private keys and certificates. Generating the Diffie-Hellman parameters might take some minutes depending on the machine you're running the VPN on.)\n\nAfter successful start of the VPN, you can show the generated configuration files with:\n\n````bash\n$ find conf -type f\nconf/ca/ca.crt\nconf/ca/ca.key\nconf/ca/ca.srl\nconf/clients/my-vpn-client/my-vpn-client.csr\nconf/clients/my-vpn-client/my-vpn-client.key\nconf/clients/my-vpn-client/my-vpn-client.crt\nconf/clients/my-vpn-client/my-vpn-client-udp-only.ovpn\nconf/clients/my-vpn-client/my-vpn-client.ovpn\nconf/clients/my-vpn-client/my-vpn-client-tcp-udp.ovpn\nconf/clients/my-vpn-client/my-vpn-client-tcp-only.ovpn\nconf/openvpn/ca.crt\nconf/openvpn/vpn.crt\nconf/openvpn/tcp-server.conf\nconf/openvpn/dh.pem\nconf/openvpn/ta.key\nconf/openvpn/vpn.csr\nconf/openvpn/udp-server.conf\nconf/openvpn/serials/4ab68b294ec8852094e0c1ae8ae6be60cf305b4d\nconf/openvpn/vpn.key\n````\n\nNow you can download any of the `*.ovpn` configuration files and import them to your `OpenVPN` client.\n\nDownload the default OVPN file (`my-vpn-client.ovpn`):\n\n````bash\n$ scp vpn.my-own-site.org:vpn/conf/clients/my-vpn-client/my-vpn-client.ovpn .\nmy-vpn-client.ovpn                                                       100% 2302     7.5KB/s   00:00\n````\n\nImport the OVPN file to OpenVPN: \u003cbr\u003e\n\u003cimg width=\"512\" alt=\"Bildschirmfoto 2024-06-09 um 23 28 09\" src=\"https://github.com/janole/vpn/assets/1439712/07d851ae-44d8-4452-b08a-76f92eb61877\"\u003e\n\n### TO-DO\n\n- [ ] Add the possibility to revoke client certificates (CRL)\n- [ ] Add a web interface (\"access server\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanole%2Fvpn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanole%2Fvpn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanole%2Fvpn/lists"}