Skip to content

Node Configuration Reference

The n2x-node.yml file is used to customize the behavior of the n2x-node agent.

Location of the Configuration File

The file's location varies based on your operating system:

  • Linux: /etc/n2x/n2x-node.yml
  • macOS: /etc/n2x/n2x-node.yml
  • Windows: C:\Windows\Program Files\n2x\n2x-node.yml

Node Configuration File

# n2x-node configuration file

token:

loglevel: INFO
port: 57775
dnsPort: 53535

# n2x remote management
management:
  # specific features can be disabled (optional)
  disableOps: false

# network routes behind this node (optional)
routes:
  export:
    # - 1.2.3.4/32
    # - 192.168.0.0/24
    # - fd37:d11:f54::/64
  import:
    # - any

maintenance:
  autoUpdate: true
  # default schedule: 00:00 (at midnight)
  schedule:
    hour: 2
    minute: 0

Here's a breakdown of the available options in the configuration file:

  • Basic Configuration

    • token (required): Your n2x.io token for authentication.
    • loglevel (optional): Sets the logging verbosity level (default: INFO). Valid options: TRACE, DEBUG, INFO, WARN.
    • port (optional): Specifies the n2x-node agent's listening port (default: 57775).
    • dnsPort (optional): Specifies the DNS server port (default: 53535).
  • Remote Management

    • management.disableOps (optional): Disables workflow execution in the node (default: false).
  • Network Routing

    • routes.export (optional): Defines list of routes to be exported to the n2x.io network.
    • routes.import (optional): Defines list of routes to be imported from the n2x.io network.

      Warning

      Be careful when configuring these parameters. Incorrectly defined routes can lead to unexpected network behavior.

  • Maintenance

    • maintenance.autoUpdate (required): Enables/disable automatic updates (default: true).
    • maintenance.schedule.hour (optional): Specifies the hour for the automatic update (default: 0).
    • maintenance.schedule.minute (optional): Specifies the minute for the automatic update (default: 0).

By carefully configuring these options, you can tailor the n2x-node agent to fit your specific requirements.

Reminder

To apply any changes made to the n2x-node.yml configuration file, a restart of the n2x-node agent is required.