Self-update¶
This page lets you switch on the update notifier, which tells you on the console's dashboard when a newer Ninlil release exists, and shows how to apply an update. Ninlil never installs anything: you replace the program yourself, the way you installed it. The README holds the complete reference: Self-update.
The check reads a small JSON document, the release feed, from an address you set. Ninlil
publishes no feed and has no built-in address, so the check does nothing until you set
NINLIL_DNS_SERVER_SELF_UPDATE_RELEASE_FEED_URL.
Host a feed yourself, on any web server, when you want the notice.
Before you start¶
- A web server that serves a JSON file over HTTP or HTTPS and that the Ninlil host reaches.
- An account with
selfupdatesettings:writeto set the address,selfupdate:manageto start a check andselfupdate:readto read the result (the bootstrap administrator has them), and its access token, called<token>below. The commands use the HTTPS port18443from the quick start. -
The version your Ninlil runs. A release build reports a date-based version such as
2026.9.24.1; a build from source reports0.0.0.0. Read it:curl -k https://127.0.0.1:18443/api/self-update -H "Authorization: Bearer <token>"{"configured":false,"currentVersion":"0.0.0.0","latestKnownVersion":null,"updateAvailable":false,"releaseUrl":null,"releaseNotes":null,"lastCheckedAtUtc":"...","lastCheckError":null,"updateInstructions":"No release feed is configured yet -- set one in Self-Update Settings to enable checking for a newer release."}
The examples call the API on 127.0.0.1 with curl -k, which skips the certificate check.
That is safe only on the machine that runs Ninlil; see Self-signed certificate.
Set up the notifier¶
-
Write the feed file. Only
versionis required. Write the version in the same numeric form ascurrentVersion(yyyy.m.d.increment), not the release'sv...R...name:{ "version": "2026.9.24.1", "releaseUrl": "https://example.com/releases/2026.9.24.1", "publishedAtUtc": "2026-09-24T00:00:00Z", "notes": "Free text shown with the notice." }Serve it at an address such as
https://example.com/ninlil-feed.json. For a test, save it asfeed.jsonand run this in that folder, then usehttp://127.0.0.1:18098/feed.jsonas the address. Press Ctrl+C to stop the test server:python3 -m http.server 18098 --bind 127.0.0.1 -
Set the address (
<feed-url>). Ninlil checks that it is an absolute HTTP or HTTPS address and does not fetch it yet. The change reaches the running server within about a second:curl -k -X PATCH https://127.0.0.1:18443/api/self-update-settings -H "Authorization: Bearer <token>" -H 'Content-Type: application/json' -d '{"releaseFeedUrl":"<feed-url>"}'{"note":"Written to the configuration file. This setting is read live, so it takes effect immediately -- no restart required."}The console page is Settings, Self-Update (
/settings/self-update). To set it from the environment, use the variable above and restart. 3. Run a check at once instead of waiting for the next one:curl -k -X POST https://127.0.0.1:18443/api/self-update/check -H "Authorization: Bearer <token>"
Check that it worked¶
The check call returns the result. With a feed that names a version above the running one:
{"configured":true,"currentVersion":"0.0.0.0","latestKnownVersion":"2026.9.24.1","updateAvailable":true,"releaseUrl":"https://example.com/releases/2026.9.24.1","releaseNotes":"Free text shown with the notice.","lastCheckedAtUtc":"2026-11-14T02:55:18.4033862+00:00","lastCheckError":null,"updateInstructions":"Version 2026.9.24.1 is available (currently running 0.0.0.0). Download the new release from https://example.com/releases/2026.9.24.1, replace this server's own binary, and restart it -- this project has no automatic in-place updater, so applying an update is always a manual step."}
(your values differ). The dashboard shows the same notice.
Apply an update¶
When the notice says a newer version is available, install it the way you installed Ninlil. Ninlil has no action that applies an update. Upgrades has the steps for each kind of installation, the snapshot Ninlil takes before it migrates the database and the way back.
Behaviour worth knowing¶
- When checks run. One check runs at startup, then one every
NINLIL_DNS_SERVER_SELF_UPDATE_CHECK_INTERVAL(24 hours by default). The checker wakes every 15 minutes, so the wait rounds up to the next 15-minute tick. WithNINLIL_DNS_SERVER_SELF_UPDATE_ENABLE_AUTOMATIC_CHECKoff, only a manual check runs. - A failed check is retried after 15 minutes. A failure keeps the last good result visible and sets
lastCheckError. AnupdateAvailablethat a check found staystruethrough an outage. - The result is held in memory. After a restart, the status is empty until the startup check finishes.
- Only
versiondecides. The check reports an update when the feed's version is strictly newer than the running one. Ninlil never opensreleaseUrl. - No feed address, no request. The status reads
configured: falseand no failure is logged. - The address is not limited. The feed address can name any host the server can reach, so give
selfupdatesettings:writeonly to people you trust.
When something goes wrong¶
- The settings call answers
400with'<feed-url>' is not a valid absolute HTTP or HTTPS URL.Write the address withhttp://orhttps://. lastCheckErrorreadsResponse status code does not indicate success: 404 (File not found).The address is wrong or the file is missing. Open the address in a browser from the Ninlil host.lastCheckErrorreadsThe release feed document is missing a 'version' field.Add the field to the feed.lastCheckErrorreads'<version>' is not a valid dotted version string.Write the version as numbers separated by dots, for example2026.9.24.1.- The status stays
configured: false. The address is empty. Run step 2.
Next steps¶
- Upgrades
- Backup and restore: take a backup before you update.
- Security