A command-line tool for generating optimized NordVPN WireGuard configurations.
Project description
NordVPN WireGuard Config Generator
A fast, asynchronous command-line tool that fetches the live NordVPN server catalogue and generates ready to use WireGuard configuration files one per server, organized by country and city, with the lowest-latency endpoint per location surfaced into a separate best_configs/ tree.
Features
- Complete catalogue generates a
.conffor every WireGuard-enabled NordVPN server (typically ~7,500 active configurations). - Optimized subset selects the lowest-load server per city into
best_configs/for quick selection. - Distance-aware ranks servers by load and Haversine distance from your detected geolocation.
- Concurrent I/O non-blocking HTTP and batched filesystem writes; full run completes in seconds.
- Zero stored credentials your access token is used in-memory only and is never written to disk.
- Customizable DNS, endpoint mode (hostname or IP), and keepalive interval are configurable per run.
Requirements
- Python 3.11 or later
- An active NordVPN subscription and a personal access token
Installation
The recommended installer for command-line applications is pipx, which isolates the tool in its own environment:
pipx install nord-config-generator
Plain pip works equally well:
pip install nord-config-generator
Usage
Generate configurations
Interactive mode prompts for token and preferences:
nordgen generate
Non interactive mode fully scripted:
nordgen generate --token <YOUR_TOKEN> --dns 103.86.96.100 --keepalive 25
| Flag | Description | Default |
|---|---|---|
-t, --token |
NordVPN access token (64-character hex) | prompted |
-d, --dns |
DNS server written into each config | 103.86.96.100 |
-i, --ip |
Use IP address instead of hostname for Endpoint |
hostname |
-k, --keepalive |
PersistentKeepalive value in seconds |
25 |
Retrieve the NordLynx private key
If you only need the raw private key for manual use:
nordgen get-key
Output
Each run creates a timestamped directory in the current working directory:
nordvpn_configs_20260419_143022/
├── configs/
│ └── <country>/<city>/<countrycode><id>.conf
└── best_configs/
└── <country>/<city>/<countrycode><id>.conf
Use any .conf file directly with the WireGuard client on Windows, macOS, Linux, iOS, or Android.
Security
- The access token is read in-memory and discarded at process exit.
- Token input is masked in the terminal.
- The generated
[Interface]block contains your private key treat the output directory as sensitive and store it accordingly.
License
GPL-3.0-or-later. See LICENSE for full text.
Links
- Source: github.com/mustafachyi/NordVPN-WireGuard-Config-Generator
- Issues: Bug Tracker
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nord_config_generator-1.1.2.tar.gz.
File metadata
- Download URL: nord_config_generator-1.1.2.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2e8e68d069667ec9020d76de80583519f465668cdbbd362cd91bcd5cdae1c3f
|
|
| MD5 |
bb321887c85b77560ed2cf761fcc7496
|
|
| BLAKE2b-256 |
6e1e21c47392812e6baa65d19d48cd1a1cd67f1a2465e1104dcd28c2579f9ed6
|
File details
Details for the file nord_config_generator-1.1.2-py3-none-any.whl.
File metadata
- Download URL: nord_config_generator-1.1.2-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69f7392abf1a4472006220dd297800dd4753df8343137f512d88efdb7b3ca0fb
|
|
| MD5 |
9f75479f1936fe23026b0c0e5f8c9f4d
|
|
| BLAKE2b-256 |
8c9248c4aafc1528744ea72c4b9d37084da43c79e23bdcfaff748ded201441cd
|