Skip to content
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL

Show HN: Hotline Computer – Rootless Linux desktop container with Nix for agents

Article URL: https://computer.hotline.dev/ Comments URL: https://news.ycombinator.com/item?id=50525866 Points: 1 # Comments: 1

Overview One container is one machine. Inside it: The agent connects directly to the local container over MCP. No account or hosted relay is required. A compatible computer exposes the same eight tools over streamable HTTP at /mcp and an unauthenticated /health endpoint. You need Docker, Podman or Apple container 1.5+, and 4 GiB of memory for the container. The image ships for arm64 and amd64. $ export TOKEN=$(openssl rand -hex 24) $ docker run -d --name computer \ --cap-drop=ALL --security-opt no-new-privileges \ --pids-limit 1024 --memory 4g --shm-size 1g \ -p 127.0.0.1:8787:8787 -e HOTLINE_COMPUTER_TOKEN="$TOKEN" \ -v computer-home:/home/agent \ ghcr.io/1broseidon/hotline-computer:0.11.0 To share a project, add -v "$PWD:/home/agent/workspace". Mount the project, never your whole home and never the container runtime's socket. Quickstart Point your agent at the MCP endpoint with the same token. $ claude mcp add --transport http computer \ http://127.0.0.1:8787/mcp \ --header "Authorization: Bearer $TOKEN" Codex, ChatGPT desktop and other HTTP MCP clients take the same URL and Authorization header in their own config. The agent's first two calls are state info, which names the running release, and state guide, which returns the guide that ships inside that release. The guide comes from the running binary, so it always matches the image. Open the desktop in your browser: $ open "http://127.0.0.1:8787/#$TOKEN" A scaled PNG of the screen plus the AT-SPI accessibility tree: windows, elements, roles, coordinates, values and states. Pass a window to read one app, or a region to see part of the screen at full size. mode=png writes the original instead. Clicks, moves, drags, scrolls, types, presses keys and pastes, through XTEST. batch runs up to ten steps under one lock. Navigates, snapshots the page as text with element refs, and acts on those refs: click, fill, select, check, hover, upload, tabs, dialogs and downloads. fill types text, or one of your stored secrets by name. No action runs longer than a minute. Starts jobs with a label you can read, keeps 4 MiB of output each, and lets the agent read, wait on, write to or cancel them. Up to 16 run at once and the newest 64 are kept. run starts a named entry from the workspace manifest. Gets, puts and lists paths under the home. Downloads URLs and GitHub release assets with optional SHA-256 checks, extracts archives safely, and runs scripts as managed jobs. Lists, focuses, closes, maximizes and tiles windows, and verifies the result. Polls the accessibility tree and the browser's page text for a phrase. The running version, your stored secrets by name, the release guide, workspace manifests and Nix preparation, desktop leases, browser logins and snapshots of the home. The computer serves its own screen. / is a page with one canvas, and /ws is the socket behind it. The page reads the token from the URL fragment. The fragment is omitted from the initial page request; the viewer then sends the token with its WebSocket and file requests. The viewer opens in view-only mode. Mouse and keyboard input are disabled until you press Take control. While you have control, the agent's tools that change the screen are rejected. Control returns to the agent when you press Give it back, close the viewer, or send no input for ten seconds. The top bar shows who is working and what is running: agent at work, 2 running · 5 done, or amber you're driving. The jobs observer on the right shows every job by its label, with its output and a ✓ or ✗ when it ends. The Activity window lists the last 500 tool calls, failures included. Files in the viewer opens the home: download anything from it, or drop a file on the page to upload it. Workspaces The image has the desktop, the browser and Nix, and no language toolchains. A project describes what it needs once, in .hotline/manifest.json, and the agent prepares it: { "packages": ["nodejs", "pnpm"], "runs": { "test": { "command": ["pnpm", "test"] }, "web": { "command": ["pnpm", "dev"], "kind": "web" } } } Packages are Nixpkgs names, or the repository's own flake. Jobs started inside the workspace get the prepared environment. A web run gets a free $PORT and answers with its URL once it listens; a desktop run answers once its window is up, with a screenshot. The prepared environment, its cache, the job history and the browser profile all live in the home, so they survive an upgrade when the home is a volume. Security Important The container is the boundary. Inside it, the agent can do anything the container's user can do. Protections Nothing runs as root. The image has no sudo and no apt, and with --cap-drop=ALL and no-new-privileges nothing can elevate. The MCP endpoint, the viewer's socket and its file routes all require the token. Only /health and the viewer page itself are open. A job never inherits HOTLINE_COMPUTER_TOKEN. Stored secrets are sent by name. A variable reaches jobs as an environment variable. A login is typed only on its own sites. A passkey's private key is never put in the browser. Limitations Redaction replaces secret values with [redacted NAME] in tool text responses. Code can still expose values by splitting or encoding them. Redaction does not cover non-text results or the screen. Jobs and Chromium run as the same user, so a job can reach the browser's DevTools port inside the container. The keyring's password is empty. Its file in the home is not encrypted, so the home volume is the boundary around what is kept there. Chromium runs with --no-sandbox; the container is its sandbox. No GPU. Graphics render on Mesa in software. X11 only. No Wayland. Linux apps only. One desktop per container. A second agent gets a second container. A workspace's first prepare downloads its Nix packages, which takes a while. Tk and Fyne apps have no accessibility tree; the agent sees them as pixels. Configuration For agents Start every session with state info and state guide, and follow the guide that comes back: it is the one for the release that is actually running. Prefer browser text and refs for web pages, and capture with a window for native apps. Give every job a label in plain words, because that is what the person watching reads. When a step needs the person, such as a sign-in or a 2FA tap, say so and wait; they can take control from the viewer. Never ask the person to paste a secret. If a task needs one that state info does not list, ask them to store it. Hotline Computer is the desktop each teammate gets in Hotline, released on its own. Hotline starts one container per teammate and gives it the token; everything on this page works without it. The guides cover each subject in more detail.

Sources

Read original ↗

Related topics

← Continue to all updates