Warring Nations

Web and Cloudflare

Docs / Web and Cloudflare. Warring Nations 5.0, pre-release.

The public site works whether or not your Minecraft server is running.

Article 1What it serves

AddressPage
/Landing: status, join box, stats, top nations, wars, events
/wn-public/Territory map
/wn-public/nations wars leaders status eventsData pages
/wn-public/data/<name>.jsonPublic datasets: status, nations, wars, leaders, events
/appThe server's own web shell (sign in, commands)

1.1The JSON routes send Access-Control-Allow-Origin: *, so you can read them from other sites. This website reads status.json that way. Datasets contain only allowlisted fields.

Article 2Cloudflare front

2.1Optional, off by default. It serves the public map and pages from Cloudflare so they never load your game server, and keeps answering while it is down.

  1. In web.toml set [server] enabled = true and [files] cloudflare = true. Restart so web/cloudflare.toml exists.
  2. In it set [cloudflare] enabled = true and origin_url = "https://..." (your TLS proxy or a tunnel in front of [server] port). Restart.
  3. From the console, never from chat: /wnadmin web cloudflare token <token>.
  4. Run /wnadmin web cloudflare setup. It deploys the Worker and a KV namespace, publishes the first snapshot, checks health, and turns origin protection on only after proving it works.
  5. Attach a custom domain or route to the Worker in the Cloudflare dashboard. Setup does not change DNS.

2.2Setup is idempotent. Token permissions: Workers Scripts (Edit), Workers KV Storage (Edit), Account Settings (Read). No queue is used.

Article 3Join box

3.1public_server_address under [cloudflare] (for example play.example.com) shows on the landing page with a Copy button. Empty hides it.

Article 4Offline mirror settings

offline_data
true
offline_data_tick_minutes
5
offline_data_max_writes_per_day
250 (Free plan allows 1,000 KV writes a day for the account; WN uses at most 800)
offline_data_guild_tier
false

Type at least two letters. Esc closes.