Run the server

Remote access

Reach the board from a phone or another machine over Tailscale, your local network, a tunnel or your own reverse proxy, behind a password.

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 port in access.yaml or pass --port. Use your port wherever this page says 8765.
  • access.yaml, which lives in $KRAFT_CONFIG_DIR when 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.

WayChoose it whenIt 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 networkThe 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 TunnelYou 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 runYou 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 KraftA 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
    1. phone
    2. tailnetTailscale encrypts
    3. Kraft on the Tailscale addresspassword, name in allowed_hosts
  • On your local network
    1. phone
    2. your LANplain http, the network can read it
    3. Kraft on 0.0.0.0password, name in allowed_hosts
  • Over a Quick Tunnel
    1. phone
    2. cloudflaredpublic internet, the https URL
    3. Kraft on 0.0.0.0the LAN reaches the port too; password, name in allowed_hosts
Three ways in. Tailscale encrypts the tailnet to a Kraft on the Tailscale address. A local network carries plain http. A Quick Tunnel crosses the public internet at an https URL. Each binds a network address, with a password and the 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.

  1. 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 writes bind: 0.0.0.0 with it.
  2. Find the machine's Tailscale address and name. tailscale ip -4 prints the address, such as 100.101.102.103:
    tailscale ip -4
    

    The first line of tailscale status names this machine:
    tailscale status
    
  3. Pause any active item. Once you edit bind in the next step, the kraft CLI dials the new address, where nothing listens yet, so kraft admin restart can't list the agents it is about to end.
  4. In access.yaml, set bind to that address and add the machine's tailnet name to allowed_hosts:
    config/access.yaml
    bind: 100.101.102.103
    allowed_hosts:
      - mybox.tailnet-name.ts.net
    

    Setting bind in the file, rather than passing --host, keeps the kraft CLI in your other shells pointed at the same address, and keeps the bind across a restart. Run kraft admin doctor and read its access.yaml row to confirm the file parses. Its server row 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 rewrites access.yaml from what the running server holds, which reverts your hand-edited bind and allowed_hosts.
  5. Restart Kraft so it reads the new bind.
  6. 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

  1. 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).
  2. 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.
  3. 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.
  4. Restart Kraft so it binds the new address.
  5. 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

A Quick Tunnel puts the board on the public internet. Anyone who finds the *.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.
  1. Run cloudflared tunnel --url http://localhost:8765. It prints a *.trycloudflare.com URL. The URL changes every time cloudflared starts: after the first time, add each new hostname under Allowed hosts, where it applies at once, with no restart.
  2. 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.0 and the hostname under allowed_hosts in access.yaml.
  3. 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 from access.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:

  1. 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:8765 on a local network, https://<your-tunnel-hostname> through a Quick Tunnel. A JSON status confirms the request reaches Kraft.
  2. Open the same address without /api/health in a browser. You should see the login page. Sign in with your password.
  3. 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.

  1. Fix the cause, or put the old bind back: set bind in access.yaml to what it was before your edit (127.0.0.1 if you never changed it).
  2. Start Kraft again: kraft admin start --detach, or kraft admin restart when it runs as a service, or kraft in 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, the kraft CLI and MCP aren't checked against it.
  • Add the name in access.yaml and 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 an http:// you type with it, and refuses a wildcard.

Next steps

Copyright © 2026