
Mikrotik VPN Generator
This Project connect on a Mikrtotik router and create a vpn client according ton customisable template.
It will then download the certs and zip them making them available to the frondend.

Backend⌗
- Go / YAML
Frontend⌗
- HTML / JS
Requirements⌗
- Go
- Nginx
- Mikrotik certificate (for TLS)
How to Use⌗
Clone the repository:
git clone https://github.com/neph-IO/mikrotik-vpn-gen.git cd mikrotik-vpn-gen cp config.example.yaml config.yaml
Edit
config.yaml
to match your MikroTik and environment settings.Edit the
template/Client.ovpn
file to fit your OpenVPN setup.Place your CA certificate (e.g.
ca2025.crt
) in thetemplate/
folder.Copy the frontend HTML (
frontend/vpncreator.html
) into your Nginxwww/
directory.Run the backend API:
go run cmd/mikrotik-vpn-gen/init.go
Nginx Configuration⌗
In your Nginx site config, add a reverse proxy to forward API requests:
location /api/ {
proxy_pass http://localhost:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
📝 Notes⌗
- You must update the frontend’s
<select>
dropdown to match your MikroTik profiles.
Copy this line (247) as many times as needed:
<option>OpenVpnProfile1</option>
docker option will be soon available.