Home Cloud Serevrs Set Up a Windows VPS as a VPN Server Using OpenVPN

Set Up a Windows VPS as a VPN Server Using OpenVPN

Last updated on Feb 13, 2025

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

  1. Download OpenVPN Community Edition from:
    👉 https://openvpn.net/community-downloads/

  2. Run the installer and select "EasyRSA" when prompted.

  3. Complete the installation and restart your server.

OpenVPN is now installed!


2️⃣ Configure OpenVPN Server

  1. Open File Explorer and navigate to:

    C:\Program Files\OpenVPN\sample-config
    
    
  2. Copy server.ovpn to:

    C:\Program Files\OpenVPN\config
    
    
  3. 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
    
    
  4. Save and close the file.

Your OpenVPN server configuration is ready!


3️⃣ Open OpenVPN Port in Windows Firewall

  1. Open Windows Defender Firewall (Win + R, type wf.msc, press Enter).

  2. Click Advanced SettingsInbound RulesNew Rule.

  3. Select Port, then click Next.

  4. Choose UDP, enter 1194, then click Next.

  5. Select Allow the connection, then click Next again.

  6. Apply to Domain, Private, and Public networks.

  7. Name the rule OpenVPN UDP 1194 and click Finish.

Your OpenVPN server is now accessible!


4️⃣ Start OpenVPN Server

  1. Open Command Prompt (Admin).

  2. Navigate to the OpenVPN folder:

    cd "C:\Program Files\OpenVPN\bin"
    
    
  3. Start the OpenVPN service:

    openvpn --config "C:\Program Files\OpenVPN\config\server.ovpn"
    
    
  4. Keep the window open while the server is running.

Your VPN server is now online!


5️⃣ Configure OpenVPN Clients

Generate Client Configuration

  1. Open Notepad and create a new file named client.ovpn.

  2. 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
    
    
  3. Save the file and transfer it to your client device.

Connect to the VPN from Windows

  1. Install OpenVPN Client from https://openvpn.net/community-downloads/.

  2. Copy client.ovpn to C:\Program Files\OpenVPN\config.

  3. 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:

  1. Open Task Scheduler (Win + R, type taskschd.msc, press Enter).

  2. Click Create Basic Task (right panel).

  3. Name it Start OpenVPN Server → Click Next.

  4. Select When the computer starts → Click Next.

  5. Select Start a program → Click Next.

  6. Browse to openvpn.exe inside C:\Program Files\OpenVPN\bin.

  7. 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.