Environment variables¶
ENVIRONMENT.md is the
only list of the NINLIL_* environment variables. It has one table row per variable with what it
controls and its default. This page tells you how to find a row and how to read it.
Before you start¶
You know which behavior you want to change. If you only know the setting's name in
appsettings.json, such as DnsServer:Web:HttpPort, the naming rule below
gives the variable.
Steps¶
-
Pick the section of
ENVIRONMENT.mdthat matches the subsystem:Subsystem Section Storage engine and connection Storage engine Sign-in, tokens, SSO, e-mail Identity, authentication & SSO DNS transports and their ports DNS transports Zones, transfers, NOTIFY Authoritative DNS engine Recursion and validation Recursive resolver Filtering, rate limiting, query log Filtering, rewrites, rate limiting & query log DHCP, Router Advertisement, TFTP DHCP, DHCPv6, Router Advertisement & TFTP Web ports, reverse proxy, branding Web host The key ring Data Protection key ring Anything else The table of contents -
Read the Default column. A value in code font is what the setting has when nothing sets it.
*(empty)*is an empty string and*(none)*is no value at all. ATimeSpandefault uses .NET's[d.]hh:mm:ssformat:1.00:00:00is one day and00:05:00is five minutes. - Check the row for a startup rule. A few defaults are changed or filled in while Ninlil starts, for example the Identity password rules, the cluster node id and the JWT signing key. Those rows say so.
- Set the variable in the environment of the Ninlil process
(Configuration).
A path shown as
data/...is inside thedatafolder next to the Ninlil program files.
How a name is built¶
A configuration path is a run of :-separated PascalCase segments. The variable name is NINLIL_
followed by every PascalCase word of every segment, uppercased and joined with _.
DnsServer:Web:HttpPort becomes NINLIL_DNS_SERVER_WEB_HTTP_PORT. IPv4 and IPv6 each count as
one word. ASP.NET Core's double-underscore form (Section__Key) is disabled and does nothing.
A list-valued setting has no variable. Reach it through appsettings.json, the REST API or the
admin console.
Check that it worked¶
Start Ninlil with the variable set and look at the effect the row names. For a port, the log lists it:
NINLIL_DNS_SERVER_WEB_HTTP_PORT=18080 ./ninlil-linux-amd64
Now listening on: http://[::]:18080