Difference between revisions of "/etc/nats/nats-server.conf"

From wikieduonline
Jump to navigation Jump to search
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
 +
* https://docs.nats.io/running-a-nats-service/configuration
  
 +
<code>[[max_connections]]</code>
  
 +
== Default nats:alpine ==
 +
<pre>
 +
# Client port of 4222 on all interfaces
 +
port: 4222
  
 +
# HTTP monitoring port
 +
monitor_port: 8222
 +
 +
# This is for clustering multiple servers together.
 +
cluster {
 +
  # It is recommended to set a cluster name
 +
  name: "my_cluster"
 +
 +
  # Route connections to be received on any interface on port 6222
 +
  port: 6222
 +
 +
  # Routes are protected, so need to use them with --routes flag
 +
  # e.g. --routes=nats-route://ruser:T0pS3cr3t@otherdockerhost:6222
 +
  authorization {
 +
    user: ruser
 +
    password: T0pS3cr3t
 +
    timeout: 2
 +
  }
 +
 +
  # Routes are actively solicited and connected to from this server.
 +
  # This Docker image has none by default, but you can pass a
 +
  # flag to the nats-server docker image to create one to an existing server.
 +
  routes = []
 +
}
 +
</pre>
 +
 +
 +
== Websocket ==
 +
 +
[[websocket]]
 +
{
 +
      port: 8080
 +
      [[no_tls]]: true
 +
}
 +
 +
== Related ==
 
  2023/02/27 15:01:21.572654 [INF] Using configuration file: [[nats-server.conf]]
 
  2023/02/27 15:01:21.572654 [INF] Using configuration file: [[nats-server.conf]]
 +
[[too many open files]]
 +
[[wss]]
 +
* [[NATS ports]]
 +
* <code>[[debug: true]]</code>
 +
* <code>[[trace_verbose: true]]</code>
  
 
== See also ==
 
== See also ==
 
* {{nats-server}}
 
* {{nats-server}}
 +
* {{NATS}}
  
 
[[Category:NATS]]
 
[[Category:NATS]]

Latest revision as of 13:28, 17 May 2023

max_connections

Default nats:alpine[edit]

# Client port of 4222 on all interfaces
port: 4222

# HTTP monitoring port
monitor_port: 8222

# This is for clustering multiple servers together.
cluster {
  # It is recommended to set a cluster name
  name: "my_cluster"

  # Route connections to be received on any interface on port 6222
  port: 6222

  # Routes are protected, so need to use them with --routes flag
  # e.g. --routes=nats-route://ruser:T0pS3cr3t@otherdockerhost:6222
  authorization {
    user: ruser
    password: T0pS3cr3t
    timeout: 2
  }

  # Routes are actively solicited and connected to from this server.
  # This Docker image has none by default, but you can pass a
  # flag to the nats-server docker image to create one to an existing server.
  routes = []
}


Websocket[edit]

websocket 
{
     port: 8080
     no_tls: true
}

Related[edit]

2023/02/27 15:01:21.572654 [INF] Using configuration file: nats-server.conf
too many open files
wss

See also[edit]

Advertising: