Skip to content

Environment variables

Each key in config.toml has an environment variable. The name starts with NETRONOME__, with two underscores. An environment variable overrides the value in the configuration file. For the meaning of each key, see Configuration file.

  • Netronome ignores a variable with an empty value. NETRONOME__TAILSCALE_AUTH_KEY is the only exception: an empty value clears the key.
  • A boolean accepts true, false, 1, 0, t, and f. Netronome ignores a value that it cannot parse, and keeps the value from the file.
  • A list uses commas between the items, for example 127.0.0.1/32,10.0.0.0/8.
  • At startup, Netronome loads a .env file from the working directory, if one exists.
VariableKeyDefault
NETRONOME__CHECK_FOR_UPDATEScheck_for_updatestrue

For PostgreSQL, see Database.

VariableKeyDefault
NETRONOME__DB_TYPEdatabase.typesqlite
NETRONOME__DB_PATHdatabase.pathnetronome.db
NETRONOME__DB_HOSTdatabase.hostlocalhost
NETRONOME__DB_PORTdatabase.port5432
NETRONOME__DB_USERdatabase.userpostgres
NETRONOME__DB_PASSWORDdatabase.passwordempty
NETRONOME__DB_NAMEdatabase.dbnamenetronome
NETRONOME__DB_SSLMODEdatabase.sslmodedisable

For BASE_URL, see Reverse proxy.

VariableKeyDefault
NETRONOME__HOSTserver.host127.0.0.1
NETRONOME__PORTserver.port7575
NETRONOME__BASE_URLserver.base_url/
NETRONOME__GIN_MODEserver.gin_modeempty (release)

Netronome removes quotes around the value of NETRONOME__BASE_URL.

VariableKeyDefault
NETRONOME__LOG_LEVELlogging.levelinfo

For the whitelist and trusted proxies, see Authentication.

VariableKeyDefault
NETRONOME__AUTH_WHITELISTauth.whitelistempty
NETRONOME__AUTH_TRUSTED_PROXIESauth.trusted_proxiesempty
NETRONOME__SESSION_SECRETsession.session_secretempty

Do not put spaces after the commas in NETRONOME__AUTH_WHITELIST. Netronome does not remove them, and an entry with a space is not a valid CIDR network.

VariableKeyDefault
NETRONOME__OIDC_ISSUERoidc.issuerempty
NETRONOME__OIDC_CLIENT_IDoidc.client_idempty
NETRONOME__OIDC_CLIENT_SECREToidc.client_secretempty
NETRONOME__OIDC_REDIRECT_URLoidc.redirect_urlempty
NETRONOME__OIDC_SCOPESoidc.scopesempty (openid, profile)

NETRONOME__OIDC_SCOPES accepts commas or spaces between the scopes.

For the test types, see Speed tests.

VariableKeyDefault
NETRONOME__SPEEDTEST_TIMEOUTspeedtest.timeout30
NETRONOME__SPEEDTEST_CONNECTIONSspeedtest.connections0
NETRONOME__IPERF_TEST_DURATIONspeedtest.iperf.test_duration10
NETRONOME__IPERF_PARALLEL_CONNSspeedtest.iperf.parallel_conns4
NETRONOME__IPERF_TIMEOUTspeedtest.iperf.timeout60
NETRONOME__IPERF_PING_COUNTspeedtest.iperf.ping.count5
NETRONOME__IPERF_PING_INTERVALspeedtest.iperf.ping.interval1000
NETRONOME__IPERF_PING_TIMEOUTspeedtest.iperf.ping.timeout10
NETRONOME__LIBRESPEED_TIMEOUTspeedtest.librespeed.timeout60
VariableKeyDefault
NETRONOME__DEFAULT_PAGEpagination.default_page1
NETRONOME__DEFAULT_TIME_RANGEpagination.default_time_range1w
NETRONOME__DEFAULT_LIMITpagination.default_limit20

For the setup, see GeoIP.

VariableKeyDefault
NETRONOME__GEOIP_COUNTRY_DATABASE_PATHgeoip.country_database_pathempty
NETRONOME__GEOIP_ASN_DATABASE_PATHgeoip.asn_database_pathempty

For the setup, see Packet loss.

VariableKeyDefault
NETRONOME__PACKETLOSS_ENABLEDpacketloss.enabledtrue
NETRONOME__PACKETLOSS_MAX_CONCURRENT_MONITORSpacketloss.max_concurrent_monitors10
NETRONOME__PACKETLOSS_PRIVILEGED_MODEpacketloss.privileged_modetrue
NETRONOME__PACKETLOSS_MTR_ENABLE_DNSpacketloss.mtr_enable_dnsfalse
VariableKeyDefault
NETRONOME__MONITOR_ENABLEDmonitor.enabledtrue

The netronome agent command reads these variables. For the setup, see Agents and Docker agents.

VariableKeyDefault
NETRONOME__AGENT_HOSTagent.host0.0.0.0
NETRONOME__AGENT_PORTagent.port8200
NETRONOME__AGENT_INTERFACEagent.interfaceempty. See The interface setting.
NETRONOME__AGENT_API_KEYagent.api_keyempty
NETRONOME__AGENT_DISK_INCLUDESagent.disk_includesempty
NETRONOME__AGENT_DISK_EXCLUDESagent.disk_excludesempty
NETRONOME__AGENT_DISABLE_SYSTEM_METRICSagent.disable_system_metricsfalse

For the setup, see Tailscale.

VariableKeyDefault
NETRONOME__TAILSCALE_ENABLEDtailscale.enabledfalse
NETRONOME__TAILSCALE_METHODtailscale.methodauto
NETRONOME__TAILSCALE_AUTH_KEYtailscale.auth_keyempty
NETRONOME__TAILSCALE_HOSTNAMEtailscale.hostnameempty
NETRONOME__TAILSCALE_EPHEMERALtailscale.ephemeralfalse
NETRONOME__TAILSCALE_STATE_DIRtailscale.state_dir~/.config/netronome/tsnet
NETRONOME__TAILSCALE_CONTROL_URLtailscale.control_urlempty
NETRONOME__TAILSCALE_AGENT_PORTtailscale.agent_port and tailscale.agent.port8200
NETRONOME__TAILSCALE_AUTO_DISCOVERtailscale.auto_discovertrue
NETRONOME__TAILSCALE_DISCOVERY_INTERVALtailscale.discovery_interval5m
NETRONOME__TAILSCALE_DISCOVERY_PORTtailscale.discovery_port8200
NETRONOME__TAILSCALE_DISCOVERY_PREFIXtailscale.discovery_prefixempty

Discovery does not filter by hostname prefix. The server probes every online peer, whatever the value of the prefix variables.

These variables are deprecated but still work. The MONITOR variables also set the matching new key.

VariableKeyDefault
NETRONOME__TAILSCALE_PREFER_HOSTtailscale.prefer_hostfalse
NETRONOME__TAILSCALE_AGENT_ENABLEDtailscale.agent.enabledfalse
NETRONOME__TAILSCALE_MONITOR_AUTO_DISCOVERtailscale.monitor.auto_discovertrue
NETRONOME__TAILSCALE_MONITOR_DISCOVERY_INTERVALtailscale.monitor.discovery_interval5m
NETRONOME__TAILSCALE_MONITOR_DISCOVERY_PORTtailscale.monitor.discovery_port8200
NETRONOME__TAILSCALE_MONITOR_DISCOVERY_PREFIXtailscale.monitor.discovery_prefixempty

If NETRONOME__TAILSCALE_PREFER_HOST is true and NETRONOME__TAILSCALE_METHOD is not set, Netronome uses the host method.

These two variables have no key in config.toml. Release builds contain the organization ID, so they do not read NETRONOME__POLAR_ORG_ID.

VariableDefaultDescription
NETRONOME__POLAR_ORG_IDemptyThe Polar organization ID for premium theme licenses. A build from source without this value turns premium themes off.
NETRONOME__POLAR_ENVIRONMENTempty (production)The Polar API to use: production, sandbox, or development.