1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00
ctrl/doc/nats-server-configuration
2021-04-15 07:52:42 +02:00
..
README.md updated readme 2021-04-15 07:52:42 +02:00

Nats-Server configuration

Leafnode config

Nats-server version need to be greater than v2+ for leafnode functionality.

Leafnode config options

https://docs.nats.io/nats-server/configuration/leafnodes/leafnode_conf

https://docs.nats.io/nats-server/configuration/leafnodes

Central server node config

leafnodes {
    port: 7422

    tls {
        cert_file: "</some/location/mysite.com>.crt"
        key_file: "</some/location/mysite.com>.crt.key"
    }

    authorization {
        user: leaf
        password: secret
    }
}

Spoke leaf node config

On the spokes we set the listen port to 4111 instead of the default 4222.

port: 4111
leafnodes {
  remotes: [
    {
      urls: [
        tls://leaf:secret@<mysite.com>:7422
      ]
    }
  ]
}