信号
The NATS server has many flags to customize its behavior without having to write a configuration file.
The configuration flags revolve around:
Server Options
Logging
Authorization
TLS Security
Clustering
Information
Server Options
Flag | Description |
---|---|
| Host address to bind to (default: |
| NATS client port (default: 4222). |
| File to store the process ID (PID). |
| HTTP port for monitoring dashboard (exclusive of |
| HTTPS port monitoring for monitoring dashboard (exclusive of |
| Path to NATS server configuration file. |
| Send a signal to nats-server process. See process signaling. |
| Client HostPort to advertise to other servers. |
| Test configuration and exit |
JetStream Options
Flag | Description |
---|---|
| Enable JetStream functionality. |
| Set the storage directory. |
Authentication Options
The following options control straightforward authentication:
Flag | Description |
---|---|
| Required username for connections (exclusive of |
| Required password for connections (exclusive of |
| Required authorization token for connections (exclusive of |
See token authentication, and username/password for more information.
Logging Options
The following flags are available on the server to configure logging:
Flag | Description |
---|---|
| File to redirect log output |
| Specify |
| Log to syslog or windows event log |
| The syslog server address, like |
| Enable debugging output |
| Enable protocol trace log messages |
| Verbose trace (traces system account as well) |
| Enable both debug and protocol trace messages |
| Debug and verbose trace (traces system account as well) |
| Maximum printable length for traced messages. 0 for unlimited |
You can read more about logging configuration here.
TLS Options
Flag | Description |
---|---|
| Enable TLS, do not verify clients |
| Server certificate file |
| Private key for server certificate |
| Enable client TLS certificate verification |
| Client certificate CA for verification |
You can read more about tls configuration here.
Cluster Options
The following flags are available on the server to configure clustering:
Flag | Description |
---|---|
| Comma-separated list of cluster URLs to solicit and connect |
| Cluster URL for clustering requests |
| Do not advertise known cluster information to clients |
| Cluster URL to advertise to other servers |
| For implicit routes, number of connect retries |
You can read more about clustering configuration here.
Common Options
Flag | Description |
---|---|
| Show this message |
| Show version |
| TLS help |
最后更新于