Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Edit Configuration: Update the /etc/nats-server.conf file with the following settings:

    Code Block
    languagejson
    server_name: "opha-dev1.opmantek.net"  #The local server  
    http_port: 8222 
    listen: 4222 
    jetstream: enabled 
    accounts { 
      $SYS { 
        users = [ 
          { user: "admin",
            pass: "password" 
          } 
        ] 
      } 
      ophad: { 
        users: [ 
            { user: "omkadmin", password: "op42opha42" } 
        ] 
        jetstream: enabled 
      } 
    } 
    
    jetstream { 
      store_dir: "/opt/nats/storage" 
      max_memory_store: 1028M 
      max_file_store: 1028M 
    } 
    cluster { 
      name: "C1" 
      host: "opha-dev1.opmantek.net"  #The current host 
      # the current server 
      listen: "0.0.0.0:6222" 
      routes: [ 
        # secondary primary
        "nats://opha-dev6.opmantek.net:6222", 
        # server with the arbiter 
        "nats://opha-dev2.opmantek.net:6222" 
        # other servers 
      ] 
    }

...