https://github.com/bjoernalbers/ovpnd
Simple .ovpn Files Webserver for OpenVPN Connect
https://github.com/bjoernalbers/ovpnd
openvpn ovpn ovpn-files webserver
Last synced: 24 days ago
JSON representation
Simple .ovpn Files Webserver for OpenVPN Connect
- Host: GitHub
- URL: https://github.com/bjoernalbers/ovpnd
- Owner: bjoernalbers
- License: mit
- Created: 2024-04-04T08:49:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-17T07:35:53.000Z (over 1 year ago)
- Last Synced: 2025-10-10T15:32:02.638Z (24 days ago)
- Topics: openvpn, ovpn, ovpn-files, webserver
- Language: Go
- Homepage:
- Size: 136 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ovpnd - Simple .ovpn Files Webserver for OpenVPN Connect
The official OpenVPN client [OpenVPN Connect](https://openvpn.net/client/) also
can fetch client configuration files (.ovpn files) by HTTPS, usually from an
[OpenVPN Access Server](https://openvpn.net/access-server/).
`ovpnd` serves those .ovpn files files as well by implementing the official
[REST API](https://openvpn.net/images/pdf/REST_API.pdf).

## Requirements
You need the following:
- directory with .ovpn files a.k.a. connection profiles in
[unified format](https://openvpn.net/faq/i-am-having-trouble-importing-my-ovpn-file/)
- for each .ovpn file a corresponding .txt file in the same directory that
includes an unecrypted password (required for user authentication)
- TLS certificate and key
## Usage
`ovpnd` is distributed as
[docker image](https://hub.docker.com/r/bjoernalbers/ovpnd) for easy deployment.
Getting help:
$ docker run --rm bjoernalbers/ovpnd -h
Running `ovpnd`:
$ ls tls
cert.crt cert.key
$ ls profiles
johndoe.ovpn johndoe.txt
$ cat profiles/johndoe.txt
secret
$ docker run --rm -p 443:443 -v $(pwd)/tls:/tls -v $(pwd)/profiles:/profiles \
bjoernalbers/ovpnd -cert /tls/cert.crt -key /tls/cert.key /profiles
Testing:
$ curl https://openvpn.example.com/rest/GetUserlogin
Authorization Required
REST method failed
Invalid username or password
$ curl -u johndoe:secret https://openvpn.example.com/rest/GetUserlogin
content of profile
Running `ovpnd` without TLS if a reverse-proxy already takes care of TLS:
$ docker run --rm -p 80:80 -v $(pwd)/profiles:/profiles \
bjoernalbers/ovpnd -no-tls /profiles
**If you add / remove .ovpn files or change passwords you have to restart the
container so that `ovpnd` picks up the changes!**