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:
--configNOMATRON_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
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:
- top-level agent and control-plane settings
- one or more
clusterblocks
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:
server_addrs = [
"nomatron-1.example.com:4650",
"nomatron-2.example.com:4650",
"nomatron-3.example.com:4650"
]| Field | Required | Default | Notes |
|---|---|---|---|
server_addrs | No, if server_addr is used | ["127.0.0.1:4650"] when neither form is provided | Preferred modern form. Use this for one or more gRPC endpoints. |
server_addr
Legacy single-address form for the Nomatron gRPC endpoint.
| Field | Required | Default | Notes |
|---|---|---|---|
server_addr | No, if server_addrs is used | none directly, but the runtime falls back to 127.0.0.1:4650 when neither form is provided | Supported 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:
http_base_urls = [
"https://nomatron-1.example.com",
"https://nomatron-2.example.com",
"https://nomatron-3.example.com"
]| Field | Required | Default | Notes |
|---|---|---|---|
http_base_urls | No, if http_base_url is used | ["http://127.0.0.1:4649"] when neither form is provided | Preferred modern form. The number of entries must match server_addrs. |
http_base_url
Legacy single-URL form for the Nomatron HTTP base URL.
| Field | Required | Default | Notes |
|---|---|---|---|
http_base_url | No, if http_base_urls is used | none directly, but the runtime falls back to http://127.0.0.1:4649 when neither form is provided | Supported for single-endpoint setups, but http_base_urls is preferred. |
agent_id
The UUID that identifies this network agent.
| Field | Required | Default | Notes |
|---|---|---|---|
agent_id | Yes | none | Must 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.
| Field | Required | Default | Notes |
|---|---|---|---|
agent_token_file | Yes, unless the token comes from NOMATRON_CONNECTIVITY_AGENT_TOKEN | none | Path 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:
--agent-token-file, thenagent_token_filein this file;NOMATRON_CONNECTIVITY_AGENT_TOKEN;NOMATRON_AGENT_TOKEN(fallback alias);--agent-token(deprecated: puts the token on the command line and logs a warning); and- an inline
agent_tokenvalue 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.
| Field | Required | Default | Notes |
|---|---|---|---|
heartbeat_interval | No | 15s | Must 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.
| Field | Required | Default | Notes |
|---|---|---|---|
capabilities | No | ["nomad_proxy", "job_events"] | Duplicates and blank values are ignored during normalization. |
log_level
Controls agent log verbosity.
| Field | Required | Default | Notes |
|---|---|---|---|
log_level | No | info | Common values are debug, info, warn, and error. |
log_format
Controls whether logs are emitted in text or JSON format.
| Field | Required | Default | Notes |
|---|---|---|---|
log_format | No | text | Use 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.
| Field | Required | Default | Notes |
|---|---|---|---|
control_plane_tls_enabled | No | false | Set 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.
| Field | Required | Default | Notes |
|---|---|---|---|
control_plane_tls_ca_file | No | none | Useful 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.
| Field | Required | Default | Notes |
|---|---|---|---|
control_plane_tls_server_name | No | none | Use 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.
| Field | Required | Default | Notes |
|---|---|---|---|
control_plane_tls_insecure_skip_verify | No | false | Only 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:
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.
| Field | Required | Default | Notes |
|---|---|---|---|
cluster_id | Yes | none | Must 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.
| Field | Required | Default | Notes |
|---|---|---|---|
address | Yes | none | This 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.
| Field | Required | Default | Notes |
|---|---|---|---|
acl_token | No | none | Sensitive. 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.
| Field | Required | Default | Notes |
|---|---|---|---|
tls_enabled | No | false | Enable this when the Nomad API is served over HTTPS or mTLS. |
ca_cert
CA certificate for validating the Nomad API.
| Field | Required | Default | Notes |
|---|---|---|---|
ca_cert | No | none | Usually needed when the Nomad cluster uses a private CA. |
client_cert
Client certificate for mTLS toward the Nomad API.
| Field | Required | Default | Notes |
|---|---|---|---|
client_cert | No | none | If provided, client_key must also be provided. |
client_key
Client private key for mTLS toward the Nomad API.
| Field | Required | Default | Notes |
|---|---|---|---|
client_key | No | none | If provided, client_cert must also be provided. |
skip_verify
Disables TLS certificate verification for the Nomad API.
| Field | Required | Default | Notes |
|---|---|---|---|
skip_verify | No | false | Only acceptable for temporary troubleshooting or tightly controlled non-production environments. |
Validation Rules Worth Knowing
The agent validates several configuration rules at startup:
agent_idmust 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
clusterblock must exist - cluster IDs must be unique
- each cluster must have a
cluster_idandaddress - if
client_certis set,client_keymust also be set - if
client_keyis set,client_certmust 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_filecontents when privately managedca_cert,client_cert, andclient_keycontents
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.
Recommended Pattern
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
clusterblock 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.
Related Environment Variables And Flags
The agent supports overrides for a small set of top-level fields:
| Purpose | Flag | Environment variable |
|---|---|---|
| Config file path | --config | NOMATRON_AGENT_CONFIG |
| Single server address | --server-addr | NOMATRON_AGENT_SERVER_ADDR |
| Agent ID | --agent-id | NOMATRON_AGENT_ID |
| Agent token file | --agent-token-file | none |
| Agent token | --agent-token (deprecated) | NOMATRON_CONNECTIVITY_AGENT_TOKEN (fallback NOMATRON_AGENT_TOKEN) |
| Log level | --log-level | NOMATRON_AGENT_LOG_LEVEL |
| Log format | --log-format | NOMATRON_AGENT_LOG_FORMAT |
| Heartbeat interval | --heartbeat-interval | NOMATRON_AGENT_HEARTBEAT_INTERVAL |
| Single HTTP base URL | --http-base-url | NOMATRON_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.
What To Read Next
After this page, the most useful next pages are: