[ BEAST-GATE ]

One key per device. One audit line per request.

The one place on the inference path where a device has an identity

The model server has no users: one flat key, no per-caller limits and no record of who asked. beast-gate is the hop in front of it, the one place on the inference path where a device has an identity.

[ HOW IT WORKS ]

What every remote request passes through

Choose a step to light its part of the picture.

Laptop
An enrolled laptop
Phone
An enrolled phone
Revoked
Unknown or revoked: stopped
beast-gate
beast-gate: key, routes, limits
Audit
Audit: one line per completion
Engine
The engine, which has no users of its own
Describe this diagram

Three devices stand on the left. Two of them, an enrolled laptop and an enrolled phone, send requests that pass through a gate in the middle and reach the engine on the right. The third device, faded, is unknown or revoked: its request stops at the gate. From the gate a line goes to a document behind it, the audit record. Tokens return from the engine through the gate.

OPT-IN · v1.1

beast-gate has shipped since v1.1 and is off by default; EDGE_GATE=true turns it on. With it off, a tailnet device that reaches the inference port reaches the engine’s whole route table, which is acceptable only on a tailnet where you own every device.

At the edge · documented defaults

  • ROUTE ALLOWLIST

    Routes a remote caller can reach

    5the rest answer 404

    Health, the model list, chat completions, completions and embeddings.

  • ADMISSION · DEFAULT

    Generations a device may start

    120a minute

    With an in-flight cap beside it. Over either, the answer is 429 with Retry-After.

  • FAILS CLOSED

    With no device enrolled

    401for every remote caller

    An empty registry never means everyone is welcome.

[ ON THE MAP ]

Where it sits in the system

beast-gate stands between your devices and inference, and is the one place on that path where a device has an identity.

[ 01 · WHY ]

The engine has no users

A rig only you can reach needs none of this. Once a second person or device shares it, three properties of the model server matter. The project verified each in the llama.cpp source it builds.

[ 02 · CONTROLS ]

What each remote request passes through

With the gate on, the tailnet reaches the gate and the gate reaches the engine on loopback. The rig’s own services are untouched: the browser interface and the agent router keep talking to the engine directly, exactly as before.

beast-gate controls, from the guide
ControlBehaviour
Per-device keys
One bearer key per device, matched against a stored sha256. The registry is reloaded while the gate runs, so a revocation blocks that device’s next request within seconds, with no engine restart. A generation already running is cut off too: the gate re-checks the caller’s enrolment every five seconds.
Route allowlist
Only health, the model list, chat completions, completions and embeddings. Every other path answers 404, not 403, so a remote caller learns nothing about what exists.
Tenancy
A slot id chosen by the client is always removed and is set again only from the server’s own device-to-slot map. A request body the gate cannot parse as a JSON object is refused and never forwarded.
Inline media only
An image, audio or video part must carry its data inline. A part that names a URL is refused, because the engine would otherwise fetch it from the rig’s own loopback.
Session isolation
Conversation ids are namespaced per device, so two devices can neither collide on nor cancel each other’s streams.
Admission control
A token bucket and an in-flight cap per device; the excess gets 429 with Retry-After. Both count generations, not HTTP requests, so a request that fans out into several prompts pays for each.
Audit and metering
One line per completion: request id, device, the enrolment’s own id, model, status, duration, and prompt and completion tokens. A request the client abandons is recorded as a disconnect, not as a success.
Introspection
The full device roster and per-device usage need a token that exists only on the rig. An enrolled device sees its own usage and nothing else.

[ 03 · ENROLMENT ]

Enrol, revoke, rotate

A device is enrolled on the rig with one command, which prints its key once. The registry keeps only the key’s sha256, so a key cannot be recovered, only rotated.

Revoked devices stay in the registry so the audit trail keeps resolving their id. A device that is removed and enrolled again under the same name is a distinct device in the trail: the audit joins on the enrolment’s own id, not on the name.

A registry that is corrupt or half written keeps the last good device map instead of opening up. One that cannot be read when the gate starts refuses every caller.

./scripts/clients.sh enroll <id> --label "…"
./scripts/clients.sh list
./scripts/clients.sh revoke <id>
./scripts/clients.sh rotate <id>

[ 04 · LIMITS ]

What the gate is not

The gate authenticates a device on the inference path. It is one of two identity layers, and it does not replace the other.

beast-slot: the client that presents the key · Clients

[ 05 · SOURCES ]

Where this page comes from

Everything above restates the project’s own documents, read at upstream commit 8dfddb3c (2026-11-30). Nothing here was measured for this page.