Skip to main content

Configuration

Settings come from NOMCTL_* environment variables; command-line flags override them. nomctl env prints this table from the binary.

VariableDefaultDescription
NOMCTL_DEBUGfalseVerbose logging; stream external command output to the terminal
NOMCTL_LOG_FILE/var/log/nomctl.logPlain-text log file (also receives external command output)
NOMCTL_SKIP_PREFLIGHTfalseSkip the CPU/RAM/NTP/Internet pre-flight checks
NOMCTL_WORK_DIR/opt/nomctlWhere the Go toolchain and source checkout are kept
NOMCTL_INSTALL_DIR/usr/local/binWhere the node binary is installed
NOMCTL_ZNN_DIR/root/.znnNode data directory used by backup, restore and resync. Not passed to znnd, which uses its own default
NOMCTL_REPO_URLhttps://github.com/zenon-network/go-zenon.gitGit repository to build
NOMCTL_BRANCH_NAMEmasterGit branch to build
NOMCTL_BINARY_NAMEznndNode binary name (also the cmd/ package built)
NOMCTL_SERVICE_NAMEgo-zenonsystemd service name
NOMCTL_GO_VERSION1.23.0Go toolchain version used to build the node
NOMCTL_PILLAR_NAMEunsetPillar shown by status/top when alerts are not set up (the alerts config takes precedence)
NOMCTL_REPO0x3639/nomctlGitHub repository nomctl upgrade downloads releases from
NOMCTL_UPDATE_CHECKtrueCheck GitHub for newer nomctl and go-zenon in status/top and the update_available alert (cached 6 h)
NOMCTL_BACKUP_DIR/backupDirectory that stores backup archives
NOMCTL_MAX_BACKUPS7Number of backups to retain
NOMCTL_BACKUP_CADENCE_DAYS0Days between scheduled backups (0 = every run)
NOMCTL_BACKUP_HOURunsetHour (0-23) for scheduled backups; unset = derived, between 02:00 and 04:59
NOMCTL_MIN_FREE_SPACE_KB15728640Minimum free space in the backup directory (15 GB)
NOMCTL_NODE_EXPORTER_VERSION1.6.1Prometheus node_exporter version
NOMCTL_PROMETHEUS_VERSION2.47.0Prometheus version
NOMCTL_INFINITY_PLUGIN_VERSION2.10.0Grafana Infinity datasource plugin version
NOMCTL_GRAFANA_ADMIN_USERadminGrafana admin user
NOMCTL_GRAFANA_ADMIN_PASSWORDadminGrafana admin password; a non-default value is applied to Grafana on install
NOMCTL_GRAFANA_HTTP_ADDR127.0.0.1Address Grafana listens on (0.0.0.0 to expose it)
NOMCTL_RELAY_URLbuilt inAlerts relay used by alerts setup when --relay is not given

Files nomctl writes

PathWritten by
/etc/systemd/system/go-zenon.servicedeploy
/etc/systemd/system/nomctl-backup.service, .timerbackup --schedule
/etc/systemd/system/nomctl-alerts.servicealerts setup
/etc/nomctl/alerts.json (0600)alerts setup, alerts set, enable, disable
/run/nomctl/alerts-state.jsonthe alerts daemon, read by alerts status
/run/nomctl.lockbackup, restore, resync, deploy while running
/run/nomctl/update-check.jsonthe cached update check
/usr/local/bin/nomctl.previousupgrade, for --rollback
/etc/systemd/timesyncd.confpre-flight, only if NTP is not time.cloudflare.com

The alerts file

/etc/nomctl/alerts.json holds the relay URL, node id and secret, the node name, the pillar name, the sampling interval, and per-alert enabled and thresholds. Edit it with nomctl alerts set, enable and disable; hand edits are picked up on the next systemctl kill -s HUP nomctl-alerts, with out-of-range thresholds clamped. The service unit carries the service, data and backup settings that were in effect at setup, so the daemon watches the node you configured even if the environment changes.