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:

bash
nomatron server --config /etc/nomatron/nomatron.hcl

Configuration is resolved in this order:

  1. Values from the HCL file.
  2. Environment variable overrides.
  3. Command-line flag overrides.
  4. 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

hcl
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.

SettingRequiredDefaultEnvironment variableWhat it does
portNo4649NOMATRON_PORTTCP port used by the Nomatron HTTP server.
api_addrRecommendedempty, or http://localhost:4649 in dev modeNOMATRON_API_ADDRPublic API address used when Nomatron needs to describe its own externally reachable URL. Set this in production.
log_levelNoinfo, or debug in dev modeNOMATRON_LOG_LEVELLog verbosity. Common values are trace, debug, info, warn, and error.
log_formatNotextNOMATRON_LOG_FORMATLog output format. Use json for structured production logs.
read_header_timeout_secondsNoGo server default when unsetNOMATRON_HTTP_READ_HEADER_TIMEOUT_SECONDSMaximum time allowed to read request headers. Set this in internet-facing deployments.
read_timeout_secondsNoGo server default when unsetNOMATRON_HTTP_READ_TIMEOUT_SECONDSMaximum time allowed to read the full request.
write_timeout_secondsNoGo server default when unsetNOMATRON_HTTP_WRITE_TIMEOUT_SECONDSMaximum time allowed to write the response.
idle_timeout_secondsNoGo server default when unsetNOMATRON_HTTP_IDLE_TIMEOUT_SECONDSMaximum keep-alive idle time for client connections.
tls_enabledNofalseNOMATRON_TLS_ENABLEDEnables TLS directly in the Nomatron server. If TLS terminates at a proxy or load balancer, keep this disabled.
tls_cert_fileRequired when tls_enabled = trueemptyNOMATRON_TLS_CERT_FILEPath to the server TLS certificate.
tls_key_fileRequired when tls_enabled = trueemptyNOMATRON_TLS_KEY_FILEPath to the server TLS private key.
tls_ca_fileNoemptyNOMATRON_TLS_CA_FILEOptional CA bundle path when client or upstream trust configuration requires it.
server_idRecommendedSerf node nameNOMATRON_SERVER_IDStable 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_addrNo:<port + 1>, so :4650 by defaultNOMATRON_AGENT_GRPC_LISTEN_ADDRListener for connectivity agents and Host Agents.
agent_grpc_advertise_addrRecommended with Host Agentsthe API hostname on the API port plus one (443 for an https address without a port, 4650 for http)NOMATRON_AGENT_GRPC_ADVERTISE_ADDRAddress 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_addrNoderivedNOMATRON_AGENT_GRPC_PEER_ADDRAddress other Nomatron servers use to forward agent traffic to this server in a multi-server deployment.
agent_grpc_peer_tls_server_nameNoemptyNOMATRON_AGENT_GRPC_PEER_TLS_SERVER_NAMETLS server name to verify on server-to-server agent forwarding.
agent_stream_min_heartbeat_deadline_secondsNo30 (maximum 300)noneMinimum time before an agent stream with no heartbeat is treated as lost.
agent_stream_max_client_heartbeat_interval_secondsNo15 (maximum 150)noneLongest heartbeat interval agents may use.
trusted_originsNoapi_addr onlyNOMATRON_TRUSTED_ORIGINS (comma-separated)Extra browser origins accepted for cross-site request forgery checks, as well as api_addr.
trusted_proxiesNoemptynoneProxy 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.

SettingRequiredDefaultEnvironment variableWhat it does
connection_stringYes for productionpostgres://postgres:password@localhost:5432/nomatron?sslmode=disableNOMATRON_DB_URLPostgreSQL connection string used by the server. Always set this outside local development.
max_open_connsNodriver default when unsetNOMATRON_DB_MAX_OPEN_CONNSMaximum number of open database connections. Tune this with your database capacity.
max_idle_connsNodriver default when unsetNOMATRON_DB_MAX_IDLE_CONNSMaximum number of idle database connections retained in the pool.
conn_max_lifetime_secondsNono explicit lifetime limit when unsetNOMATRON_DB_CONN_MAX_LIFETIME_SECONDSMaximum lifetime for an open database connection. Useful behind proxies or managed databases.
conn_max_idle_time_secondsNono explicit idle-time limit when unsetNOMATRON_DB_CONN_MAX_IDLE_TIME_SECONDSMaximum 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.

SettingRequiredDefaultEnvironment variableWhat it does
node_nameYes outside dev modedev-mode-serf-node-1 in dev modeNOMATRON_SERF_NODE_NAMEUnique name for this Nomatron server node.
bind_addrYes outside dev modeemptyNOMATRON_SERF_BIND_ADDRAddress Serf binds to locally. Use 0.0.0.0 when the node should listen on all interfaces.
advertise_addrRecommended for multi-node deploymentsemptyNOMATRON_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.
portYes outside dev mode0 when unsetNOMATRON_SERF_PORTSerf gossip port. Commonly 7946.
retry_joinNo for a single node; yes for joining an existing clusterempty listNOMATRON_SERF_RETRY_JOINStatic host:port peers and/or cloud auto-join provider=... strings. Prefer HCL for cloud provider strings.
retry_join_intervalNo30sNOMATRON_SERF_RETRY_JOIN_INTERVALDelay between join attempts.
retry_join_maxNo0 (retry forever)NOMATRON_SERF_RETRY_JOIN_MAXMaximum join attempts; 0 retries forever.
encrypt_keyRecommended in productionemptyNOMATRON_SERF_ENCRYPT_KEYBase64-encoded gossip encryption key. Generate one with nomatron keygen. Use the same value on all members.
tagsNoempty mapNOMATRON_SERF_TAGSKey/value metadata for this node. Environment variable format is comma-separated key=value pairs.
gossip_interval_msNoSerf default when unsetNOMATRON_SERF_GOSSIP_INTERVALInterval between gossip rounds in milliseconds.
gossip_nodesNoSerf default when unsetNOMATRON_SERF_GOSSIP_NODESNumber of nodes to gossip to each interval.
probe_interval_msNoSerf default when unsetNOMATRON_SERF_PROBE_INTERVALInterval between failure-detection probes in milliseconds.
probe_timeout_msNoSerf default when unsetNOMATRON_SERF_PROBE_TIMEOUTTimeout 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

SettingRequiredDefaultEnvironment variableWhat it does
max_inflight_per_clusterNo1NOMATRON_OPERATIONS_MAX_INFLIGHT_PER_CLUSTERMaximum number of operations Nomatron runs against one cluster at the same time.

Networking Block

Settings for Application Networking (early access).

SettingRequiredDefaultEnvironment variableWhat it does
repair_managed_host_agent_driftNotruenoneRe-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.

hcl
agent_images {
  registry = "registry.example.com/nomatron"
  tag      = "v0.1.7"
}
SettingRequiredDefaultEnvironment variableWhat it does
registryNoghcr.io/nomatronio/nomatron-releasesNOMATRON_IMAGE_REGISTRYRegistry and path the image names are appended to.
tagNothe server versionNOMATRON_IMAGE_TAGTag used for both images. Keep it equal to your server version.
host_agentNoemptyNOMATRON_HOST_AGENT_IMAGEFull image reference for the Host Agent. Overrides registry and tag.
networking_controllerNoemptyNOMATRON_NETWORKING_CONTROLLER_IMAGEFull 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.

SettingRequiredDefaultEnvironment variableWhat it does
issuerNoapi_addrNOMATRON_OAUTH_ISSUERIssuer URL placed in tokens and metadata.
api_audienceNoissuer + /api/v1NOMATRON_OAUTH_API_AUDIENCEAudience for access tokens issued for the Nomatron API.
access_token_ttl_secondsNo600noneAccess token lifetime.
refresh_token_ttl_secondsNo604800 (7 days)noneRefresh 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.

SettingRequiredDefaultEnvironment variableWhat it does
license_keyYes outside dev modeemptyNOMATRON_LICENSE_KEYLicense key issued for the customer or installation. Prefer the environment variable when injecting this as a secret.
cluster_keyYes in connected modeemptyNOMATRON_CLUSTER_KEYCluster 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.
modeNoconnectedNOMATRON_LICENSE_MODELicensing 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 keygen produces a Serf gossip key, which is the wrong length for this setting.)
  • nomatron database init needs 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.

SettingRequiredDefaultEnvironment variableWhat it does
enabledNofalseNOMATRON_TELEMETRY_ENABLEDOpts in to telemetry submission. v0.1.7 builds send nothing even when enabled.
http_proxyNoemptyNOMATRON_TELEMETRY_HTTP_PROXYOptional HTTP proxy used for telemetry traffic.
https_proxyNoemptyNOMATRON_TELEMETRY_HTTPS_PROXYOptional HTTPS proxy used for telemetry traffic.

Command-Line Overrides

Most runtime settings can also be overridden with nomatron server flags. Common examples:

bash
nomatron server \
  --config /etc/nomatron/nomatron.hcl \
  --port 4649 \
  --log-level info \
  --log-format json \
  --db-url-file /run/secrets/nomatron_db_url

Pass 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.