Using a Mac as a VPN server.
Literally "works on my machine." No clue if it will work without modification on yours.
# Start
./start.sh
# Stop
docker compose down
# View logs
docker compose logs -fThe container restarts automatically on reboot (Docker Desktop must be set to launch at login).
docker exec -it openvpn-as \
/usr/local/openvpn_as/scripts/sacli \
--user openvpn --new_pass 'YourStrongPassword' SetLocalPasswordPort 8443 is exposed externally for TCP VPN tunneling, while port 943 (the Admin UI) only listens on 127.0.0.1 for security.
If you are on this machine — open directly in your browser:
https://localhost:943/admin
If you are on a different machine — forward the port over SSH first:
ssh -L 943:127.0.0.1:943 <user>@<this-machine-ip>Then open https://localhost:943/admin in your browser. Keep that terminal open while you use the UI.
Log in with username openvpn and the password you set above. Accept the self-signed certificate warning.
- In the Admin UI, go to User Management → User Permissions and create a user for yourself.
- Open the User Portal at
https://localhost:943(or via SSH tunnel if remote), log in as that user, and click Download to get your.ovpnprofile. - Install OpenVPN Connect on the device you want to connect from.
- Import the
.ovpnfile and connect.
The VPN uses port 8443/TCP (or 1194/UDP optionally, but UDP requires custom routes to bypass macOS network dropping).
docker compose pull && ./start.sh