Remote access
Connect a browser to Butler on WSL, a server or another computer.
On this page
Remote access is off by default. Turn it on from the computer that runs Butler, then pair a browser on another computer with a one-time code. In the app, manage it in Settings → Phone & devices. Without the app, use the CLI. Security management needs a local client and the local admin credential. On a screen opened from another computer, Settings → Phone & devices shows the Available only on the host computer. message.
Pair a device in the app
- On the computer that runs Butler, open Settings → Phone & devices.
- Turn on Connect on the same network. Addresses shows the address to open on the other computer.
- Click Create code. Code shows an 8-digit code and the time left.
- In a browser on the other computer, open the address and enter the code in the connect form.
- When the device pairs, Device paired appears and the device shows up in the Paired devices list.
- A code works once, within 60 seconds. When it expires, a new code is issued automatically.
- Three failed entries invalidate the code. A new code appears with Repeated failures issued a new code.
- Paired devices shows each device’s name, IP address and last-seen time. Disconnect disconnects that device, and Disconnect all disconnects every device after a confirmation dialog.
For each item, see the Settings reference.
Headless / WSL / server
butler start
butler remote enable
butler remote pairOn another computer, open the LAN URL that butler remote enable shows and enter the 8-digit code in the connect form. Use the server address or an address forwarded to WSL. Set up the firewall and port forwarding separately. Use a network you trust.
pair keeps running in the terminal and does not open a browser. A code works once, within 60 seconds. Three failed entries invalidate it. The terminal shows the time left, and a new code is issued automatically when the code expires or is invalidated. pair exits when a device pairs or you press Ctrl-C. Issuing a new code invalidates the previous one. The short code can be submitted only by form POST, never in a URL. Keep the terminal output private and do not save it in logs.
butler remote status --json
butler remote devices
butler remote devices --json
butler remote devices --revoke DEVICE_ID
butler remote devices --revoke-all
butler remote disableThe device list survives restarts. When you revoke a device, its cookie is rejected immediately and its live event stream closes. Revoking every device leaves local bearer authentication in place. butler open opens a one-time link for this computer and creates a revocable device named “This computer · browser”. Devices with an existing v1 cookie must pair again. The long connection token is no longer shown and no longer works in the connect form. remote code stays as a hidden alias of remote pair for one preview release. remote code --rotate and remote code --json no longer work.
The browser cookie is HttpOnly and SameSite=Lax. Plain HTTP on a LAN host name cannot use a Secure cookie, and the connection and the cookie are not encrypted. Use a network you trust, or serve HTTPS from a proxy you manage. Origin and Fetch Metadata checks stay in place. The last-seen time is updated in memory on each request and saved at most once every 15 minutes. Idle devices cause no writes.
Status shows whether remote access is on, the bind addresses, LAN URLs, bind errors and allowed hosts. It does not show a code. The commands need a running service and do not start it for you. If a command cannot connect, run butler start.
Port forwarding and allowed hosts
If WSL port forwarding, a tunnel or a reverse proxy uses a different Host, register its name or IP. In the app, expand Allowed hosts for tunnels and proxies in Settings → Phone & devices, enter the name in Host names and click Add.
To open outputs Butler made from another computer, enter the tunnel hostname for outputs in Output host in the same place. Output host can be set only in the app.
butler remote hosts add 192.0.2.10
butler remote hosts remove 192.0.2.10A device still has to pair when it connects through an allowed host. Port forwarding alone does not grant security management rights. You manage the forwarding tool and its security yourself.
App port
Currently butler config get app.port reports that the value is missing. The App port is config.port in gateways/app.json in the data folder, and a change applies after a restart. Do not edit the configuration files of a running service directly.