Overview
OpenVPN servers use username and password authentication. When a user connects, the OpenVPN server calls back to StartMyVPN to verify the credentials in real time.How authentication works
Downloading OpenVPN config
Users download a.ovpn config file from their dashboard:
- Web dashboard:
/vpn/download/{server} - API:
GET /v1/servers/{server}/openvpn
- Server IP and port
- Protocol (UDP/TCP) and port
- TLS/CA certificates
auth-user-passdirective (prompts for username/password on connect)
Connection logging
Every successful OpenVPN authentication is logged in the database with:- User ID
- Server ID
- Connection timestamp
- Bytes received and transmitted
Bandwidth enforcement
When a user attempts to connect and their bandwidth limit is exceeded (if the plan has a limit), the authentication request is rejected and the connection is denied.Manual installation
If you’re adding an existing server manually, install OpenVPN using the bundled script:- OpenVPN installation
- Certificate generation
auth-user-pass-verifyhook pointing to StartMyVPN’s script server- Firewall rules
OpenVPN config stored
Theopenvpn_configs table stores one config record per server containing:
- The client
.ovpntemplate - CA certificate
- Server certificate
- TLS auth key