Flags
Almost every setting below can also be set via an environment variable (Env var) or in the config file (Config file key) instead of as a CLI flag. Values are resolved with priority
CLI flag > environment variable > config file > default, so a flag always overrides an env var, which always overrides what’s saved on disk. This makes environment variables and config files particularly useful for containerized environments where CLI flags are less convenient.string
required
Newt ID generated by Pangolin to identify the client.Example:
31frd0uzbjvp721Env var: NEWT_IDConfig file key: idstring
required
A unique secret used to authenticate the client ID with the websocket.Example:
h51mmlknrvrwv8s4r1i210azhumt6isgbpyavxodibx1k2d6Env var: NEWT_SECRETConfig file key: secretstring
required
The endpoint where the Pangolin server resides for websocket connections.Example:
https://pangolin.example.comEnv var: PANGOLIN_ENDPOINTConfig file key: endpointstring
Site name to use when provisioning with a provisioning key. Supports
{{env.VARIABLE_NAME}} templating from the process environment. If omitted, Pangolin assigns a random animal-based name (changeable in the dashboard).Example: my-edge-site or '{{env.SERIAL_NUMBER}}-edge'Env var: NEWT_NAMEConfig file key: namestring
Path to a blueprint YAML file applied once at provisioning (imperative bootstrap). Unlike
--blueprint-file, Newt does not keep reapplying it, so resources you edit in the dashboard are not overwritten on later runs. See Site provisioning keys.Example: /path/to/bootstrap.yamlEnv var: PROVISIONING_BLUEPRINT_FILEConfig file key: provisioningBlueprintFilestring
Provisioning key from Pangolin (alternative to a
provisioningKey field inside the config file). Newt exchanges it once for site credentials, then persists id and secret to the config file and ignores the key on later runs. This flag is not written into the config file. See Site provisioning keys.Example: spk_...Env var: NEWT_PROVISIONING_KEYConfig file key: provisioningKeystring
Path to a JSON file where Newt reads and persists settings (
endpoint, id, secret, optional provisioningKey, and virtually every other flag below). When you use site provisioning, Newt writes id and secret into this file after a successful exchange. See Config File for the default path on each platform.Example: /var/newt.jsonEnv var: CONFIG_FILEinteger
Port for the peers to connect to Newt on. This can be used to keep a static port open in firewalls instead of default random ports.Example:
34534Env var: PORTConfig file key: portboolean
Use a native WireGuard interface for client tunnels instead of the userspace netstack implementation.Default:
falseEnv var: USE_NATIVE_INTERFACEConfig file key: nativeboolean
Use a native WireGuard interface for the main tunnel (instead of netstack).Default:
falseEnv var: USE_NATIVE_MAIN_INTERFACEConfig file key: nativeMainstring
Name of the native main tunnel WireGuard interface (used with
--native-main).Default: newtEnv var: INTERFACE_MAINConfig file key: interfaceMaininteger
MTU for the internal WireGuard interface.Default:
1280Env var: MTUConfig file key: mtustring
DNS server to use for resolving the endpoint.Default:
9.9.9.9Env var: DNSConfig file key: dnsstring
The log level to use for Newt output.Options:
DEBUG, INFO, WARN, ERROR, FATALDefault: INFOEnv var: LOG_LEVELConfig file key: logLevelstring
Interval for pinging the server.Default:
15sEnv var: PING_INTERVALConfig file key: pingIntervalstring
Timeout for each ping.Default:
7sEnv var: PING_TIMEOUTConfig file key: pingTimeoutstring
Idle timeout for UDP proxied client flows before cleanup.Default:
90sEnv var: NEWT_UDP_PROXY_IDLE_TIMEOUTConfig file key: udpProxyIdleTimeoutstring
Set the Docker socket path for container discovery integration.Example:
/var/run/docker.sockEnv var: DOCKER_SOCKETConfig file key: dockerSocketboolean
Validate the container target is on the same network as the Newt process.Default:
falseEnv var: DOCKER_ENFORCE_NETWORK_VALIDATIONConfig file key: dockerEnforceNetworkValidationstring
Check if connection to WireGuard server (Pangolin) is ok. Creates a file if ok, removes it if not ok. Can be used with Docker healthcheck to restart Newt.Example:
/tmp/healthyEnv var: HEALTH_FILEConfig file key: healthFilestring
Script to be called when targets are added or removed.Example:
/path/to/updown.shEnv var: UPDOWN_SCRIPTConfig file key: updownScriptstring
Path to a blueprint file that defines Pangolin resources and settings. This mode is declarative: Newt keeps applying the file, and it remains the source of truth (dashboard changes can be overwritten on the next apply). For a one-time bootstrap blueprint with provisioning keys, use
--provisioning-blueprint-file instead.Example: /path/to/blueprint.yamlEnv var: BLUEPRINT_FILEConfig file key: blueprintFileboolean
Don’t fail over to the cloud when using managed nodes in Pangolin Cloud.Default:
falseEnv var: NO_CLOUDConfig file key: noCloudboolean
Disable clients on the WireGuard interface.Default:
false (clients enabled)Env var: DISABLE_CLIENTSConfig file key: disableClientsboolean
Disable SSH auth daemon and native SSH mode (remote auth daemon integrations still work).Default:
falseEnv var: DISABLE_SSHConfig file key: disableSshstring
Name of the WireGuard interface.Default:
newtEnv var: INTERFACEConfig file key: interfaceboolean
Enable Prometheus /metrics exporter.Default:
falseEnv var: NEWT_METRICS_PROMETHEUS_ENABLEDConfig file key: metricsboolean
Enable OTLP exporters (metrics/traces) to OTEL_EXPORTER_OTLP_ENDPOINT.Default:
falseEnv var: NEWT_METRICS_OTLP_ENABLEDConfig file key: otlpstring
Admin/metrics bind address.Default:
127.0.0.1:2112Env var: NEWT_ADMIN_ADDRConfig file key: metricsAdminAddrboolean
Enable async bytes counting (background flush; lower hot path overhead).Default:
falseEnv var: NEWT_METRICS_ASYNC_BYTESConfig file key: metricsAsyncBytesboolean
Enable pprof debug endpoints on the admin server.Default:
falseEnv var: NEWT_PPROF_ENABLEDConfig file key: pprofstring
Optional region resource attribute for telemetry and metrics.Example:
us-west-2Env var: NEWT_REGIONConfig file key: regionboolean
Enforce certificate validation for health checks.Default:
false (accepts any cert)Env var: ENFORCE_HC_CERTConfig file key: enforceHcCertstring
Path to client certificate file (PEM/DER format) for mTLS.Example:
/path/to/client.crtEnv var: TLS_CLIENT_CERTConfig file key: tlsClientCertFilestring
Path to client private key file (PEM/DER format) for mTLS.Example:
/path/to/client.keyEnv var: TLS_CLIENT_KEYConfig file key: tlsClientKeystring
Path to CA certificate file for validating remote certificates (can be specified multiple times).Example:
/path/to/ca.crtEnv var: TLS_CLIENT_CAS (comma-separated list)Config file key: tlsClientCa (array of strings in the config file)string
Path to client certificate (PKCS12 format) - DEPRECATED: use
--tls-client-cert-file and --tls-client-key instead.Example: /path/to/client.p12Env var: TLS_CLIENT_CERT_PKCS12Config file key: tlsClientCertPre-shared key for auth daemon authentication.Env var:
AD_KEYConfig file key: adPreSharedKeystring
Path to the principals file for auth daemon.Default:
/var/run/auth-daemon/principalsEnv var: AD_PRINCIPALS_FILEConfig file key: adPrincipalsFilestring
Path to the CA certificate file for auth daemon.Default:
/etc/ssh/ca.pemEnv var: AD_CA_CERT_PATHConfig file key: adCaCertPathboolean
Generate a random password for authenticated users.Default:
falseEnv var: AD_GENERATE_RANDOM_PASSWORDConfig file key: adGenerateRandomPasswordboolean
Print the Newt version and exit.
boolean
Print the fully resolved configuration (including which source — default, config file, environment, or CLI — each value came from) and exit. Secrets are masked. Useful for confirming what a config file actually loaded.Default:
falsestring
Prefer this endpoint for the connection (if set, will override the endpoint from the server).Example:
https://preferred.endpoint.comConfig file key: preferEndpointConfig File
Newt can be configured entirely with a JSON config file instead of (or in addition to) CLI flags and environment variables. Almost every flag documented above has a matching camelCase key in this file — see the Config file key on each flag for its exact name. You can use--config-file or the CONFIG_FILE environment variable to point Newt at a specific path. Newt also writes to this file: when site provisioning succeeds, the resolved id and secret are persisted here so you don’t need to pass --id/--secret (or a provisioning key) on every subsequent run.
Default locations
If--config-file/CONFIG_FILE isn’t set, Newt reads and writes the config file at a platform-specific default path:
Example
You only need to include the keys you want to set — anything omitted falls back to an environment variable, then its built-in default. Run
newt --show-config to see every resolved setting alongside where it came from (config file, environment, CLI, or default), which is useful for confirming what a config file actually loaded.Docker Socket Integration
Newt can integrate with the Docker socket to provide remote inspection of Docker containers. This allows Pangolin to query and retrieve detailed information about containers running on the Newt client, including metadata, network configuration, port mappings, and more. Configuration: You can specify the Docker socket path using the--docker-socket CLI argument or by setting the DOCKER_SOCKET environment variable. If the Docker socket is not available or accessible, Newt will gracefully disable Docker integration and continue normal operation.
Supported values include:
-
Local UNIX socket (default):
You must mount the socket file into the container using a volume, so Newt can access it.
unix:///var/run/docker.sock -
TCP socket (e.g., via Docker Socket Proxy):
tcp://localhost:2375 -
HTTP/HTTPS endpoints (e.g., remote Docker APIs):
http://your-host:2375 -
SSH connections (experimental, requires SSH setup):
ssh://user@host
If the Docker socket is not available or accessible, Newt will gracefully disable Docker integration and continue normal operation.
- Running in Network Mode ‘host’: IP addresses will be used
- Running in Network Mode ‘bridge’: IP addresses will be used
- Running in docker-compose without a network specification: Docker compose creates a network for the compose by default, hostnames will be used
- Running on docker-compose with defined network: Hostnames will be used
false by default. It can be enabled via setting the --docker-enforce-network-validation CLI argument or by setting the DOCKER_ENFORCE_NETWORK_VALIDATION environment variable.
Updown Scripts
You can pass in an updown script for Newt to call when it is adding or removing a target:Returning a string from the script in the format of a target (
ip:dst so 10.0.0.1:8080) will override the target and use this value instead to proxy.You can look at
updown.py as a reference script to get started!mTLS Authentication
Newt supports mutual TLS (mTLS) authentication if the server is configured to request a client certificate. You can use either a PKCS12 (.p12/.pfx) file or split PEM files for the client cert, private key, and CA.Option 1: PKCS12 (Legacy)
This is the original method and still supported.
- File must contain:
- Client private key
- Public certificate
- CA certificate
- Encrypted
.p12files are not supported
Option 2: Split PEM Files (Preferred)
You can now provide separate files for:--tls-client-cert-file: client certificate (.crtor.pem)--tls-client-key: client private key (.keyor.pem)--tls-client-ca: CA cert to verify the server (can be specified multiple times)

