You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+75-28Lines changed: 75 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,61 +33,108 @@ When Newt receives WireGuard control messages, it will use the information encod
33
33
34
34
## CLI Args
35
35
36
+
### Core Configuration
37
+
36
38
-`id`: Newt ID generated by Pangolin to identify the client.
37
39
-`secret`: A unique secret (not shared and kept private) used to authenticate the client ID with the websocket in order to receive commands.
38
40
-`endpoint`: The endpoint where both Gerbil and Pangolin reside in order to connect to the websocket.
39
-
40
-
-`mtu` (optional): MTU for the internal WG interface. Default: 1280
41
-
-`dns` (optional): DNS server to use to resolve the endpoint. Default: 9.9.9.9
41
+
-`blueprint-file` (optional): Path to blueprint file to define Pangolin resources and configurations.
42
+
-`no-cloud` (optional): Don't fail over to the cloud when using managed nodes in Pangolin Cloud. Default: false
42
43
-`log-level` (optional): The log level to use (DEBUG, INFO, WARN, ERROR, FATAL). Default: INFO
43
-
-`enforce-hc-cert` (optional): Enforce certificate validation for health checks. Default: false (accepts any cert)
44
+
45
+
### Docker Integration
46
+
44
47
-`docker-socket` (optional): Set the Docker socket to use the container discovery integration
45
-
-`ping-interval` (optional): Interval for pinging the server. Default: 3s
46
-
-`ping-timeout` (optional): Timeout for each ping. Default: 5s
47
-
-`updown` (optional): A script to be called when targets are added or removed.
48
-
-`tls-client-cert` (optional): Client certificate (p12 or pfx) for mTLS. See [mTLS](#mtls)
49
-
-`tls-client-cert` (optional): Path to client certificate (PEM format, optional if using PKCS12). See [mTLS](#mtls)
50
-
-`tls-client-key` (optional): Path to private key for mTLS (PEM format, optional if using PKCS12)
51
-
-`tls-ca-cert` (optional): Path to CA certificate to verify server (PEM format, optional if using PKCS12)
52
48
-`docker-enforce-network-validation` (optional): Validate the container target is on the same network as the newt process. Default: false
53
-
-`health-file` (optional): Check if connection to WG server (pangolin) is ok. creates a file if ok, removes it if not ok. Can be used with docker healtcheck to restart newt
49
+
50
+
### Accpet Client Connection
51
+
54
52
-`accept-clients` (optional): Enable WireGuard server mode to accept incoming newt client connections. Default: false
55
53
-`generateAndSaveKeyTo` (optional): Path to save generated private key
56
54
-`native` (optional): Use native WireGuard interface when accepting clients (requires WireGuard kernel module and Linux, must run as root). Default: false (uses userspace netstack)
57
55
-`interface` (optional): Name of the WireGuard interface. Default: newt
58
56
-`keep-interface` (optional): Keep the WireGuard interface. Default: false
59
-
-`blueprint-file` (optional): Path to blueprint file to define Pangolin resources and configurations.
60
-
-`no-cloud` (optional): Don't fail over to the cloud when using managed nodes in Pangolin Cloud. Default: false
-`region` (optional): Optional region resource attribute for telemetry and metrics.
65
+
66
+
### Network Configuration
67
+
68
+
-`mtu` (optional): MTU for the internal WG interface. Default: 1280
69
+
-`dns` (optional): DNS server to use to resolve the endpoint. Default: 9.9.9.9
70
+
-`ping-interval` (optional): Interval for pinging the server. Default: 3s
71
+
-`ping-timeout` (optional): Timeout for each ping. Default: 5s
72
+
73
+
### Security & TLS
74
+
75
+
-`enforce-hc-cert` (optional): Enforce certificate validation for health checks. Default: false (accepts any cert)
76
+
-`tls-client-cert` (optional): Client certificate (p12 or pfx) for mTLS or path to client certificate (PEM format). See [mTLS](#mtls)
77
+
-`tls-client-key` (optional): Path to private key for mTLS (PEM format, optional if using PKCS12)
78
+
-`tls-ca-cert` (optional): Path to CA certificate to verify server (PEM format, optional if using PKCS12)
79
+
80
+
### Monitoring & Health
81
+
82
+
-`health-file` (optional): Check if connection to WG server (pangolin) is ok. creates a file if ok, removes it if not ok. Can be used with docker healtcheck to restart newt
83
+
-`updown` (optional): A script to be called when targets are added or removed.
61
84
62
85
## Environment Variables
63
86
64
87
All CLI arguments can be set using environment variables as an alternative to command line flags. Environment variables are particularly useful when running Newt in containerized environments.
65
88
89
+
### Core Configuration
90
+
66
91
-`PANGOLIN_ENDPOINT`: Endpoint of your pangolin server (equivalent to `--endpoint`)
67
92
-`NEWT_ID`: Newt ID generated by Pangolin (equivalent to `--id`)
68
93
-`NEWT_SECRET`: Newt secret for authentication (equivalent to `--secret`)
69
-
-`MTU`: MTU for the internal WG interface. Default: 1280 (equivalent to `--mtu`)
70
-
-`DNS`: DNS server to use to resolve the endpoint. Default: 9.9.9.9 (equivalent to `--dns`)
94
+
-`CONFIG_FILE`: Load the config json from this file instead of in the home folder.
95
+
-`BLUEPRINT_FILE`: Path to blueprint file to define Pangolin resources and configurations. (equivalent to `--blueprint-file`)
96
+
-`NO_CLOUD`: Don't fail over to the cloud when using managed nodes in Pangolin Cloud. Default: false (equivalent to `--no-cloud`)
71
97
-`LOG_LEVEL`: Log level (DEBUG, INFO, WARN, ERROR, FATAL). Default: INFO (equivalent to `--log-level`)
98
+
99
+
### Docker Integration
100
+
72
101
-`DOCKER_SOCKET`: Path to Docker socket for container discovery (equivalent to `--docker-socket`)
73
-
-`PING_INTERVAL`: Interval for pinging the server. Default: 3s (equivalent to `--ping-interval`)
74
-
-`PING_TIMEOUT`: Timeout for each ping. Default: 5s (equivalent to `--ping-timeout`)
75
-
-`UPDOWN_SCRIPT`: Path to updown script for target add/remove events (equivalent to `--updown`)
76
-
-`TLS_CLIENT_CERT`: Path to client certificate for mTLS (equivalent to `--tls-client-cert`)
77
-
-`TLS_CLIENT_CERT`: Path to client certificate for mTLS (equivalent to `--tls-client-cert`)
78
-
-`TLS_CLIENT_KEY`: Path to private key for mTLS (equivalent to `--tls-client-key`)
79
-
-`TLS_CA_CERT`: Path to CA certificate to verify server (equivalent to `--tls-ca-cert`)
80
102
-`DOCKER_ENFORCE_NETWORK_VALIDATION`: Validate container targets are on same network. Default: false (equivalent to `--docker-enforce-network-validation`)
81
-
-`ENFORCE_HC_CERT`: Enforce certificate validation for health checks. Default: false (equivalent to `--enforce-hc-cert`)
82
-
-`HEALTH_FILE`: Path to health file for connection monitoring (equivalent to `--health-file`)
103
+
104
+
### Accept Client Connections
105
+
83
106
-`ACCEPT_CLIENTS`: Enable WireGuard server mode. Default: false (equivalent to `--accept-clients`)
84
107
-`GENERATE_AND_SAVE_KEY_TO`: Path to save generated private key (equivalent to `--generateAndSaveKeyTo`)
85
108
-`USE_NATIVE_INTERFACE`: Use native WireGuard interface (Linux only). Default: false (equivalent to `--native`)
86
109
-`INTERFACE`: Name of the WireGuard interface. Default: newt (equivalent to `--interface`)
87
110
-`KEEP_INTERFACE`: Keep the WireGuard interface after shutdown. Default: false (equivalent to `--keep-interface`)
88
-
-`CONFIG_FILE`: Load the config json from this file instead of in the home folder.
89
-
-`BLUEPRINT_FILE`: Path to blueprint file to define Pangolin resources and configurations. (equivalent to `--blueprint-file`)
90
-
-`NO_CLOUD`: Don't fail over to the cloud when using managed nodes in Pangolin Cloud. Default: false (equivalent to `--no-cloud`)
111
+
112
+
### Monitoring & Health
113
+
114
+
-`HEALTH_FILE`: Path to health file for connection monitoring (equivalent to `--health-file`)
115
+
-`UPDOWN_SCRIPT`: Path to updown script for target add/remove events (equivalent to `--updown`)
116
+
117
+
### Metrics & Observability
118
+
119
+
-`NEWT_METRICS_PROMETHEUS_ENABLED`: Enable Prometheus /metrics exporter. Default: true (equivalent to `--metrics`)
120
+
-`NEWT_METRICS_OTLP_ENABLED`: Enable OTLP exporters (metrics/traces) to OTEL_EXPORTER_OTLP_ENDPOINT. Default: false (equivalent to `--otlp`)
121
+
-`NEWT_ADMIN_ADDR`: Admin/metrics bind address. Default: 127.0.0.1:2112 (equivalent to `--metrics-admin-addr`)
122
+
-`NEWT_METRICS_ASYNC_BYTES`: Enable async bytes counting (background flush; lower hot path overhead). Default: false (equivalent to `--metrics-async-bytes`)
123
+
-`NEWT_REGION`: Optional region resource attribute for telemetry and metrics (equivalent to `--region`)
124
+
125
+
### Network Configuration
126
+
127
+
-`MTU`: MTU for the internal WG interface. Default: 1280 (equivalent to `--mtu`)
128
+
-`DNS`: DNS server to use to resolve the endpoint. Default: 9.9.9.9 (equivalent to `--dns`)
129
+
-`PING_INTERVAL`: Interval for pinging the server. Default: 3s (equivalent to `--ping-interval`)
130
+
-`PING_TIMEOUT`: Timeout for each ping. Default: 5s (equivalent to `--ping-timeout`)
131
+
132
+
### Security & TLS
133
+
134
+
-`ENFORCE_HC_CERT`: Enforce certificate validation for health checks. Default: false (equivalent to `--enforce-hc-cert`)
135
+
-`TLS_CLIENT_CERT`: Path to client certificate for mTLS (equivalent to `--tls-client-cert`)
136
+
-`TLS_CLIENT_KEY`: Path to private key for mTLS (equivalent to `--tls-client-key`)
137
+
-`TLS_CA_CERT`: Path to CA certificate to verify server (equivalent to `--tls-ca-cert`)
0 commit comments