My AI Assistant Got a Browser That Lives at Home
My AI assistant checks packages, files claims, and activates credit card offers for me. Its hosted browser usually manages these errands, but Amex’s login button sometimes spun forever without an error or timeout. USPS returned “Access Denied” on a tracking page, and Amazon asked for a CAPTCHA. The same accounts and actions worked from my laptop.
The hosted browser had a datacenter IP and automation fingerprints; my laptop connected from home. Someone on r/MuseAgent had posted a setup that addressed both problems: a headed browser on a residential IP, with the webdriver flag hidden and trusted-input clicks. I had an unused Raspberry Pi, so I tried it.
Why a browser at home
A residential proxy would have fixed the IP problem without hardware, but it meant a monthly bill when I already owned a Pi I could use for $0. It also wouldn’t change how the browser runs, another thing bot defenses inspect. The Pi let me run Chromium through its normal graphical path, on my home connection, with a persistent profile and the setup under my control.
The assistant still runs on its hosted VM. It fetches a debugger WebSocket URL from the Pi and controls Chromium’s tabs through the Chrome DevTools Protocol (CDP). Chromium handles the pages, JavaScript, cookies, and network requests, so websites see a headed browser with its own profile connecting from my house. Other network calls from the agent’s code still use the VM’s connection; the Pi isn’t a VPN or general-purpose exit node.
Chromium on the Pi
The hardware is a Raspberry Pi 5 running Ubuntu, managed over SSH without a desktop. Xvfb and the Ubuntu snap version of Chromium were already installed. Codex helped set everything up, starting with Tailscale: we joined the Pi to my tailnet before making the browser controls reachable.
CDP has no login and gives extensive control over the browser, so the externally reachable control endpoints listen only on the Tailscale address. There’s no LAN listener, router port forwarding, or public internet exposure. I still need to add a Tailscale access rule restricting the debugger to the agent’s VM node.
Xvfb provides a 1920×1080 screen in memory. Chromium runs headed on that virtual display, using its full graphical path without a monitor, desktop environment, or window manager. The agent drives it unattended over CDP. We also launched Chromium with automation-detection features disabled and verified that navigator.webdriver evaluates to false. That changes one signal, but sites can inspect plenty of other browser properties and behavior. I’d be skeptical of anyone calling it undetectable.
Checking the listening sockets caught a problem: Chromium ignored our requested Tailscale bind address and listened on localhost. We added a small TCP relay on the Tailscale address and debugger port, forwarding connections to Chromium’s localhost listener. Both HTTP discovery requests and the debugger WebSocket work through the relay, with external access confined to the tailnet.
The snap package couldn’t write to the hidden directory we’d chosen for the profile. We made that path a symlink to a location the snap could write to. Cookies, local storage, and logins now survive restarts and tasks. This is a separate profile from the ones on my laptop and phone; sharing their home connection doesn’t copy their identities or logins.
Everything runs as systemd user services, enabled at boot with lingering so no interactive login is needed. The services restart on failure with a backoff. The browser launcher waits for a valid Tailscale address, uses a lock to prevent duplicate launches, and checks the debugger endpoint’s health. If that check fails, the launcher exits and lets systemd restart it.
Logging in through the shared screen
We added an optional VNC connection with a browser-based viewer, also bound to the Tailscale address. From my phone or laptop, I can watch the agent’s browser and take over its mouse and keyboard.
When a site needs a login, I enter it through that viewer. My assistant can’t and shouldn’t read my passwords. The profile saves the login, and the agent continues in the same session. Taking over the browser is simpler than passing credentials around, and it’s how we got the Amex task done.
A WebSocket through an HTTPS proxy
I approved the assistant’s VM joining the tailnet from my phone. Joining was only part of the connection setup, though: the VM can’t reach the tailnet directly, because its connections must go through the runtime’s HTTPS proxy.
Our CDP driver is a small Node script that fetches the debugger endpoint, opens a tab, and connects over WebSocket to navigate, take screenshots, and send trusted input. It sends browser input events through CDP’s Input domain rather than synthesizing clicks in page JavaScript.
Ordinary proxy forwarding couldn’t carry the WebSocket Upgrade. The driver had to open an explicit HTTP CONNECT tunnel, then pass the connected socket to the WebSocket client through a callback once the tunnel was established. Returning the socket synchronously produced Unexpected server response: 101: the client was treating the success code as an error. Since this route only carries TCP, ping wasn’t a useful test; we had to try the actual connection.
We documented the endpoints, troubleshooting, and attach examples in a short operator’s guide. It also covers the distinction between browser traffic from the Pi and other VM traffic, and two requirements that caught us during setup: fetch a fresh debugger WebSocket URL from the HTTP endpoint before each connection, because its ID changes when Chromium restarts, and use PUT rather than GET to open a tab through this Chromium’s API.
USPS, Amazon, and Amex
On October 3, I loaded a simple page and captured a screenshot to check the full route through the VM, proxy, tailnet, Pi, and browser. Then I returned to the sites that had failed.
USPS tracking loaded without “Access Denied.” The package I’d been unable to check for days had reached my front door the day before. Amazon loaded without a CAPTCHA; typed search and autocomplete worked, and the page placed the session in my home city.
Amex’s bot defenses had flagged the managed browser environment rather than my account, leaving the login spinning. Through the Pi, I logged in with the viewer and handed control back to the agent. It activated every available offer on both cards: hundreds on one and a handful on the other, with none left unclaimed. Amex logged us out after five idle minutes, but that was session cleanup, not a fraud flag. I logged back in through the viewer and the agent continued.
The assistant now tries its normal managed browser first to keep routine tasks fast. A bot-defense block, an access-denied page, or a spinning login triggers an automatic retry through the Pi, without asking me or announcing the switch. Headed Chromium on my home connection has helped more than hiding the automation flag, though fingerprinting remains an arms race.
This took an afternoon with a Pi I already owned. The credit card offers it activated that first day will cover its electricity for a long time.