Running Nomatron Server

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

This page covers running the Nomatron server directly from the nomatron binary.

It assumes:

  • Nomatron is already installed on the host;
  • PostgreSQL is reachable;
  • the database has already been initialized; and
  • you are supplying configuration by file, environment variables, flags, or a mix of those.

This page is about the binary runtime path. If you are running the published OCI image instead, see Running Nomatron Server as a Docker Container .

If you are already in incident or failure-handling mode, see Troubleshooting Nomatron Server .

Before You Start

Make sure these are already in place:

  • the nomatron binary is on the host and on PATH;
  • PostgreSQL is running and reachable;
  • nomatron database init has already completed successfully;
  • your Nomatron config file or environment variables are ready; and
  • you have a plan for how the server will be reached, including api_addr, TLS termination, and Serf connectivity if you are not running in dev mode.

Basic Binary Start

The normal production-style startup pattern is:

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

Nomatron will:

  1. load configuration;
  2. connect to PostgreSQL;
  3. run migrations;
  4. ensure the JWT signing secret exists;
  5. seed built-in RBAC data;
  6. start Serf;
  7. start the HTTP server.

If startup succeeds, the server listens on the configured HTTP port and serves the UI and API.

Typical Production-Style Configuration

For most customer deployments, the minimum important runtime inputs are:

  • database.connection_string
  • server.port
  • server.api_addr
  • licensing.license_key (NOMATRON_LICENSE_KEY)
  • licensing.cluster_key (NOMATRON_CLUSTER_KEY), required in connected licence mode, which is the default
  • NOMATRON_ENCRYPTION_KEY, required outside dev mode (32 bytes, or base64 of 32 bytes; generate one with openssl rand -base64 32)

Generate the cluster key yourself, for example with openssl rand -base64 32. Nomatron does not store or issue cluster keys, so back it up in your secrets manager. Keep the cluster key and the encryption key for the life of the database; stored secrets cannot be decrypted without the original encryption key.

Without these the server refuses to start, with licensing cluster_key is required for connected mode or NOMATRON_ENCRYPTION_KEY is required.

If you are not terminating TLS directly in Nomatron, keep server.tls_enabled = false and terminate TLS at your reverse proxy or load balancer instead.

Running With Environment Variables

You can also run Nomatron without a config file by providing the important values via environment variables:

bash
export NOMATRON_DB_URL="$(cat /run/secrets/nomatron_db_url)"
export NOMATRON_LICENSE_KEY="$(cat /run/secrets/nomatron_license_key)"
export NOMATRON_CLUSTER_KEY="$(cat /run/secrets/nomatron_cluster_key)"
export NOMATRON_ENCRYPTION_KEY="$(cat /run/secrets/nomatron_encryption_key)"
export NOMATRON_API_ADDR="https://nomatron.example.com"
export NOMATRON_PORT="4649"

nomatron server

This is useful when your process manager or orchestration platform injects secrets and runtime values directly into the environment.

Useful Startup Flags

The nomatron server command supports these commonly used flags:

FlagWhen to use it
--configPoint the server at a specific HCL config file.
--portOverride the HTTP listen port.
--log-levelChange log verbosity for the running process.
--log-formatSwitch between text and json logging.
--db-url-file / --db-url-stdinOverride the configured PostgreSQL DSN, read from a file or stdin.
--tlsEnable TLS directly in the Nomatron process.
--tls-certProvide the TLS certificate file when TLS is enabled.
--tls-keyProvide the TLS private key file when TLS is enabled.
--tls-caProvide an optional CA file for trust configuration.
--serf-node-nameOverride the Serf node name.
--serf-bind-addrOverride the Serf bind address.
--serf-advertise-addrSet the Serf advertise address other nodes should use.
--serf-portOverride the Serf gossip port.
--serf-retry-joinJoin an existing Serf cluster with static peers and/or cloud auto-join strings. Repeatable.
--serf-retry-join-intervalDelay between Serf join attempts.
--serf-retry-join-maxMaximum Serf join attempts (0 retries forever).
--serf-encrypt-key-file / --serf-encrypt-key-stdinSupply the Serf gossip encryption key from a file or stdin.

The plain --db-url and --serf-encrypt-key flags still exist, but they put secrets on the command line; use the -file or -stdin forms or environment variables instead.

--serf-join was removed. Use --serf-retry-join or serf.retry_join in the configuration file. See Server HA Cloud Auto-Join .

Dev Mode Versus Normal Mode

nomatron server --dev is intentionally different from the normal binary runtime path.

In dev mode, Nomatron:

  • starts with development defaults;
  • bypasses licensing validation;
  • provisions a temporary local PostgreSQL container (Docker must be running on the same machine);
  • can optionally open an ngrok tunnel (--ngrok with NGROK_AUTHTOKEN);
  • bootstraps a development root user; and
  • sets the API address to local or ngrok-backed development values.

That makes dev mode great for evaluation and local workflows, but it is not the same as the normal server startup path used for staging or production-style installs.

Root User Behavior

The normal server path also accepts:

  • --root-username
  • --root-password-file / --root-password-stdin
  • NOMATRON_ROOT_USERNAME
  • NOMATRON_ROOT_PASSWORD

These are only relevant when Nomatron needs to bootstrap the built-in root user for the first time.

If no root password is supplied, the root user is created with the default password nomatron123. Set one before first start, or change it immediately after your first sign-in. Until you do, the Nomatron UI shows a warning banner, “The Root User is still using the default password”, with a Change Password link (the banner is not shown in dev mode).

If a built-in Nomatron user already exists, rerunning with different root overrides is not the normal credential management path. Treat those values as first-bootstrap inputs, not as a way to rotate credentials on every restart.

Serf And Multi-Node Operation

Outside dev mode, Nomatron uses the configured serf block to start or join the server membership layer.

For a single-node setup, the simplest pattern is:

  • one stable node_name
  • one reachable bind_addr
  • one port
  • no retry_join peers

For multi-node setups, add:

  • advertise_addr
  • retry_join peer addresses or cloud auto-join strings
  • encrypt_key

Nomatron servers are designed to sit behind a load balancer while coordinating through Serf and the shared PostgreSQL database.

Health And Verification

After startup, verify the server in three places:

1. Process Logs

The startup logs should show:

  • the configured mode;
  • the HTTP listener address;
  • database connection success;
  • RBAC seeding success; and
  • Serf startup success.

Here is an example startup sequence:

text
==> Nomatron Server dev (unknown) 2026-04-16
==> Configuration:
     Mode                = production
     HTTP                = :4649 (TLS: false)
2026-04-16T09:50:06.772+0100 [INFO]  nomatron: starting server: addr=:4649 tls=false version=dev commit=unknown build_date=""
2026-04-16T09:50:06.772+0100 [INFO]  nomatron: log configured: level=info format=text
2026-04-16T09:50:06.772+0100 [INFO]  nomatron: db connecting: dsn=postgres://postgres:password@localhost:15432/nomatron?sslmode=disable
2026-04-16T09:50:06.933+0100 [INFO]  nomatron: rbac seeded
2026-04-16T09:50:06.933+0100 [INFO]  nomatron: resolved serf advertise address: advertise_addr=127.0.0.1 source=configured bind_addr=0.0.0.0 port=7947
2026-04-16T09:50:06.933+0100 [INFO]  nomatron: serf: EventMemberJoin: dev-node-1 127.0.0.1
2026-04-16T09:50:06.933+0100 [INFO]  nomatron: serf node joined: node_id=544d7376-fa5b-5e98-84aa-a082a544cbfb name=dev-node-1 addr=127.0.0.1
2026-04-16T09:50:06.933+0100 [INFO]  nomatron: memberlist: Initiating push/pull sync with:  127.0.0.1:7947
2026-04-16T09:50:06.933+0100 [INFO]  nomatron: memberlist: Stream connection from=127.0.0.1:49375
2026-04-16T09:50:06.933+0100 [INFO]  nomatron: memberlist: Failed to join 127.0.0.1:17947: dial tcp 127.0.0.1:17947: connect: connection refused
2026-04-16T09:50:06.936+0100 [INFO]  nomatron: Node 544d7376-fa5b-5e98-84aa-a082a544cbfb joined: event_type=member-join event_name=serf.join org="" cluster="" node=544d7376-fa5b-5e98-84aa-a082a544cbfb source=serf correlation_id="" meta="map[addr:127.0.0.1 name:dev-node-1 node_id:544d7376-fa5b-5e98-84aa-a082a544cbfb port:7947 role: status:alive tags:map[env:dev node_id:544d7376-fa5b-5e98-84aa-a082a544cbfb role:controller]]"
2026-04-16T09:50:06.964+0100 [INFO]  nomatron: Added superuser policy for root
2026-04-16T09:50:07.417+0100 [INFO]  nomatron: licensing state changed: runtime_mode=connected validation_status=healthy healthy=true warnings=0 errors=0 blocking=false
2026-04-16T09:50:07.423+0100 [INFO]  nomatron: licensing state changed: runtime_mode=connected validation_status=healthy healthy=false warnings=0 errors=1 blocking=true
2026-04-16T09:50:07.430+0100 [WARN]  nomatron: agent grpc server TLS is disabled; gRPC traffic is unencrypted: addr=:4650
2026-04-16T09:50:07.430+0100 [INFO]  nomatron: starting agent grpc server: addr=:4650
2026-04-16T09:50:07.434+0100 [WARN]  nomatron: server TLS is disabled; HTTP traffic is unencrypted

The most important lines to look for are:

  • starting server, which confirms the main HTTP listener has started;
  • db connecting, which confirms the server is trying to reach PostgreSQL;
  • rbac seeded, which confirms startup passed the early database/bootstrap phase;
  • serf node joined, which confirms membership is up; and
  • any licensing status lines, which tell you whether the runtime is currently healthy or blocked.

2. Health Endpoint

Nomatron exposes a health endpoint for load balancers and checks:

text
/api/v1/health

The CLI also exposes a health check:

bash
nomatron health

This returns success only when the server, its Serf node, and its database connection are healthy.

3. Browser Access

Once the server is healthy, open:

text
https://YOUR_API_ADDR/ui

or, for a local non-TLS run:

text
http://localhost:4649/ui

If the server is reachable and configured correctly, the Nomatron UI should load.

Common Failure Modes

Database Not Ready

If PostgreSQL is unavailable or the DSN is wrong, the server fails during startup before serving traffic.

Check:

  • connectivity to PostgreSQL;
  • the configured DSN;
  • database TLS settings; and
  • whether nomatron database init has already been run.

Missing api_addr

The server can start without a useful external api_addr, but integrations and operator workflows are much easier if it is set correctly.

Set server.api_addr or NOMATRON_API_ADDR to the externally reachable base URL in real environments.

Serf Misconfiguration

If bind, advertise, retry_join, or encryption values are wrong, the server may start but fail membership formation or health checks.

Check:

  • bind and advertise addresses;
  • firewall rules for the Serf port (7946 by default; allow both TCP and UDP between servers); and
  • whether all nodes share the same encryption key.

TLS Misconfiguration

If TLS is enabled directly in Nomatron and certificate paths are wrong, startup fails.

Only enable in-process TLS when you actually intend Nomatron itself to terminate TLS.

For a durable deployment, the cleanest flow is:

  1. install the Nomatron binary;
  2. prepare the config file and secrets;
  3. run nomatron database init;
  4. start nomatron server --config ...;
  5. verify /api/v1/health;
  6. put the server behind your normal load balancer or reverse proxy.

If you want to containerize the same runtime shape, that should be documented as a separate Docker-specific server page rather than mixed into this binary-run guide.