Setting Up an OpenVPN Server
OpenVPN is a battle-tested VPN solution with broad client compatibility. The easiest way to set it up is using the angristan install script.
Step 1 — Run the Install Script
curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
chmod +x openvpn-install.sh
bash openvpn-install.sh
The script will ask for your server IP, port (default 1194 UDP), DNS provider, and first client name. It configures everything automatically.
Step 2 — Open Firewall Port
ufw allow 1194/udp
Step 3 — Download the Client Config
The script generates a .ovpn file (e.g., client1.ovpn) in the current directory. Transfer it to your device:
scp root@YOUR_SERVER_IP:/root/client1.ovpn ~/
Step 4 — Connect from Your Device
- Windows/macOS: Download the OpenVPN client from openvpn.net/client and import the
.ovpnfile - Linux:
apt install openvpn -y && openvpn --config client1.ovpn - Android/iOS: OpenVPN Connect app — import the
.ovpnfile
Add Additional Clients
bash openvpn-install.sh
Run the script again and choose Add a new client.
Revoke a Client
bash openvpn-install.sh
Choose Revoke existing client.
WireGuard vs OpenVPN
- WireGuard: Faster, simpler config, modern cryptography
- OpenVPN: Wider device compatibility, better firewall traversal (TCP mode on port 443)