Documentation menu

Registries

Cloudflare

A free registry that runs on your own Cloudflare account. Deploy it in one click, nothing to run yourself.

The Cloudflare registry works like Redis, but runs on your own Cloudflare account as a Worker with one Durable Object. It is in the Link repo under cloudflare-registry/. One deployment is one network.

Deploy it

Deploy to Cloudflare

The button copies the registry into your account, creates the Durable Object and asks for LINK_TOKEN. Pick a long random value; it is the password to your network.

When it finishes, Cloudflare shows a URL like https://link-registry.<you>.workers.dev.

Or deploy it by hand

From the cloudflare-registry folder:

cloudflare-registryShell
npm install
npx wrangler login
# paste a long random string, e.g. from: openssl rand -hex 32
npx wrangler secret put LINK_TOKEN
npx wrangler deploy

Connect your servers

Put the URL and the token in link.json on every server:

mods/Link_Link/link.jsonJSON
{
  "serverId": "sw-1",
  "group": "skywars",
  "host": "play.example.com",
  "port": 5521,
  "backend": "http",
  "http": {
    "url": "https://link-registry.you.workers.dev",
    "token": "your LINK_TOKEN"
  }
}

As with Redis, host is required and must be reachable from a player’s game. The Worker creates the network secret on the first request, so there is nothing else to copy.

What it costs

Each server sends a heartbeat every 10 seconds, about 8,640 requests per server per day.

  • Free plan: 100,000 requests a day, enough for about 10 servers.
  • Workers Paid ($5 a month): includes 10 million Worker requests and 1 million Durable Object requests a month. Past that, each server adds roughly $0.20 a month.

Between heartbeats, Link counts the players it sends itself, so matchmaking stays accurate with the slower beat.

Run it locally

cloudflare-registryShell
echo "LINK_TOKEN=dev-token" > .dev.vars
npx wrangler dev

Keep the token secret

The token gives full access to the registry: anyone who has it can add a server to your network and sign transfers. If it leaks, set a new one with npx wrangler secret put LINK_TOKEN and update every server.

The Worker speaks a small HTTP protocol. Any server that speaks it works as a Link registry: see the registry protocol.

Something wrong or missing on this page? Open an issue on GitHub.