A PowerShell script to generate a valid WireGuard configuration file from NordVPN's NordLynx protocol. No need for manual API calls or external tools — just your access token and a few steps.
- Authenticates with NordVPN using your Linux access token
- Retrieves a fresh WireGuard config (private key, public key, endpoint, etc.)
- Saves it with a custom filename ready for use in any WireGuard client
- Windows with PowerShell 5.1+ (script tested only on Windows)
- A valid NordVPN account
- Access token generated via the Nord Account dashboard
.\Generate-WireGuardConfig.ps1
The script will ask you to enter your NordVPN Linux access token during execution.
All path examples in this README use Windows-style backslashes.
- Download and install the NordVPN client for your OS.
- Open the client and go to Settings > Connection
- Set VPN protocol to
NordLynx
Screenshot reference:
- Visit https://my.nordaccount.com/dashboard/nordvpn/manual-configuration/
- Click Generate new token
- Select Doesn’t expire
- Click Generate token and copy it somewhere safe
Screenshot reference:
Download and install from: 👉 https://www.wireguard.com/install/
Open the NordVPN app and connect to your desired server. The script pulls the active connection info to retrieve the correct WireGuard credentials.
-
Open PowerShell as Administrator
-
Navigate to the folder containing the script:
cd path\to\script
-
Run it:
.\Generate-WireGuardConfig.ps1
This will create a WireGuard configuration file with a name of your choice in the same directory.
[Interface]
PrivateKey = <fetched-private-key>
Address = 10.5.0.2/32
DNS = 1.1.1.1
[Peer]
PublicKey = <server-public-key>
Endpoint = <server-ip>:51820
AllowedIPs = 0.0.0.0/0, ::/0
PersistentKeepalive = 25
This project is licensed under the MIT License — see LICENSE for details.
Disclaimer: This project is not affiliated with NordVPN or WireGuard. All trademarks and content belong to their respective owners.