nats-server.conf 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ##
  2. ## nats-server.conf -- NATS server configuration
  3. ##
  4. debug: false
  5. trace: true
  6. logtime: false
  7. log_file: "@l_prefix@/var/nats-server/log/nats-server.log"
  8. pid_file: "@l_prefix@/var/nats-server/run/nats-server.pid"
  9. # client listening sockets
  10. net: "127.0.0.1"
  11. port: 4242
  12. http_port: 8222
  13. # client communication settings
  14. max_connections: 100
  15. max_control_line: 512
  16. max_payload: 65536
  17. max_pending_size: 10000000
  18. # client communication encryption
  19. tls {
  20. cert_file: "@l_prefix@/etc/x509/example-server.crt.pem"
  21. key_file: "@l_prefix@/etc/x509/example-server.key.pem"
  22. ca_file: "@l_prefix@/etc/x509/example-ca.crt.pem"
  23. timeout: 2.0
  24. verify: false
  25. }
  26. # client authorization
  27. authorization {
  28. users = [ {
  29. user: "example"
  30. password: "example"
  31. } ]
  32. timeout: 1.0
  33. }
  34. # cluster configuration
  35. cluster {
  36. # peer listening socket (incoming)
  37. host: "127.0.0.1"
  38. port: 4244
  39. tls {
  40. cert_file: "@l_prefix@/etc/x509/example-server.crt.pem"
  41. key_file: "@l_prefix@/etc/x509/example-server.key.pem"
  42. ca_file: "@l_prefix@/etc/x509/example-ca.crt.pem"
  43. }
  44. # peer authentication requirements
  45. authorization {
  46. user: "example"
  47. password: "example"
  48. timeout: 1.0
  49. }
  50. # peer connection sockets (outgoing)
  51. #routes = [
  52. # nats-route://example:secret@127.0.0.1:4245
  53. # nats-route://example:secret@127.0.0.1:4246
  54. #]
  55. }