OpenVPN Community on Windows Server 2025 on Azure User Guide
Overview
This guide covers the deployment and use of OpenVPN Community on Windows Server 2025 on Microsoft Azure, using cloudimg's virtual machine image from the Azure Marketplace.
OpenVPN Community is the open source VPN (GPL-2.0) used to give laptops, phones and servers an encrypted connection to a private network, or to send their internet traffic out through a server you control. Each device connects with a profile that holds its own certificate and key; devices without one cannot connect, and cannot even get an answer from the server.
The image is Microsoft Windows Server 2025 Datacenter with the Desktop Experience (the full graphical interface), Gen2, x64, built from Microsoft's own image on the Azure Marketplace (MicrosoftWindowsServer:WindowsServer:2025-datacenter-g2, version 26100.33828.261112). The Windows Server licence is included in the VM price and billed by Microsoft.
What's included:
- OpenVPN Community 2.7.9 for Windows (64-bit), from OpenVPN Inc.'s signed installer
OpenVPN-2.7.9-I002-amd64.msi, its checksum and its Authenticode signature (OpenVPN Inc.) verified when the image was built, inC:\Program Files\OpenVPN\. The server parts only: OpenVPN, its Windows service, the Data Channel Offload driver (ovpn-dco), OpenSSL and Easy-RSA 3. No GUI and no TAP or Wintun adapter - A VPN server made for your VM at its first boot: this VM's own certificate authority, server certificate, revocation list and tls-crypt key, and the server configuration
C:\Program Files\OpenVPN\config-auto\server.ovpn. No key, certificate or configuration ships in the image, so no two VMs share one - The first client,
client1, ready to import:C:\ProgramData\OpenVPN-Server\clients\client1.ovpn, a single file with everything a client needs, already pointing at your VM's public IP address. Only administrators can read it - OpenVPN running as the Windows service OpenVPNService under its own virtual account NT SERVICE\OpenVPNService (never LocalSystem, never an administrator), on UDP 1194, started automatically at boot and restarted if it stops; OpenVPNServiceInteractive sets the tunnel's address and routes for it
- Full tunnel: clients get an address in
10.8.0.0/24and their internet traffic leaves through the VM (Windows NAT), with DNS through1.1.1.1and9.9.9.9 openvpn-server.ps1, a PowerShell tool to add, revoke and list clients and to set the address clients dial- The Windows Firewall rule cloudimg-OpenVPN-UDP-In (UDP 1194, group "OpenVPN server")
- Windows Server 2025 Datacenter, Desktop Experience, version 24H2, build 26100.33828, with Microsoft's November 2026 cumulative update. Windows Update ran during the build and reported nothing pending when the image was captured on 1 December 2026. Microsoft Edge 158
- The Azure VM agent, so Azure features such as Reset password and Run command work
- cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours
Platform: Microsoft Azure (Gen2 Hyper-V; Trusted Launch, NVMe sizes and accelerated networking supported)
Administrator account: the user name and password you choose when you deploy the VM. There is no default Windows password on this image.
VPN data folder: C:\ProgramData\OpenVPN-Server (the certificate authority, the server's keys and the client profiles; SYSTEM and Administrators only).
Prerequisites
- An Azure subscription
- A Remote Desktop client: Remote Desktop Connection (
mstsc) on Windows, Windows App (formerly Microsoft Remote Desktop) on macOS, or Remmina on Linux - The public IP address of the machine you will connect from, so you can allow Remote Desktop from that address only
- An OpenVPN client on each device that will connect: OpenVPN Connect (Windows, macOS, iOS, Android), OpenVPN Community 2.6 or later, Tunnelblick on macOS, or the
openvpnpackage on Linux
Recommended size: Standard_B2ms (2 vCPUs, 8 GiB memory). Choose a size with accelerated networking (for example Standard_D2s_v6) for many clients or high throughput: Azure's network bandwidth grows with the VM size.
Step 1: Deploy the Virtual Machine
Option A: Azure Portal
- In the Azure Marketplace, search for "OpenVPN Community on Windows Server 2025 cloudimg"
- Select the offer and click Create
- Configure the basics:
- Subscription and Resource group: select or create
- Virtual machine name and Region: your choice
- Size:
Standard_B2msrecommended - Under Administrator account, enter a Username and a Password that you choose. Azure refuses reserved names such as "administrator", "admin" and "guest"
- Under Inbound port rules, allow RDP (3389). Azure then opens port 3389 to the whole internet, so restrict it straight after deployment (step 7)
- Click Review + create, then Create
- When the deployment finishes, open the VM's Networking (Network settings) page:
- edit the inbound rule for port 3389 and set Source to My IP address (or your office or VPN address range)
- add an inbound rule for port 1194, protocol UDP, with Source set to Any (clients connect from wherever they are; only holders of a profile can connect) or to the address ranges your clients connect from
Keep the VM's public IP address the same: deploy it with a Static public IP (the default for a Standard IP), because every client profile dials that address. If it ever changes, see Step 8.
Option B: Azure CLI
Accept the offer terms once per subscription, then create the VM with no inbound rules. Leave out --admin-password and the CLI asks for the password, which keeps it out of your shell history:
az vm image terms accept --urn cloudimg1647283583153:openvpn-windows-server:default:latest
az vm create \
--resource-group myResourceGroup \
--name my-openvpn \
--image cloudimg1647283583153:openvpn-windows-server:default:latest \
--size Standard_B2ms \
--admin-username <your-admin-name> \
--public-ip-sku Standard \
--nsg-rule NONE
Then allow Remote Desktop from your own address only, allow OpenVPN, and read the VM's public IP:
az network nsg rule create \
--resource-group myResourceGroup \
--nsg-name my-openvpnNSG \
--name allow-rdp-from-my-ip \
--priority 1000 \
--direction Inbound --access Allow --protocol Tcp \
--destination-port-ranges 3389 \
--source-address-prefixes <your-public-ip>/32
az network nsg rule create \
--resource-group myResourceGroup \
--nsg-name my-openvpnNSG \
--name allow-openvpn \
--priority 1010 \
--direction Inbound --access Allow --protocol Udp \
--destination-port-ranges 1194 \
--source-address-prefixes '*'
az vm show --resource-group myResourceGroup --name my-openvpn --show-details --query publicIps -o tsv
Step 2: Connect with Remote Desktop
- Open your Remote Desktop client and connect to the VM's public IP address
- Windows: run
mstsc, enter the IP address and click Connect - macOS: in Windows App, add a PC with the IP address
- Linux: in Remmina, create an RDP connection to the IP address
- When asked for credentials, sign in as
<vm-name>\<your-admin-name>with the password you set at deployment. On Windows, choose More choices, then Use a different account - Accept the certificate warning: the VM uses a self-signed Remote Desktop certificate
Windows may show its privacy settings screen at your first sign-in; choose your settings and click Accept. The desktop has a file OpenVPN server - start here.txt with the paths this guide uses.
OpenVPN does not need you to stay signed in: it runs as a Windows service from the moment the VM starts. Sign out (or just disconnect) when you are done, and clients stay connected.
Step 3: Check that the VPN server is running
At the first start of your VM, a one-time task waits for Azure to finish setting the VM up, makes this VM's keys, configuration and first client, starts OpenVPN and removes itself. It takes a few minutes after the VM is first reachable. Open Windows PowerShell with Run as administrator (the tool and the data folder need an elevated window) and run:
Get-Content C:\ProgramData\openvpn-server-firstboot.log
Get-Service OpenVPN* | Format-Table Name, Status, StartType
Get-NetUDPEndpoint -LocalPort 1194
2026-12-01T23:17:29.6462152Z provisioning finished
2026-12-01T23:19:50.4884455Z tool: NAT OpenVPN-Server=10.8.0.0/24
2026-12-01T23:19:50.4944457Z tool: INIT_DONE pki=C:\ProgramData\OpenVPN-Server\pki config=C:\Program Files\OpenVPN\config-auto\server.ovpn address=20.115.31.97
2026-12-01T23:20:01.6236509Z tool: CLIENT_ADDED client1 profile=C:\ProgramData\OpenVPN-Server\clients\client1.ovpn remote=20.115.31.97
2026-12-01T23:20:01.6266510Z keys, config, NAT and client1 made
2026-12-01T23:20:16.3012644Z OpenVPN server listening on UDP 1194, initialised; service Automatic
2026-12-01T23:20:23.5210010Z first boot done
Name Status StartType
---- ------ ---------
OpenVPNService Running Automatic
OpenVPNServiceInteractive Running Automatic
LocalAddress LocalPort
------------ ---------
:: 1194
The log ends with first boot done. OpenVPN listens on UDP 1194 on every address (:: is Windows' way of showing one socket that serves IPv4 and IPv6).
The server's own end of the tunnel, the NAT that takes clients' traffic out through the VM, and the clients:
Get-NetIPAddress -AddressFamily IPv4 | Where-Object IPAddress -like '10.8.0.*' | Format-Table InterfaceAlias, IPAddress, PrefixLength
Get-NetNat | Format-Table Name, InternalIPInterfaceAddressPrefix, Active
& 'C:\Program Files\OpenVPN\server-tools\openvpn-server.ps1' -List
InterfaceAlias IPAddress PrefixLength
-------------- --------- ------------
Local Area Connection 10.8.0.1 24
Name InternalIPInterfaceAddressPrefix Active
---- -------------------------------- ------
OpenVPN-Server 10.8.0.0/24 True
Clients dial: 20.115.31.97 UDP 1194
Client State Expires Profile
------ ----- ------- -------
client1 valid 2036-11-28 C:\ProgramData\OpenVPN-Server\clients\client1.ovpn

The tunnel adapter is OpenVPN's Data Channel Offload adapter; Windows calls it "Local Area Connection" (its description is "OpenVPN Data Channel Offload"). Clients dial is the public address first boot found for your VM and wrote into every profile.
Step 4: Copy the client profile to your device
client1.ovpn holds client1's private key, so it sits in a folder only administrators can read. In the same elevated window, copy it to your desktop:
Copy-Item C:\ProgramData\OpenVPN-Server\clients\client1.ovpn $env:USERPROFILE\Desktop\
Then copy client1.ovpn from the VM's desktop to your device: paste it through the Remote Desktop clipboard (copy the file in File Explorer on the VM, paste it on your computer), or use your Remote Desktop client's drive redirection. Delete the copy on the VM's desktop when you have it, and keep the file private on your device: anyone who has it can connect as client1.
Do not change the permissions of C:\ProgramData\OpenVPN-Server (File Explorer offers to when you open it as a non-elevated user: choose Cancel). Use the elevated PowerShell window instead.
The start of the profile shows what it dials:
Get-Content C:\ProgramData\OpenVPN-Server\clients\client1.ovpn -TotalCount 13
# OpenVPN client profile 'client1' for the OpenVPN Community server on wsrdp-ed2cb9 (cloudimg).
# Keep it secret: it holds this client's private key. Import it into any OpenVPN client (OpenVPN Connect,
# OpenVPN Community 2.6 or later, Tunnelblick, the openvpn command line).
client
dev tun
proto udp
remote 20.115.31.97 1194
resolv-retry infinite
nobind
remote-cert-tls server
data-ciphers AES-256-GCM
verb 3
<ca>
The certificate authority, client certificate, private key and tls-crypt key follow inline, so the one file is all a client needs.
Step 5: Connect a client
- OpenVPN Connect (Windows, macOS, iOS, Android): Import Profile > Upload File, choose
client1.ovpn, then Connect - OpenVPN Community on Windows: copy the file to
C:\Users\<you>\OpenVPN\config\, then connect from the OpenVPN GUI in the notification area - Tunnelblick on macOS: double-click the file
- Linux:
sudo openvpn --config client1.ovpn(or import it into NetworkManager withnmcli connection import type openvpn file client1.ovpn)
When the client logs Initialization Sequence Completed it is connected: it has an address in 10.8.0.0/24, its internet traffic leaves through the VM, and its DNS goes to 1.1.1.1 and 9.9.9.9. Check from the client that your traffic now comes from the VM's public IP address:
curl https://ifconfig.me
If the client keeps retrying with no answer, check the Azure rule for UDP 1194 (Step 1).
Step 6: Add a client for each device
Give every device its own client, so you can revoke one without touching the others. In an elevated PowerShell window:
& 'C:\Program Files\OpenVPN\server-tools\openvpn-server.ps1' -AddClient laptop
& 'C:\Program Files\OpenVPN\server-tools\openvpn-server.ps1' -List
CLIENT_ADDED laptop profile=C:\ProgramData\OpenVPN-Server\clients\laptop.ovpn remote=20.115.31.97
Clients dial: 20.115.31.97 UDP 1194
Client State Expires Profile
------ ----- ------- -------
client1 valid 2036-11-28 C:\ProgramData\OpenVPN-Server\clients\client1.ovpn
laptop valid 2036-11-28 C:\ProgramData\OpenVPN-Server\clients\laptop.ovpn

The new profile is ready to copy to the device (Step 4). Names may use letters, digits, dot, dash and underscore, up to 64 characters. The server needs no restart: it accepts every certificate its own authority signed that is not revoked.
Step 7: Revoke a client
When a device is lost or someone leaves, revoke its client:
& 'C:\Program Files\OpenVPN\server-tools\openvpn-server.ps1' -RevokeClient laptop
CLIENT_REVOKED laptop (refused from its next connection; Restart-Service OpenVPNService drops a connected session now)
The tool revokes the certificate, gives the server the new revocation list and deletes the profile. -List then shows the client as revoked. The server refuses the client the next time it connects; to cut off a session that is connected now, run Restart-Service OpenVPNService (every client reconnects within seconds, except the revoked one).
Step 8: Change the address clients dial
Profiles dial the public IP address first boot found. If you give the VM a DNS name (recommended, for example an Azure DNS label or your own domain), or its IP address changes, write the new address into every profile:
& 'C:\Program Files\OpenVPN\server-tools\openvpn-server.ps1' -SetPublicAddress vpn.example.com
The tool prints ADDRESS_SET vpn.example.com profilesUpdated=<n>. Copy the updated profiles to the devices again (Step 4). New clients get the new address.
If the VM had no public IP address at first boot, the profiles hold the placeholder <your-vm-public-ip>: run -SetPublicAddress with the address clients will reach.
Step 9: The server configuration
The configuration first boot wrote is C:\Program Files\OpenVPN\config-auto\server.ovpn; OpenVPNService runs every .ovpn in config-auto:
# OpenVPN Community server (cloudimg). This VM's own CA, certificates and tls-crypt key, made at first boot,
# are in C:\ProgramData\OpenVPN-Server. Clients: C:\Program Files\OpenVPN\server-tools\openvpn-server.ps1 -AddClient <name>
port 1194
proto udp
dev tun
topology subnet
server 10.8.0.0 255.255.255.0
ca "C:\\ProgramData\\OpenVPN-Server\\server\\ca.crt"
cert "C:\\ProgramData\\OpenVPN-Server\\server\\server.crt"
key "C:\\ProgramData\\OpenVPN-Server\\server\\server.key"
crl-verify "C:\\ProgramData\\OpenVPN-Server\\server\\crl.pem"
dh none
tls-crypt "C:\\ProgramData\\OpenVPN-Server\\server\\tls-crypt.key"
tls-version-min 1.2
remote-cert-tls client
data-ciphers AES-256-GCM
data-ciphers-fallback AES-256-GCM
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 9.9.9.9"
push "block-outside-dns"
keepalive 10 120
status "C:\\ProgramData\\OpenVPN\\Log\\server-status.log"
verb 3
explicit-exit-notify 1

What it does:
tls-cryptsigns and encrypts every control packet with a key only your profiles hold, so the server does not answer anyone without a profile, and the TLS handshake stays privateremote-cert-tls clientandcrl-verify: a client must show a client certificate from this VM's own authority that is not on the revocation listdh nonewith EC certificates (secp384r1): key exchange by elliptic-curve Diffie-Hellman;data-ciphers AES-256-GCMencrypts the trafficpush "redirect-gateway def1 bypass-dhcp", the twodhcp-option DNSlines andblock-outside-dns: clients send all their traffic and DNS through the tunnel. For a split tunnel (only your Azure networks through the VPN), replace those four lines withpush "route <network> <mask>"lines for your networkskeepalive 10 120: a client that goes quiet for two minutes is dropped
After editing it, run Restart-Service OpenVPNService.
Step 10: The server log
OpenVPN logs to C:\ProgramData\OpenVPN\Log\server.log, and every minute writes the connected clients to server-status.log in the same folder:

Each client connection adds lines with its name (client1, laptop), its public address and the tunnel address it was given. A revoked client's attempt shows VERIFY ERROR with certificate revoked and its name.
Step 11: Keeping Windows and OpenVPN up to date
Windows: Windows Update is on, as in Microsoft's image. Check for updates in Settings > Windows Update, and plan restarts: OpenVPN starts again by itself after a restart, and clients reconnect.
OpenVPN: download the newer OpenVPN-<version>-amd64.msi from the OpenVPN Community downloads page to the VM, check its signature (right-click > Properties > Digital Signatures: OpenVPN Inc.), and install it from an elevated PowerShell window in the folder you saved it to, with the same parts as this image (no GUI, no TAP or Wintun adapter). The installer upgrades in place; your config-auto\server.ovpn and C:\ProgramData\OpenVPN-Server are not part of it and stay as they are:
Start-Process msiexec.exe -Wait -ArgumentList '/i', 'OpenVPN-<version>-amd64.msi', 'ADDLOCAL=OpenVPN,OpenVPN.Service,OpenVPN.Documentation,Drivers,Drivers.OvpnDco,OpenSSL,EasyRSA', '/qb'
Set-Service OpenVPNService -StartupType Automatic
Start-Service OpenVPNService
& 'C:\Program Files\OpenVPN\bin\openvpn.exe' --version | Select-Object -First 1
Get-Service OpenVPN* | Format-Table Name, Status, StartType
Clients reconnect by themselves while the service restarts.
Server Components
| Component | Version or setting | Where |
|---|---|---|
| OpenVPN Community | 2.7.9 (OpenSSL 3.6.5, DCO 2.8.15) | C:\Program Files\OpenVPN\bin\openvpn.exe |
| OpenVPNService | NT SERVICE\OpenVPNService, Automatic, restarted if it stops |
Services (services.msc) |
| OpenVPNServiceInteractive | LocalSystem, Automatic: applies the tunnel address and routes | Services |
| VPN | UDP 1194, routed 10.8.0.0/24, tls-crypt, AES-256-GCM, full tunnel |
C:\Program Files\OpenVPN\config-auto\server.ovpn |
| Certificates | Easy-RSA 3, EC secp384r1, valid ten years; revocation list valid ten years | C:\ProgramData\OpenVPN-Server\pki |
| NAT | Windows NAT OpenVPN-Server for 10.8.0.0/24, IP routing on |
Get-NetNat |
| Firewall | cloudimg-OpenVPN-UDP-In, UDP 1194 |
Windows Defender Firewall |
| Windows Server | 2025 Datacenter, Desktop Experience, 24H2, build 26100.33828 |
Filesystem Layout
| Path | What it holds |
|---|---|
C:\Program Files\OpenVPN\ |
OpenVPN (bin\), Easy-RSA (easy-rsa\), the documentation and license.txt (GPL-2.0) |
C:\Program Files\OpenVPN\config-auto\server.ovpn |
The server configuration |
C:\Program Files\OpenVPN\server-tools\openvpn-server.ps1 |
The client tool |
C:\ProgramData\OpenVPN-Server\pki\ |
This VM's certificate authority (Easy-RSA): the CA key, every certificate issued, the revocation list |
C:\ProgramData\OpenVPN-Server\server\ |
What the server reads: ca.crt, server.crt, server.key, crl.pem, tls-crypt.key (also readable by NT SERVICE\OpenVPNService) |
C:\ProgramData\OpenVPN-Server\clients\ |
One .ovpn profile per client |
C:\ProgramData\OpenVPN-Server\public-address.txt |
The address clients dial |
C:\ProgramData\OpenVPN\Log\ |
server.log and server-status.log |
The whole of C:\ProgramData\OpenVPN-Server is SYSTEM and Administrators only:
IdentityReference FileSystemRights
----------------- ----------------
NT AUTHORITY\SYSTEM FullControl
BUILTIN\Administrators FullControl
The OS disk is Microsoft's 127 GB Windows disk (C:, NTFS). On sizes that have an Azure temporary disk (D:), keep nothing of OpenVPN's there: Azure can wipe it when the VM is stopped or moved.
Managing the Service
OpenVPN is the Windows service OpenVPNService. From an elevated PowerShell window:
Restart-Service OpenVPNService
Stop-Service OpenVPNService
Start-Service OpenVPNService
Get-Service OpenVPN* | Format-Table Name, Status, StartType
Leave OpenVPNServiceInteractive running: OpenVPNService runs as its own low-privilege account and asks it to set the tunnel's address and routes.
Scripts and Log Files
| File | What it is |
|---|---|
C:\ProgramData\OpenVPN\Log\server.log |
OpenVPN's log |
C:\ProgramData\OpenVPN\Log\server-status.log |
The connected clients, rewritten every minute |
C:\ProgramData\openvpn-server-firstboot.log |
What the one-time first-boot task did |
C:\ProgramData\openvpn-server-firstboot.done |
Written when the first-boot task finished |
On Startup
At the first start of your VM, the scheduled task \cloudimg\OpenVPN server first boot (SYSTEM) runs once:
- It waits until Azure has finished setting up the VM
- It creates
C:\ProgramData\OpenVPN-Serverwith its permissions (SYSTEM and Administrators only), then this VM's certificate authority, server certificate, revocation list and tls-crypt key - It writes
config-auto\server.ovpn, the Windows NAT for10.8.0.0/24, and the public address clients dial, read from Azure's instance metadata - It makes the first client,
client1, and its profile - It starts OpenVPNService, checks that it listens on UDP 1194 and has initialised, sets it to start automatically, writes
C:\ProgramData\openvpn-server-firstboot.done, then deletes itself and its script
Its log on a new VM is the one shown in Step 3. It runs only once, so there is nothing to turn off. Every start after that, Windows starts OpenVPNService.
Troubleshooting
openvpn-server-firstboot.done is missing, or there is no client1.ovpn
The first-boot task may still be running: give it a few minutes and check again. Its log shows how far it got:
Get-Content C:\ProgramData\openvpn-server-firstboot.log
If it stopped, it tries again at the next start of the VM.
The client gets no answer
- Check that the Azure network security group allows UDP 1194 from the address the client connects from (Step 1). A TCP rule does not cover it
- Check that OpenVPNService is running and listening (Step 3)
- Check that the profile's
remoteline is the VM's current public address (Step 8) - Because of tls-crypt, the server stays silent to a profile from another server or an old VM: nothing appears in
server.logfor it
The client connects but cannot reach the internet
Check that the NAT is there and active (Get-NetNat, Step 3). If it is missing, create it again in an elevated window:
New-NetNat -Name OpenVPN-Server -InternalIPInterfaceAddressPrefix 10.8.0.0/24
-AddClient says the client already exists
Every name is used once. Revoke the old client first (Step 7), or pick another name.
Forgot the Windows password
Use Reset password on the VM's page in the Azure portal.
Security Recommendations
- Give each device its own client and revoke the ones you no longer use (Steps 6 and 7)
- Keep profiles private. A
.ovpnfile is a key to your network. Send it to its device over a channel you trust, and delete copies you no longer need - Keep Remote Desktop restricted to your own address (Step 1), or use Azure Bastion.
- Protect the certificate authority.
C:\ProgramData\OpenVPN-Server\pki\private\ca.keysigns every client: anyone with it can make clients. Back upC:\ProgramData\OpenVPN-Serversomewhere private (for example with Azure Backup or disk snapshots), so you can restore the server without reissuing every profile - Keep Windows and OpenVPN up to date (Step 11)
Support
cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours, covering deployment, Remote Desktop access, OpenVPN's setup and clients, and upgrades.
- Email: support@cloudimg.co.uk
- Website: www.cloudimg.co.uk
- Product Catalogue: www.cloudimg.co.uk/products
- User Guides: www.cloudimg.co.uk/guides
OpenVPN is a registered trademark of OpenVPN Inc. Microsoft and Windows Server are trademarks of the Microsoft group of companies. All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.