A command line tool that generates optimized NordVPN WireGuard configurations. It communicates directly with NordVPN infrastructure to exchange access tokens for NordLynx private keys, fetches the live server catalogue, and ranks endpoints by current load and geographic distance from your detected location.
- Intelligent Server Selection: Ranks endpoints by live load and Haversine distance from your detected location to maximize throughput and minimize latency.
- Automated Credential Exchange: Converts a standard NordVPN access token into a NordLynx private key without manual intervention.
- Structured Output: Produces a clean directory hierarchy containing the full server catalogue alongside a curated
best_configssubset for immediate deployment. - Dual Operation Modes: Accepts interactive prompts for manual use and explicit flags for scripted pipelines.
- Runtime Tailored Builds: Ships as a Python package for native installation and as a Go compiled Docker image for a minimal container footprint.
Because this is a command line application, pipx is the recommended installer. It isolates the tool inside its own environment and exposes the executable on your PATH without touching the system Python.
pipx install nord-config-generatorPlain pip is fully supported for environments where pipx is unavailable.
pip install nord-config-generatorFor a dependency free environment, the application can be run via Docker. The container ships a Go compiled binary, which keeps the image small and startup near instant. To prevent filesystem permission conflicts and ensure generated configurations are owned by the host user, the output directory must be created manually before execution.
-
Initialize the output directory:
mkdir -p generated_configs
-
Create a
docker-compose.ymlfile:services: nordgen: image: mustafachyi/nordgen:latest stdin_open: true tty: true user: "${UID:-1000}:${GID:-1000}" volumes: - ./generated_configs:/data
-
Run the container:
docker-compose run --rm nordgen
Linux / macOS:
mkdir -p generated_configs && docker run -it --rm -u $(id -u):$(id -g) -v "$(pwd)/generated_configs:/data" mustafachyi/nordgen:latestWindows (PowerShell):
if (!(Test-Path "generated_configs")) { mkdir generated_configs }; docker run -it --rm -v "${PWD}/generated_configs:/data" mustafachyi/nordgen:latestWindows (Command Prompt):
if not exist "generated_configs" mkdir "generated_configs" && docker run -it --rm -v "%cd%/generated_configs:/data" mustafachyi/nordgen:latestThe command line interface is unified across both distributions. It accepts interactive prompts for manual configuration and explicit flags for scripted pipelines.
- Generation: Run
nordgento fetch the catalogue and write configurations to the current directory. - Key Extraction: Run
nordgen get-keyto retrieve only the NordLynx private key without writing configuration files.
For granular details on available flags, overrides, and parameters, invoke the built in help:
nordgen --helpA browser based version of the generator is available for immediate use without local installation.
- Live Application: https://nordgen.selfhoster.win/
If this project saves you time, there are a few ways to give something back.
- Star the repository on GitHub so it reaches more people who need it.
- Sign up through the referral link if you are new to NordVPN: https://ref.nordvpn.com/MXIVDoJGpKT
- Buy me a coffee on Ko-fi if you want to fuel future updates: https://ko-fi.com/mustafachyi
Distributed under the GNU General Public License v3.0. See LICENSE for details.