Setting up a VPN server on your Windows VPS using OpenVPN allows you to create a secure and encrypted connection for remote access, enhanced privacy, and bypassing network restrictions. This guide will walk you through installing, configuring, and securing an OpenVPN server on a Windows Server VPS.
📌 Prerequisites
-
A Windows Server VPS (2016, 2019, or 2022) from VolticHost
-
Administrator access
-
Ports 1194 (UDP) open in the firewall
1️⃣ Download and Install OpenVPN
-
Download OpenVPN Community Edition from:
👉 https://openvpn.net/community-downloads/ -
Run the installer and select "EasyRSA" when prompted.
-
Complete the installation and restart your server.
✅ OpenVPN is now installed!
2️⃣ Configure OpenVPN Server
-
Open File Explorer and navigate to:
C:\Program Files\OpenVPN\sample-config
-
Copy
server.ovpn
to:C:\Program Files\OpenVPN\config
-
Open
server.ovpn
in Notepad and modify:port 1194 proto udp dev tun ca ca.crt cert server.crt key server.key dh dh2048.pem
-
Save and close the file.
✅ Your OpenVPN server configuration is ready!
3️⃣ Open OpenVPN Port in Windows Firewall
-
Open Windows Defender Firewall (
Win + R
, typewf.msc
, press Enter). -
Click Advanced Settings → Inbound Rules → New Rule.
-
Select Port, then click Next.
-
Choose UDP, enter 1194, then click Next.
-
Select Allow the connection, then click Next again.
-
Apply to Domain, Private, and Public networks.
-
Name the rule OpenVPN UDP 1194 and click Finish.
✅ Your OpenVPN server is now accessible!
4️⃣ Start OpenVPN Server
-
Open Command Prompt (Admin).
-
Navigate to the OpenVPN folder:
cd "C:\Program Files\OpenVPN\bin"
-
Start the OpenVPN service:
openvpn --config "C:\Program Files\OpenVPN\config\server.ovpn"
-
Keep the window open while the server is running.
✅ Your VPN server is now online!
5️⃣ Configure OpenVPN Clients
Generate Client Configuration
-
Open Notepad and create a new file named
client.ovpn
. -
Add the following:
client dev tun proto udp remote your-vps-ip 1194 resolv-retry infinite nobind persist-key persist-tun ca ca.crt cert client.crt key client.key
-
Save the file and transfer it to your client device.
Connect to the VPN from Windows
-
Install OpenVPN Client from https://openvpn.net/community-downloads/.
-
Copy
client.ovpn
toC:\Program Files\OpenVPN\config
. -
Open OpenVPN GUI, right-click the icon, and select Connect.
✅ You are now connected to your VPN!
6️⃣ Automate OpenVPN Startup (Optional)
To start the VPN server automatically when Windows boots:
-
Open Task Scheduler (
Win + R
, typetaskschd.msc
, press Enter). -
Click Create Basic Task (right panel).
-
Name it Start OpenVPN Server → Click Next.
-
Select When the computer starts → Click Next.
-
Select Start a program → Click Next.
-
Browse to
openvpn.exe
insideC:\Program Files\OpenVPN\bin
. -
Click Finish.
✅ OpenVPN will now start automatically on reboot!
🎉 Conclusion
You've successfully set up a Windows VPS as a VPN server using OpenVPN! Your secure and private connection is now ready for use. 🚀
For more assistance, contact VolticHost Support.