mustafachyi/nordgen

By mustafachyi

Updated about 2 months ago

CLI for generating optimized NordVPN WireGuard configurations

Image
Networking
1

4.9K

mustafachyi/nordgen repository overview

Nordgen

A high-performance CLI tool for generating optimized NordVPN WireGuard configurations. It automates credential exchange, minimizes latency through load-aware server selection, and outputs organized configuration files for immediate use.

This Dockerized Go implementation provides 1:1 functional parity with the Python version, optimized for minimal image size and zero-dependency container execution.

Quick Start

The following commands handle directory setup, permission mapping, and container execution in a single line.

Linux / macOS

Interactive Mode

mkdir -p generated_configs && docker run -it --rm -v "$(pwd)/generated_configs:/data" -u $(id -u):$(id -g) mustafachyi/nordgen

Automated Mode

mkdir -p generated_configs && docker run --rm -v "$(pwd)/generated_configs:/data" -u $(id -u):$(id -g) mustafachyi/nordgen --token "YOUR_TOKEN" --dns 1.1.1.1 --keepalive 15 --group standard p2p --exclude-dedicated

Get Private Key Only

docker run --rm mustafachyi/nordgen get-key --token "YOUR_TOKEN"
Windows (PowerShell)

Interactive Mode

if (!(Test-Path generated_configs)) { mkdir generated_configs }; docker run -it --rm -v "${PWD}/generated_configs:/data" mustafachyi/nordgen

Configuration Reference

Flags are appended directly to the container command.

FlagDescriptionDefault
-t, --tokenNordVPN Access Token (Required for automated mode)Prompted
-d, --dnsDNS Server IP103.86.96.100
-i, --ipResolve endpoints to explicit IPsfalse
-k, --keepalivePersistent Keepalive (seconds)25
-g, --groupServer groups to include (standard, p2p, dedicated, onion, double)All groups
-e, --exclude-dedicatedExclude servers in the dedicated IP groupfalse

Note on Dedicated IP Servers:
Connecting to servers within the dedicated group requires an active Dedicated IP add-on purchased in addition to your standard NordVPN subscription. If your account does not include this add-on, configurations generated for dedicated servers will successfully generate but will fail to connect. If you do not own this add-on, it is highly recommended to use the -e (--exclude-dedicated) flag to omit them from your output.

Output

Configurations are generated in the mounted volume under a timestamped directory (e.g., generated_configs/nordvpn_configs_20260206_202229/). The configurations are categorized by the server's group combination, country, and city:

nordvpn_configs_20260206_202229/
├── configs/
│   └── <group_combo>/<country>/<city>/<server_name>.conf
└── best_configs/
    └── <group_combo>/<country>/<city>/<server_name>.conf
  • best_configs/: Optimally selected servers based on load and distance.
  • configs/: Full server inventory.

Tag summary

Content type

Image

Digest

sha256:a53125d50

Size

6.6 MB

Last updated

about 2 months ago

docker pull mustafachyi/nordgen