nats-server - Man Page

manual page for nats-server 2.1.9


nats-server [options]


Server Options

-a,  --addr <host>

Bind to host address (default:

-p,  --port <port>

Use port for clients (default: 4222)

-P,  --pid <file>

File to store PID

-m,  --http_port <port>

Use port for http monitoring

-ms,--https_port <port>

Use port for https monitoring

-c,  --config <file>

Configuration file

-sl,--signal <signal>[=<pid>]

Send signal to nats-server process (stop, quit, reopen, reload) <pid> can be either a PID (e.g. 1) or the path to a PID file (e.g. /var/run/

--client_advertise <string>

Client URL to advertise to other servers


Test configuration and exit

Logging Options

-l,  --log <file>

File to redirect log output

-T,  --logtime

Timestamp log entries (default: true)

-s,  --syslog

Log to syslog or windows event log

-r,  --remote_syslog <addr>

Syslog server addr (udp://localhost:514)

-D,  --debug

Enable debugging output

-V,  --trace

Trace the raw protocol


Verbose trace (traces system account as well)


Debug and trace


Debug and verbose trace (traces system account as well)

Authorization Options

--user <user>

User required for connections

--pass <password>

Password required for connections

--auth <token>

Authorization token required for connections

TLS Options


Enable TLS, do not verify clients (default: false)

--tlscert <file>

Server certificate file

--tlskey <file>

Private key for server certificate


Enable TLS, verify client certificates

--tlscacert <file>

Client certificate CA for verification

Cluster Options

--routes <rurl-1, rurl-2>

Routes to solicit and connect

--cluster <cluster-url>

Cluster URL for solicited routes

--no_advertise <bool>

Advertise known cluster IPs to clients

--cluster_advertise <string> Cluster URL to advertise to other servers

--connect_retries <number>

For implicit routes, number of connect retries

Common Options

-h,  --help

Show this message

-v,  --version

Show version


TLS help


July 2021 nats-server 2.1.9