Configuration File
Nomatron is in early access. Some advanced workflows may not be covered in the public docs.
The Nomatron server configuration file is an HCL file used to configure the HTTP server, database connection, Serf membership, operations, Application Networking, licensing, telemetry, OAuth, and TLS settings.
Use a configuration file for repeatable server deployments. For local evaluation, nomatron server --dev can start with development defaults and command-line flags instead.
Loading A Config File
Start Nomatron with a config file:
nomatron server --config /etc/nomatron/nomatron.hclConfiguration is resolved in this order:
- Values from the HCL file.
- Environment variable overrides.
- Command-line flag overrides.
- Built-in fallback defaults.
In --dev mode, Nomatron also applies development defaults for the server port, API address, log level, TLS, and Serf node name.
Example Config File
server {
port = 4649
api_addr = "https://nomatron.example.com"
log_level = "info"
log_format = "json"
read_header_timeout_seconds = 10
read_timeout_seconds = 60
write_timeout_seconds = 60
idle_timeout_seconds = 120
tls_enabled = true
tls_cert_file = "/etc/nomatron/tls/server.crt"
tls_key_file = "/etc/nomatron/tls/server.key"
tls_ca_file = "/etc/nomatron/tls/ca.crt"
}
database {
# Prefer NOMATRON_DB_URL from your secret store instead of a literal value.
connection_string = "postgres://nomatron:<DB_PASSWORD>@postgres.example.com:5432/nomatron?sslmode=require"
max_open_conns = 25
max_idle_conns = 10
conn_max_lifetime_seconds = 1800
conn_max_idle_time_seconds = 300
}
serf {
node_name = "nomatron-1"
bind_addr = "0.0.0.0"
advertise_addr = "192.0.2.10"
port = 7946
encrypt_key = "<SERF_GOSSIP_KEY>" # from `nomatron keygen`; inject from your secret store
retry_join = [
"192.0.2.11:7946",
"192.0.2.12:7946",
]
retry_join_interval = "30s"
retry_join_max = 0
tags = {
role = "server"
env = "production"
}
gossip_interval_ms = 200
gossip_nodes = 3
probe_interval_ms = 1000
probe_timeout_ms = 500
}
licensing {
# Prefer NOMATRON_LICENSE_KEY and NOMATRON_CLUSTER_KEY from your secret store
# instead of writing the keys into this file.
mode = "connected"
}
telemetry {
enabled = false # the default; telemetry is off
}Keep secrets such as database.connection_string, licensing.license_key, licensing.cluster_key, and serf.encrypt_key out of source control. Prefer environment variables or your deployment platform’s secret store for those values.
The server also requires NOMATRON_ENCRYPTION_KEY outside dev mode. It is an environment variable only, not an HCL setting. See Encryption Key
.
Server Block
The server block controls the Nomatron HTTP server.
| Setting | Required | Default | Environment variable | What it does |
|---|---|---|---|---|
port | No | 4649 | NOMATRON_PORT | TCP port used by the Nomatron HTTP server. |
api_addr | Recommended | empty, or http://localhost:4649 in dev mode | NOMATRON_API_ADDR | Public API address used when Nomatron needs to describe its own externally reachable URL. Set this in production. |
log_level | No | info, or debug in dev mode | NOMATRON_LOG_LEVEL | Log verbosity. Common values are trace, debug, info, warn, and error. |
log_format | No | text | NOMATRON_LOG_FORMAT | Log output format. Use json for structured production logs. |
read_header_timeout_seconds | No | Go server default when unset | NOMATRON_HTTP_READ_HEADER_TIMEOUT_SECONDS | Maximum time allowed to read request headers. Set this in internet-facing deployments. |
read_timeout_seconds | No | Go server default when unset | NOMATRON_HTTP_READ_TIMEOUT_SECONDS | Maximum time allowed to read the full request. |
write_timeout_seconds | No | Go server default when unset | NOMATRON_HTTP_WRITE_TIMEOUT_SECONDS | Maximum time allowed to write the response. |
idle_timeout_seconds | No | Go server default when unset | NOMATRON_HTTP_IDLE_TIMEOUT_SECONDS | Maximum keep-alive idle time for client connections. |
tls_enabled | No | false | NOMATRON_TLS_ENABLED | Enables TLS directly in the Nomatron server. If TLS terminates at a proxy or load balancer, keep this disabled. |
tls_cert_file | Required when tls_enabled = true | empty | NOMATRON_TLS_CERT_FILE | Path to the server TLS certificate. |
tls_key_file | Required when tls_enabled = true | empty | NOMATRON_TLS_KEY_FILE | Path to the server TLS private key. |
tls_ca_file | No | empty | NOMATRON_TLS_CA_FILE | Optional CA bundle path when client or upstream trust configuration requires it. |
server_id | Recommended | Serf node name | NOMATRON_SERVER_ID | Stable identity for this server, used for licence machine seats. Set it when node names can change, for example when servers are rescheduled. Nomatron logs a warning when it falls back to a name that looks temporary. |
agent_grpc_listen_addr | No | :<port + 1>, so :4650 by default | NOMATRON_AGENT_GRPC_LISTEN_ADDR | Listener for connectivity agents and Host Agents. |
agent_grpc_advertise_addr | Recommended with Host Agents | the API hostname on the API port plus one (443 for an https address without a port, 4650 for http) | NOMATRON_AGENT_GRPC_ADVERTISE_ADDR | Address that managed Host Agents dial, for example nomatron.example.com:443 behind a TCP load balancer. It must be reachable from every Nomad client. |
agent_grpc_peer_addr | No | derived | NOMATRON_AGENT_GRPC_PEER_ADDR | Address other Nomatron servers use to forward agent traffic to this server in a multi-server deployment. |
agent_grpc_peer_tls_server_name | No | empty | NOMATRON_AGENT_GRPC_PEER_TLS_SERVER_NAME | TLS server name to verify on server-to-server agent forwarding. |
agent_stream_min_heartbeat_deadline_seconds | No | 30 (maximum 300) | none | Minimum time before an agent stream with no heartbeat is treated as lost. |
agent_stream_max_client_heartbeat_interval_seconds | No | 15 (maximum 150) | none | Longest heartbeat interval agents may use. |
trusted_origins | No | api_addr only | NOMATRON_TRUSTED_ORIGINS (comma-separated) | Extra browser origins accepted for cross-site request forgery checks, as well as api_addr. |
trusted_proxies | No | empty | none | Proxy addresses trusted to report the client address, used to rate-limit the status endpoint per client. |
Advanced tuning keys such as status_* rate limits and rbac_policy_* refresh intervals also exist in the server block. Leave them unset unless Nomatron support asks you to change them.
Database Block
The database block configures PostgreSQL connectivity.
| Setting | Required | Default | Environment variable | What it does |
|---|---|---|---|---|
connection_string | Yes for production | postgres://postgres:password@localhost:5432/nomatron?sslmode=disable | NOMATRON_DB_URL | PostgreSQL connection string used by the server. Always set this outside local development. |
max_open_conns | No | driver default when unset | NOMATRON_DB_MAX_OPEN_CONNS | Maximum number of open database connections. Tune this with your database capacity. |
max_idle_conns | No | driver default when unset | NOMATRON_DB_MAX_IDLE_CONNS | Maximum number of idle database connections retained in the pool. |
conn_max_lifetime_seconds | No | no explicit lifetime limit when unset | NOMATRON_DB_CONN_MAX_LIFETIME_SECONDS | Maximum lifetime for an open database connection. Useful behind proxies or managed databases. |
conn_max_idle_time_seconds | No | no explicit idle-time limit when unset | NOMATRON_DB_CONN_MAX_IDLE_TIME_SECONDS | Maximum idle time before an idle connection can be closed. |
Serf Block
The serf block configures Nomatron server membership and gossip. Use it when running more than one Nomatron server instance, or when you need explicit membership configuration.
| Setting | Required | Default | Environment variable | What it does |
|---|---|---|---|---|
node_name | Yes outside dev mode | dev-mode-serf-node-1 in dev mode | NOMATRON_SERF_NODE_NAME | Unique name for this Nomatron server node. |
bind_addr | Yes outside dev mode | empty | NOMATRON_SERF_BIND_ADDR | Address Serf binds to locally. Use 0.0.0.0 when the node should listen on all interfaces. |
advertise_addr | Recommended for multi-node deployments | empty | NOMATRON_SERF_ADVERTISE_ADDR (flag: --serf-advertise-addr) | Address other nodes should use to reach this node. Set this when bind address is not routable from peers. |
port | Yes outside dev mode | 0 when unset | NOMATRON_SERF_PORT | Serf gossip port. Commonly 7946. |
retry_join | No for a single node; yes for joining an existing cluster | empty list | NOMATRON_SERF_RETRY_JOIN | Static host:port peers and/or cloud auto-join provider=... strings. Prefer HCL for cloud provider strings. |
retry_join_interval | No | 30s | NOMATRON_SERF_RETRY_JOIN_INTERVAL | Delay between join attempts. |
retry_join_max | No | 0 (retry forever) | NOMATRON_SERF_RETRY_JOIN_MAX | Maximum join attempts; 0 retries forever. |
encrypt_key | Recommended in production | empty | NOMATRON_SERF_ENCRYPT_KEY | Base64-encoded gossip encryption key. Generate one with nomatron keygen. Use the same value on all members. |
tags | No | empty map | NOMATRON_SERF_TAGS | Key/value metadata for this node. Environment variable format is comma-separated key=value pairs. |
gossip_interval_ms | No | Serf default when unset | NOMATRON_SERF_GOSSIP_INTERVAL | Interval between gossip rounds in milliseconds. |
gossip_nodes | No | Serf default when unset | NOMATRON_SERF_GOSSIP_NODES | Number of nodes to gossip to each interval. |
probe_interval_ms | No | Serf default when unset | NOMATRON_SERF_PROBE_INTERVAL | Interval between failure-detection probes in milliseconds. |
probe_timeout_ms | No | Serf default when unset | NOMATRON_SERF_PROBE_TIMEOUT | Timeout for failure-detection probes in milliseconds. |
serf.join was removed. Migrate existing configs to retry_join. For AWS, Azure, and GCP discovery examples, see Server HA Cloud Auto-Join
.
Operations Block
| Setting | Required | Default | Environment variable | What it does |
|---|---|---|---|---|
max_inflight_per_cluster | No | 1 | NOMATRON_OPERATIONS_MAX_INFLIGHT_PER_CLUSTER | Maximum number of operations Nomatron runs against one cluster at the same time. |
Networking Block
Settings for Application Networking (early access).
| Setting | Required | Default | Environment variable | What it does |
|---|---|---|---|---|
repair_managed_host_agent_drift | No | true | none | Re-registers the Nomatron-managed Host Agent job when its live Nomad job no longer matches. |
Agent Images Block
Overrides the images Nomatron deploys for Application Networking. By default these are ghcr.io/nomatronio/nomatron-releases/nomatron-host-agent and ghcr.io/nomatronio/nomatron-releases/nomatron-networking-controller, tagged with the server’s own version (for example v0.1.7). Set these only if you mirror the images to your own registry.
agent_images {
registry = "registry.example.com/nomatron"
tag = "v0.1.7"
}| Setting | Required | Default | Environment variable | What it does |
|---|---|---|---|---|
registry | No | ghcr.io/nomatronio/nomatron-releases | NOMATRON_IMAGE_REGISTRY | Registry and path the image names are appended to. |
tag | No | the server version | NOMATRON_IMAGE_TAG | Tag used for both images. Keep it equal to your server version. |
host_agent | No | empty | NOMATRON_HOST_AGENT_IMAGE | Full image reference for the Host Agent. Overrides registry and tag. |
networking_controller | No | empty | NOMATRON_NETWORKING_CONTROLLER_IMAGE | Full image reference for the networking controller. Overrides registry and tag. |
OAuth Block
Settings for Nomatron’s built-in OAuth authorization server. Most installations can leave this block out.
| Setting | Required | Default | Environment variable | What it does |
|---|---|---|---|---|
issuer | No | api_addr | NOMATRON_OAUTH_ISSUER | Issuer URL placed in tokens and metadata. |
api_audience | No | issuer + /api/v1 | NOMATRON_OAUTH_API_AUDIENCE | Audience for access tokens issued for the Nomatron API. |
access_token_ttl_seconds | No | 600 | none | Access token lifetime. |
refresh_token_ttl_seconds | No | 604800 (7 days) | none | Refresh token lifetime. |
The block also accepts per-minute rate limits for the OAuth endpoints and for API traffic by caller type. Leave these unset unless Nomatron support asks you to change them. Rotate the signing key with nomatron oauth rotate-signing-key
.
Licensing Block
The licensing block configures runtime license validation. Nomatron defaults to connected licensing outside dev mode, and connected mode needs both a licence key and a cluster key. The mode is optional.
| Setting | Required | Default | Environment variable | What it does |
|---|---|---|---|---|
license_key | Yes outside dev mode | empty | NOMATRON_LICENSE_KEY | License key issued for the customer or installation. Prefer the environment variable when injecting this as a secret. |
cluster_key | Yes in connected mode | empty | NOMATRON_CLUSTER_KEY | Cluster key for this installation. Secret: inject it from your secret store, never on the command line. Without it the server fails with licensing cluster_key is required for connected mode. |
mode | No | connected | NOMATRON_LICENSE_MODE | Licensing mode. Omit this for normal connected licensing. Only set it when Nomatron support asks you to use a different mode. |
Generate the cluster key yourself, for example with openssl rand -base64 32, and keep it for the life of the database. Nomatron does not store or issue cluster keys, so keep it in your secrets manager alongside the encryption key and back it up; it cannot be recovered if lost.
Other licensing trust settings are managed internally by the Nomatron build and licensing service. They are not normally required in customer configuration files.
Encryption Key
Nomatron encrypts stored secrets (sensitive variables, cluster ACL tokens, OIDC client secrets, and similar values) with a key you supply in NOMATRON_ENCRYPTION_KEY.
- Required outside dev mode. Without it the server fails with
NOMATRON_ENCRYPTION_KEY is required. - Must be exactly 32 bytes, or standard or raw base64 of 32 bytes. Generate one with
openssl rand -base64 32. (nomatron keygenproduces a Serf gossip key, which is the wrong length for this setting.) nomatron database initneeds the same key.- Back it up separately from the database. If you lose it, stored secrets cannot be decrypted. It cannot be rotated from the CLI in v0.1.7.
Telemetry Block
The telemetry block controls licensed telemetry submission. Telemetry is off by default: if the block or NOMATRON_TELEMETRY_ENABLED is unset, it stays disabled. Nomatron v0.1.7 sends no telemetry, even when enabled = true. The default may change in a future release; any change will be noted in the release notes.
| Setting | Required | Default | Environment variable | What it does |
|---|---|---|---|---|
enabled | No | false | NOMATRON_TELEMETRY_ENABLED | Opts in to telemetry submission. v0.1.7 builds send nothing even when enabled. |
http_proxy | No | empty | NOMATRON_TELEMETRY_HTTP_PROXY | Optional HTTP proxy used for telemetry traffic. |
https_proxy | No | empty | NOMATRON_TELEMETRY_HTTPS_PROXY | Optional HTTPS proxy used for telemetry traffic. |
Command-Line Overrides
Most runtime settings can also be overridden with nomatron server flags. Common examples:
nomatron server \
--config /etc/nomatron/nomatron.hcl \
--port 4649 \
--log-level info \
--log-format json \
--db-url-file /run/secrets/nomatron_db_urlPass secrets with the -file or -stdin flag forms (for example --db-url-file, --serf-encrypt-key-file) or environment variables, never as plain flag values.
Use flags for local testing and environment-specific overrides. Prefer the config file plus environment variables for production deployments.