Remote access
Kraft binds 127.0.0.1 by default, so only this machine reaches it. Any other
bind makes every client, this machine included, sign in with a password.
Before you start
- A password. Kraft refuses any bind off loopback until one is set.
- The hostname or address you type in the other device's browser. It goes
in
allowed_hosts. - The port. It is 8765 unless you set
portinaccess.yamlor pass--port. Use your port wherever this page says 8765. access.yaml, which lives in$KRAFT_CONFIG_DIRwhen you set it, else in$KRAFT_HOME/config/(by default~/.kraft/config/).
Which of these you need depends on the way in you pick. Choose a way comes next.
Choose a way
Kraft skips auth for local clients on 127.0.0.1. Off loopback, it checks
browser Host headers against allowed_hosts.
Pick the narrowest way that works, then follow only its section. The first three end at Restart Kraft and Check it worked. The other two are on the proxy page: the board behind a reverse proxy you run, and a proxy for webhooks and scripts, which needs no restart of Kraft.
| Way | Choose it when | It needs |
|---|---|---|
| Over Tailscale (recommended) | Your devices are on one tailnet. Only they can reach the board, and your LAN can't. | Tailscale running before Kraft, a hand edit of access.yaml, and a restart. |
| On your local network | The phone and this machine share a network you trust. | A 0.0.0.0 bind, which listens on every network this machine is on, and a restart. |
| Over a Cloudflare Quick Tunnel | You can't use Tailscale, and accept the board on the public internet. | cloudflared, a 0.0.0.0 bind, a long random password, and a restart. |
| Behind a reverse proxy you run | You run Caddy, nginx or another proxy, and want the board at a name of your own. | A 0.0.0.0 bind, a password and the name in allowed_hosts. |
| Put a proxy in front of Kraft | A tunnel or reverse proxy on this machine gets a 403 for every request, and what must pass through is webhooks or scripts, not the board. | The proxy's Host setting, a password and an X-Forwarded-For the proxy sets itself. |
The path a request takes in each way:
- Over Tailscale
- phone
- tailnetTailscale encrypts
- Kraft on the Tailscale addresspassword, name in allowed_hosts
- On your local network
- phone
- your LANplain http, the network can read it
- Kraft on 0.0.0.0password, name in allowed_hosts
- Over a Quick Tunnel
- phone
- cloudflaredpublic internet, the https URL
- Kraft on 0.0.0.0the LAN reaches the port too; password, name in allowed_hosts

Set a password
Kraft refuses any bind off loopback until a password is set, both at
kraft admin start and on the Settings › Access screen. On 127.0.0.1 the
screen lists the password under Not used on 127.0.0.1, and picking
Local network asks for one: Set and switch saves the password and the
0.0.0.0 bind in one step (on a phone, a Set a password sheet does the
same). The button reads Switch when a password is already set.
Once the bind is off loopback, every browser signs in, including one on the
machine itself. Kraft stores only the password's hash, in access.yaml. The
Access screen's Password card changes it once Kraft is off loopback.
To set a password and leave the bind alone, send it by itself while Kraft is
running on 127.0.0.1, which is the default. kraft admin health shows whether
a server answers; if none does, start one with kraft admin start --detach. This reads it without echo and passes it through pipes
between built-in and jq commands, so it stays out of your shell history and
the process list. It needs jq. Run read first, type the password, and press
Enter:
IFS= read -rs PW
Then send it and clear it:
printf '%s' "$PW" | jq -Rs '{password: .}' | curl -X PUT http://127.0.0.1:8765/api/access \
-H 'Content-Type: application/json' --data @-
unset PW
You know it worked when the reply shows "password_set":true.
Over Tailscale
The Access screen offers only 127.0.0.1 and 0.0.0.0, so set a Tailscale
bind in access.yaml by hand. Start Tailscale before Kraft: the Tailscale
address doesn't exist until Tailscale is up, and the bind fails without it.
- Set a password with the commands in Set a password.
They leave the bind on
127.0.0.1. Picking Local network on the Access screen would also set one, but it writesbind: 0.0.0.0with it. - Find the machine's Tailscale address and name.
tailscale ip -4prints the address, such as100.101.102.103:tailscale ip -4
The first line oftailscale statusnames this machine:tailscale status - Pause any active item. Once you edit
bindin the next step, thekraftCLI dials the new address, where nothing listens yet, sokraft admin restartcan't list the agents it is about to end. - In
access.yaml, setbindto that address and add the machine's tailnet name toallowed_hosts:config/access.yamlbind: 100.101.102.103 allowed_hosts: - mybox.tailnet-name.ts.net
Settingbindin the file, rather than passing--host, keeps thekraftCLI in your other shells pointed at the same address, and keeps the bind across a restart. Runkraft admin doctorand read itsaccess.yamlrow to confirm the file parses. Itsserverrow fails until the restart.
From here until the restart, change nothing on the Access screen. Opening it, or using its Restart Kraft button, is safe. A change made there rewritesaccess.yamlfrom what the running server holds, which reverts your hand-editedbindandallowed_hosts. - Restart Kraft so it reads the new bind.
- From a device on your tailnet, open
http://mybox.tailnet-name.ts.net:8765/. Tailscale encrypts the traffic between your devices.
After the restart the Access screen shows Local network as chosen, since the
bind is off loopback. Don't select it: that writes 0.0.0.0 over your Tailscale
address.
On your local network
- Open Settings › Access and choose Local network (
0.0.0.0). The screen asks for what is missing: a password if none is set yet, and the name or address your phone types, filled in with this machine's LAN address (192.168.1.20). - Select Set and switch, which reads Switch when a password is already set. The bind, the password and the host are saved at once, and the bind waits for a restart. The Allowed hosts, Password and Sessions cards appear.
- Under Allowed hosts, add any other name or address you type in the
phone's browser. The list is for the names other devices use: on the machine
itself the board keeps working at
http://127.0.0.1:8765, behind the same sign-in. An empty list refuses every other device's browser, and the card then offers this machine's address. - Restart Kraft so it binds the new address.
- From the phone, open
http://192.168.1.20:8765/and sign in. The traffic is plain HTTP, so anyone on the network can read it.
Over a Cloudflare Quick Tunnel
*.trycloudflare.com URL reaches the login page, and the password is the
barrier.Kraft locks an address out for 15 minutes after 5 failed logins, but
if the tunnel doesn't pass on the visitor's address, every visitor counts as
one address and a stranger's guesses can lock you out too. See
Login.Open only the tunnel's https:// URL, so the
session cookie is marked Secure. The tunnel also needs a 0.0.0.0 bind,
which listens on every interface, your LAN included. If your LAN is
untrusted, block the port at your firewall for other interfaces.- Run
cloudflared tunnel --url http://localhost:8765. It prints a*.trycloudflare.comURL. The URL changes every timecloudflaredstarts: after the first time, add each new hostname under Allowed hosts, where it applies at once, with no restart. - On the Access screen, choose Local network, setting the password if it
asks. The phone's host field is pre-filled with the machine's LAN address:
replace it with the tunnel's hostname. Or, with a password already set, write
bind: 0.0.0.0and the hostname underallowed_hostsinaccess.yaml. - Restart Kraft so it binds the new address.
Keep the bind in access.yaml, not in kraft admin start --host 0.0.0.0.
kraft admin restart starts the server from access.yaml alone, so a bind you
passed with --host is gone after a restart. The tunnel then reaches a server
on 127.0.0.1, which skips auth for local clients. Only the hostname check
stands between it and the internet: Kraft refuses a request addressed to any name
but 127.0.0.1, localhost or [::1].
Behind a reverse proxy you run
Caddy, nginx or another proxy you run can serve the board at a name of your own. Put a proxy in front of Kraft has the steps and what the proxy must pass.
Restart Kraft
The ways above end here. Kraft binds a new address, and writes a new token, only when it starts. Pick the option that matches how Kraft runs:
- When Kraft runs as a service, the Access screen offers Restart Kraft.
- Otherwise run
kraft admin restart, which reads the new bind fromaccess.yaml. - A server running in a terminal only stops, so start it again there with
kraft.
A restart leaves the local steps of worktree items running. It ends the agent
of every active item that runs in place, and each stops as failed until you
retry it. The dialog says how many. Pause them first to avoid that: see
A restart leaves local steps running.
When Kraft is back, resume what you paused with kraft item resume ID.
If Kraft doesn't come back, see If Kraft doesn't come back.
Check it worked
For the first three ways:
- From the phone or other machine, request the health endpoint, which needs no
login:
curl -s http://mybox.tailnet-name.ts.net:8765/api/health
Replace the address with your way's:http://192.168.1.20:8765on a local network,https://<your-tunnel-hostname>through a Quick Tunnel. A JSON status confirms the request reaches Kraft. - Open the same address without
/api/healthin a browser. You should see the login page. Sign in with your password. - On a computer, the sidebar reads live next to Kraft once the board's event connection is open, and the board updates without a reload.
Behind a reverse proxy you run, check as the proxy page says.
If it fails
If Kraft doesn't come back
A restart stops the old server first, then starts one on the new bind. If
Tailscale is down or the address is mistyped, the start fails. The kraft
CLI then dials the new address, where nothing answers. For a server started with
--detach, kraft admin restart prints the error and where the whole log is:
kraft: detached start failed: <the last error line of the log>
<the end of the server's output>
kraft: the whole log is /home/you/.kraft/run/logs/server.log
The first line names the cause only when the log has a last line that looks
like SomeError: text, and then it is that line. Otherwise the cause is in the
end of the output. A server you ran in a terminal is only stopped: kraft admin restart
prints kraft: was running attached to a terminal - start it again there: kraft
and exits 1, and the error shows in that terminal when you run kraft.
If the server doesn't answer within 10 seconds, it prints
kraft: detached start did not come up within 10s - check <the log's path>.
A service is restarted through its manager instead: when the board stays
unreachable, read the end of run/logs/server.log.
- Fix the cause, or put the old bind back: set
bindinaccess.yamlto what it was before your edit (127.0.0.1if you never changed it). - Start Kraft again:
kraft admin start --detach, orkraft admin restartwhen it runs as a service, orkraftin the terminal where you ran it.
You know it worked when the status row of kraft admin health says ok.
The sidebar stays on reconnecting…
Check that anything between the browser and Kraft, such as a reverse proxy,
passes WebSocket connections through and keeps the Host header the browser
sent.
The browser says Kraft doesn't answer to the name you opened
The hostname is missing from allowed_hosts. The page names it.
- The list is held to browsers only:
curl, thekraftCLI and MCP aren't checked against it. - Add the name in
access.yamland restart, or on the Access screen from an address already on the list, where it applies at once. - Enter the name alone, as
mybox.tailnet-name.ts.net. Kraft drops a port or anhttp://you type with it, and refuses a wildcard.
Next steps
- Kraft on a phone: reach the board from your phone, and what the phone layout shows
- Security: the threat model behind the password and the host check
- Inbound triggers: call the API from off-machine
- access.yaml: every field of
access.yaml - workers.yaml: machines that dial in to this server