Warda-DNSDocs Warda: from ward — to protect, guardian
v0.9.3

From 0.7.5. Administration → Customer area (administrators, area system; internal/admin/account.go, ui/src/pages/CustomerArea.svelte, route /customer-area, after Subscription in the menu; from 0.7.8 a page of its own — in 0.7.5 to 0.7.7 a zone of the System page, which keeps the line of the online service in use) links this box to an account of the customer area of Warda, https://account.warda-dns.com (warda-portal), which then gives its plan in a statement signed for this box, renewed every day. Everything goes through the online service of Warda (warda-cloud): the box never calls the customer area itself, and nothing of the network is sent, only the key of the box.

  • The page (from 0.7.8): the card This box (its state, and once it holds a statement its plan, Valid until, Generation, High availability; Last renewal, Key of the box, Renew now), then two cards side by side, Link to an account and Unlink from the account (the second only when the box is in an account). An account that reads the system without changing it sees the page with its buttons off, never the code.
  • Identity: the box is known by its key at the online service (its public Ed25519 key, base64url, 43 characters: Key of the box on the card), never by its name, address or identifier. The key goes with the backups (see Backups).
  • Link this box: the box asks a code (POST /v1/account/link of the online service): WL-XXXX-XXXX, valid 15 minutes, once, 10 a day by box; the card shows it with Copy and Open the customer area (https://account.warda-dns.com/link?code=WL-…); the customer types it under My boxes → Add a box and names the box. New code makes another. A box belongs to one account at most: to move it, unlink it first. From 0.7.8 the card gives the three steps (ask a code, sign in to the customer area, type the code under My boxes → Add a box) and the time left of the code, second by second ("Valid once, for 14:32 more (until …)"). A code only works in the customer area, with the account signed in: alone it gives access to nothing. A new code unlinks nothing: on a box already in an account, no unlink is asked to the customer area, the statement and its plan stay, the next renewal goes on with the same generation (TestLinkCodeKeepsLink); the card of a linked box says no code is needed.
  • Unlink (confirmed): the box leaves its account (DELETE /v1/account/link); the statement kept is forgotten, the plan becomes free. The customer can also unlink it from the customer area. From 0.7.8 the card says what the unlink does before it is asked (the box leaves its account; its plan goes back to free, everything staying open during the beta; the subscription stays on the account; the box can be linked again at any time with a new code), and the password of the account signed in on the box is asked again: a session left open is not enough. Without the password, or with a wrong one, the box answers 401 and asks nothing to the online service (the refusal is in the administration log: auth.failure, wrong password (confirmation)).
  • Linking again (from 0.7.8, warda-portal 0.7.8): the plan belongs to the account, not to the box. After an unlink — from the box or from the customer area — the subscription stays on the account; the customer links the box again alone, with a new code, and the next statement carries the plan again. Nothing is asked to the Warda team (see warda-portal).
  • The statement: the JSON of the plan (v, box_key, account, plan, users, sites, ha_peer, generation, issued, expires, beta) and its signature. The box checks the exact bytes received with the public keys of the customer area embedded in Warda (planKeys, several for a change of key), then v 1, a known plan, its own key in box_key, and expires in the future; it keeps the statement as received (checked again at each start). A statement lives 14 days and, from 0.8.0, also ends once the box has run 14 days holding it (the running time counted on the monotonic clock, written every 10 minutes and kept across starts, each start counting 10 minutes for the time not written; a renewal starts the count again): a box cut off from Warda with its clock set back no longer keeps its plan for ever.
  • The plan of GET /api/v1/subscription is the one of the last valid statement; without one (none, expired, unlinked) it is free. Beta unchanged: while the subscriptions are closed, every function stays open whatever the plan (see Plans).
  • Renewal (task plan, Plan from the customer area): 1 to 5 minutes after the start, then every 24 hours give or take an hour (from 0.8.0 every hour while the box is refused, below); Renew now asks at once (at most once a minute). It sends the generation of the statement held (0 without one), the key of the other box of a pair of high availability, the version of Warda and, from 0.8.0, its installation and the attempt (an identifier of the renewal, kept until it is answered and repeated by a retry) (POST /v1/plan). Answers: a new statement, with how the plan of the account covers this box (coverage, below); linked: false (in no account: the statement is forgotten); 409 (below); anything else (the online service or the customer area not answering, 503) keeps the last statement and says why under Last renewal.
  • One Subscription, one box (from 0.8.0, warda-portal 0.8.0): a Subscription covers the number of boxes set by the customer area (one by default; the box does not know it), during the beta each with the other box of its pair of high availability (after the beta, a pair needs Warda Business); Warda Business covers every box of the account (each is a site). A box beyond is signed the free plan. The card shows why: "Your Subscription already covers as many boxes as it allows: this box is on the free plan… choose "Use the plan on this box"", the number being shown in the customer area under My boxes, or, for a box linked before 0.8.0 beyond its Subscription, "This box keeps the plan until {date} as a courtesy" (90 days after the upgrade of the customer area). The statement decides; coverage (slot, peer, courtesy, none, plan) and courtesy_until only explain it.
  • Refused: a copy or a takeover (409). "The same key is used by another box" (state clone): another copy of this box renewed meanwhile (a copy of the disk, or an old backup restored while the other runs). "Waiting for your confirmation" (state takeover, from 0.8.0): the key renews from another installation than the one that holds the plan — most often a backup restored on new or reinstalled hardware (Backups). From 0.8.0 a box refused drops its statement at once (free plan, "Until then this box is on the free plan."; everything stays open during the beta), keeps its generation and asks again every hour. The customer chooses the box with Make this the box on its page in the customer area, or confirms a takeover with a link code asked on the new box (the card Link to an account stays shown in that state: "Typed in the customer area, a code asked here confirms that this box takes over the plan of its key…"). The other copy is refused from its next renewal and goes to the free plan. Up to 0.7.13 a copy refused kept its statement up to 14 days, and a backup restored elsewhere was served at once while the original kept its plan: one Subscription could run on two boxes. The state of the plan belongs to the key of the box (box_key in meta account): after a restore that brought another key, the generation of the old key is never presented.
  • Changes of box (a copy chosen, a takeover confirmed, the plan moved to another box, a box linked again within 30 days of its unlink) are limited by the customer area, 3 in 30 days by default; beyond, the customer writes to [email protected] (see warda-portal).
  • High availability: the two boxes of a pair tell each other their key at every synchronisation (ha.sync, see High availability), and each sends the key of the other with its renewal. The customer area validates the pair when both boxes are linked to the same Warda Business account and name each other (in the beta, a pair it would refuse is validated, flagged beta); the statement then names the peer, and the card says Pair validated with the other box (or that it names another box than the one paired here).
  • On from 0.7.9: Warda carries the public key of the customer area (planKeys: Zin-OmARhef9UOwgL2TGd3IJ-uo45vvXAPLwOi-Z6JY; its private key is in OpenBao since 2026-10-02, see warda-portal). GET /api/v1/account answers active: true, and a box in no account the state not_linked (no longer inactive). The task plan runs on every box that has the online service (1 to 5 minutes after the start, then every 24 hours give or take an hour), and Renew now really asks. What each answer gives: in no account, the plan free, without an error; the online service or the customer area not answering (503, no answer), the last statement kept and the reason under Last renewal; 409, the state clone; a statement signed by another key, refused (the one held before stays, the reason under Last renewal). Beta: the customer area runs with the subscriptions closed, so every statement carries beta: true and nothing is locked, whatever the plan. In 0.7.5 to 0.7.8 planKeys was empty: linking and unlinking worked, but the box asked no statement, the task plan did not run, and the page said Plan statements are not active yet (state inactive) — what a build without a key still does (TestPlanInactive).

The statement, its generation, the last renewal and the code are kept in the database of the box (meta account), the installation in meta installation: not in the backups, and not given to the secondary of a pair — they belong to each box. The card This box shows the Installation ("Tells this installation of Warda from a copy restored elsewhere with the same key. It never goes into a backup…"). The administration log records account.link, account.unlink and, from 0.8.0, backup.restored.elsewhere.

What the licence protects, and what it does not. It stops a backup, a restore, a copy of the disk or a box linked again from running one Subscription on two boxes with the software as shipped. The key is shared by the copies: what warda-cloud decides by the key (WARDA_CLOUD_ENFORCE_PLANS, off during the beta) follows the plan of the account for that key, and the relay takes one connection per key (copies replace each other). A box that never reaches Warda keeps its last statement at most 14 days, of its clock and of running time; so a copy of the whole disk cut off from Warda keeps the statement it copied for what is left of them (copying the disk again every 13 days keeps a copy on the plan). Two boxes taking the plan in turn with Put the subscription on this box are bounded by the changes of box (3 in 30 days, mails to the owner). A modified binary of Warda, or the data of the box edited as root (the generation, the installation, the running time), can unlock anything on its own machine.

APIs (administrators; reading needs the area system, the rest its change): GET /api/v1/account (available — the online service is set —, active — a key of the customer area is known —, state inactive/not_linked/linked/expired/clone/takeover (from 0.8.0), box_key, plan, installation, coverage, courtesy_until (from 0.8.0), issued, expires, generation, beta, ha_peer, ha_validated, renewed, tried, error, and code, code_expires, link_url while the code is valid, only for the accounts that change the system); POST /api/v1/account/link (a code); DELETE /api/v1/account/link (unlink; from 0.7.8 with the body {"confirm_password": "…"}, the password of the account of the session: 401 without it or with a wrong one, before anything is asked to the online service; the API token does not need it, as for the maintenance); POST /api/v1/account/refresh (renew now: from 0.7.9 it really renews, 200 with the new state, not_linked for a box in no account; 409 with the reason when it was asked less than a minute ago or when the online service or the customer area does not answer; the plan statements are not active yet only in a version without a key, 0.7.5 to 0.7.8). 409 without the online service ("The online service of Warda is not set on this installation: the customer area needs it.") and when the customer area does not answer (the customer area is not available) or after 10 codes a day (too many codes asked today, try again tomorrow).