Configuration File

Nomatron is in early access. Some advanced workflows may not be covered in the public docs.

The Network Agent configuration file defines how the agent identifies itself, how it connects back to Nomatron, and how it reaches the private Nomad clusters assigned to it.

In practice, this file is where most of the Nomad-cluster-specific connectivity details live.

That usually includes:

  • the path to the network agent token file;
  • Nomatron control-plane endpoints;
  • cluster IDs;
  • private Nomad API addresses;
  • Nomad ACL tokens; and
  • any TLS material needed to reach the Nomad API or validate the control plane.

How Configuration Is Loaded

The Network Agent reads configuration from an HCL file (JSON also works), conventionally /etc/nomatron/agent.hcl. The file name must end in .hcl or .json. The v0.1.7 --config help text says “YAML config”, but YAML is not supported.

The main entry points are:

  • --config
  • NOMATRON_AGENT_CONFIG

The process also supports flag and environment overrides for a small set of top-level values such as:

  • server address
  • agent ID
  • agent token
  • heartbeat interval
  • log level
  • log format
  • HTTP base URL

In general, the cleanest production pattern is:

  • keep the main agent configuration in the config file; and
  • use environment variables or flags only for carefully chosen overrides.

Example Configuration File

hcl
server_addrs = ["nomatron.example.com:4650"]
http_base_urls = ["https://nomatron.example.com"]

agent_id         = "00000000-0000-0000-0000-000000000000"
agent_token_file = "/etc/nomatron/agent-token"

heartbeat_interval = "15s"

log_level  = "info"
log_format = "text"

capabilities = [
  "nomad_proxy",
  "job_events"
]

control_plane_tls_enabled = true
control_plane_tls_ca_file = "/etc/nomatron/control-plane-ca.pem"

cluster {
  cluster_id = "0cae24d4-d12d-4b7b-9ef2-db4ac0baeffd"
  address    = "https://nomad.service.consul:4646"
  acl_token  = "<NOMAD_ACL_TOKEN>" # render this file from your secret store; see below

  tls_enabled = true
  ca_cert     = "/etc/nomatron/nomad-ca.pem"
  client_cert = "/etc/nomatron/nomad-client.pem"
  client_key  = "/etc/nomatron/nomad-client-key.pem"
  skip_verify = false
}

This example shows the normal production shape:

  • one or more Nomatron control-plane endpoints;
  • a network agent ID and token;
  • one cluster block per private Nomad cluster;
  • TLS enabled toward the control plane; and
  • TLS enabled toward the Nomad API where required.

Configuration Structure

The file has two layers:

  1. top-level agent and control-plane settings
  2. one or more cluster blocks

The top-level settings tell the agent who it is and how it connects to Nomatron.

The cluster blocks tell the agent how to reach each private Nomad API on Nomatron’s behalf.

Top-Level Fields

server_addrs

List of Nomatron gRPC control-plane endpoints the agent should try to connect to.

Example:

hcl
server_addrs = [
  "nomatron-1.example.com:4650",
  "nomatron-2.example.com:4650",
  "nomatron-3.example.com:4650"
]
FieldRequiredDefaultNotes
server_addrsNo, if server_addr is used["127.0.0.1:4650"] when neither form is providedPreferred modern form. Use this for one or more gRPC endpoints.

server_addr

Legacy single-address form for the Nomatron gRPC endpoint.

FieldRequiredDefaultNotes
server_addrNo, if server_addrs is usednone directly, but the runtime falls back to 127.0.0.1:4650 when neither form is providedSupported for single-endpoint setups, but server_addrs is the better long-term shape.

http_base_urls

List of Nomatron HTTP base URLs used by the agent for supporting control-plane HTTP calls.

Example:

hcl
http_base_urls = [
  "https://nomatron-1.example.com",
  "https://nomatron-2.example.com",
  "https://nomatron-3.example.com"
]
FieldRequiredDefaultNotes
http_base_urlsNo, if http_base_url is used["http://127.0.0.1:4649"] when neither form is providedPreferred modern form. The number of entries must match server_addrs.

http_base_url

Legacy single-URL form for the Nomatron HTTP base URL.

FieldRequiredDefaultNotes
http_base_urlNo, if http_base_urls is usednone directly, but the runtime falls back to http://127.0.0.1:4649 when neither form is providedSupported for single-endpoint setups, but http_base_urls is preferred.

agent_id

The UUID that identifies this network agent.

FieldRequiredDefaultNotes
agent_idYesnoneMust match the network agent record created in Nomatron.

agent_token_file

Path to a file containing the secret token the agent uses to authenticate to Nomatron. This is the recommended way to supply the token.

FieldRequiredDefaultNotes
agent_token_fileYes, unless the token comes from NOMATRON_CONNECTIVITY_AGENT_TOKENnonePath to a root-only file containing only the token, for example /etc/nomatron/agent-token.

The token is resolved from the first of these that is set:

  1. --agent-token-file, then agent_token_file in this file;
  2. NOMATRON_CONNECTIVITY_AGENT_TOKEN;
  3. NOMATRON_AGENT_TOKEN (fallback alias);
  4. --agent-token (deprecated: puts the token on the command line and logs a warning); and
  5. an inline agent_token value in this file (lowest; avoid it).

An inline agent_token field still exists for compatibility, but do not use it: it puts the secret in the config file.

heartbeat_interval

How often the agent should emit heartbeats on the long-lived control-plane session.

FieldRequiredDefaultNotes
heartbeat_intervalNo15sMust parse as a valid duration and be greater than zero.

The control plane sets a maximum client heartbeat interval, which defaults to 15s. The server will not accept a maximum above 150s; that 150s is the client-interval clamp. If heartbeat_interval is longer than the server’s maximum, the agent uses the server’s maximum instead and logs a warning, so the control plane does not disconnect the stream.

capabilities

Declares what the agent is prepared to do.

FieldRequiredDefaultNotes
capabilitiesNo["nomad_proxy", "job_events"]Duplicates and blank values are ignored during normalization.

log_level

Controls agent log verbosity.

FieldRequiredDefaultNotes
log_levelNoinfoCommon values are debug, info, warn, and error.

log_format

Controls whether logs are emitted in text or JSON format.

FieldRequiredDefaultNotes
log_formatNotextUse json where logs are consumed by centralized tooling.

Control Plane TLS Fields

These settings control how the agent validates and connects to the Nomatron control plane.

control_plane_tls_enabled

Whether to use TLS for the control-plane gRPC and HTTP connections.

FieldRequiredDefaultNotes
control_plane_tls_enabledNofalseSet to true when the Nomatron server endpoints are using TLS.

control_plane_tls_ca_file

Path to the CA certificate used to trust the Nomatron control plane.

FieldRequiredDefaultNotes
control_plane_tls_ca_fileNononeUseful for private trust chains. Usually paired with control_plane_tls_enabled = true.

control_plane_tls_server_name

Optional TLS server name override for Nomatron control-plane validation.

FieldRequiredDefaultNotes
control_plane_tls_server_nameNononeUse when the certificate name to validate is not obvious from the dial address.

control_plane_tls_insecure_skip_verify

Disables certificate verification for the Nomatron control plane.

FieldRequiredDefaultNotes
control_plane_tls_insecure_skip_verifyNofalseOnly acceptable for temporary troubleshooting or controlled non-production scenarios.

cluster Blocks

At least one cluster block is required.

Each cluster block tells the agent how to reach one private Nomad cluster.

Example:

hcl
cluster {
  cluster_id = "0cae24d4-d12d-4b7b-9ef2-db4ac0baeffd"
  address    = "https://nomad.service.consul:4646"
  acl_token  = "<NOMAD_ACL_TOKEN>"

  tls_enabled = true
  ca_cert     = "/etc/nomatron/nomad-ca.pem"
  client_cert = "/etc/nomatron/nomad-client.pem"
  client_key  = "/etc/nomatron/nomad-client-key.pem"
  skip_verify = false
}

cluster_id

The UUID of the Nomad cluster record in Nomatron.

FieldRequiredDefaultNotes
cluster_idYesnoneMust be a valid UUID and must match the cluster Nomatron expects this agent to serve.

address

The private Nomad API address the agent should call.

FieldRequiredDefaultNotes
addressYesnoneThis is usually a private URL inside the same network as the agent.

acl_token

The Nomad ACL token the agent should use when calling the Nomad API.

FieldRequiredDefaultNotes
acl_tokenNononeSensitive. Provide it when the Nomad cluster requires ACLs for the operations Nomatron will perform.

tls_enabled

Whether the agent should use TLS when talking to this Nomad API.

FieldRequiredDefaultNotes
tls_enabledNofalseEnable this when the Nomad API is served over HTTPS or mTLS.

ca_cert

CA certificate for validating the Nomad API.

FieldRequiredDefaultNotes
ca_certNononeUsually needed when the Nomad cluster uses a private CA.

client_cert

Client certificate for mTLS toward the Nomad API.

FieldRequiredDefaultNotes
client_certNononeIf provided, client_key must also be provided.

client_key

Client private key for mTLS toward the Nomad API.

FieldRequiredDefaultNotes
client_keyNononeIf provided, client_cert must also be provided.

skip_verify

Disables TLS certificate verification for the Nomad API.

FieldRequiredDefaultNotes
skip_verifyNofalseOnly acceptable for temporary troubleshooting or tightly controlled non-production environments.

Validation Rules Worth Knowing

The agent validates several configuration rules at startup:

  • agent_id must be present and valid
  • an agent token must be resolvable (from agent_token_file, NOMATRON_CONNECTIVITY_AGENT_TOKEN, or one of the fallbacks above)
  • at least one server address must exist
  • at least one HTTP base URL must exist
  • the number of server addresses must match the number of HTTP base URLs
  • at least one cluster block must exist
  • cluster IDs must be unique
  • each cluster must have a cluster_id and address
  • if client_cert is set, client_key must also be set
  • if client_key is set, client_cert must also be set

These checks are useful because they fail early before the agent enters an ambiguous partially configured state.

Sensitive Values

Treat these values as sensitive:

  • the agent token (keep it in the file named by agent_token_file)
  • acl_token (there is no file-based option for it, so render the config file from your secret store at deploy time)
  • control_plane_tls_ca_file contents when privately managed
  • ca_cert, client_cert, and client_key contents

In practice, the most important secrets in this file are:

  • the network agent token used to authenticate to Nomatron
  • the Nomad ACL token used to call the private Nomad API

Do not commit those values into source control.

For most production deployments, the cleanest pattern is:

  • keep the control-plane endpoints explicit;
  • keep the network agent token in a separate root-only file referenced by agent_token_file, outside source control;
  • keep one cluster block per private Nomad cluster;
  • enable TLS toward Nomatron;
  • enable TLS toward the Nomad API when available; and
  • keep the cluster-facing details on the agent side, close to the private network they belong to.

The agent supports overrides for a small set of top-level fields:

PurposeFlagEnvironment variable
Config file path--configNOMATRON_AGENT_CONFIG
Single server address--server-addrNOMATRON_AGENT_SERVER_ADDR
Agent ID--agent-idNOMATRON_AGENT_ID
Agent token file--agent-token-filenone
Agent token--agent-token (deprecated)NOMATRON_CONNECTIVITY_AGENT_TOKEN (fallback NOMATRON_AGENT_TOKEN)
Log level--log-levelNOMATRON_AGENT_LOG_LEVEL
Log format--log-formatNOMATRON_AGENT_LOG_FORMAT
Heartbeat interval--heartbeat-intervalNOMATRON_AGENT_HEARTBEAT_INTERVAL
Single HTTP base URL--http-base-urlNOMATRON_AGENT_HTTP_BASE_URL

These are most useful for:

  • one-off local testing;
  • container runtime overrides; or
  • scheduler-injected values.

For long-lived deployments, the config file should stay the main source of truth.

After this page, the most useful next pages are: