#
and //
foo = 2
foo: 2
foo 2
["a", "b", "c"]
{foo: 2}
$
prefix. They have to be unquoted when being referenced, for example an assigment like foo = "$example"
will result in foo
being the literal string "$example"
.If the environment variable value begins with a number you may have trouble resolving it depending on the server version you are running.
include
directive allows you to split a server configuration into several files. This is useful for separating configuration into chunks that you can easily reuse between different servers.-c
option):Note thatinclude
is not followed by=
or:
, as it is a directive.
host
0.0.0.0
port
4222
listen
<host>:<port>
for client connections. Either use this or the options host
and/or port
.host
, port
client_advertise
<host>:<port>
or just <host>
to advertise to clients and other server. Useful in cluster setups with NAT.host
and port
specify.ping_interval
"2m"
ping_max
2
write_deadline
"10s"
max_connections
64K
max_control_line
4KB
max_payload
max_payload
can be set up to 64MB. The max payload must be equal or smaller to the max_pending
value.1MB
max_pending
64MB
max_subscriptions
0
, unlimitedjetstream {}
map. By default, the JetStream subsystem will store data in the /tmp directory, but you can specify the directory to use via the store_dir
, as well as the limits for JetStream storage (a value of 0 means no limit).store_dir
/tmp/nats/jetstream
max_memory_store
max_file_store
$ nats-server -c js.conf
account
. A client connecting without any form of authentication will be associated with this user, its permissions and account.resolver
, MEMORY
for static or URL(<url>)
to use an external account server. (When the operator JWT contains an account URL, it will be used as default. In this case resolver
is only needed to overwrite the default.)tls
configuration map for tls connections to the resolver. (This is for an outgoing connection and therefore does not use timeout
, verify
and map_and_verify
)<account public nkey>
, value is the <corresponding jwt>
.disable_sublist_cache
true
disable subscription caches for all accounts. This is saves resources in situations where different subjects are used all the time.false
, cache enabledlame_duck_duration
nats-server --signal ldm
."2m"
lame_duck_grace_period
"10s"
server_name
trace
true
enable protocol trace log messages. Excludes the system account.false
, disabledtrace_verbose
true
enable protocol trace log messages. Includes the system account.false
, disableddebug
true
enable debug log messagesfalse
, disabledlogtime
false
, log without timestampstrue
, include timestamplog_file
max_traced_msg_len
0
, unlimitedsyslog
false
, disabledsystem_account
port_file_dir
connect_error_reports
3600
, approx every hourreconnect_error_reports
1
, every failed attempt