How CodeRail works
CodeRail has three parts: a server you host on Cloudflare, a small bridge on each computer, and the web app you use in a browser or on your phone.
The server
One Cloudflare Worker on your own domain. It serves the web app, keeps users, invites and computers in a D1 database, and checks every request against the person's role on that computer.
Each computer gets its own Durable Object: a small always-available process that holds the computer's connection and every open browser's connection, passes requests and events between them, and keeps each agent session's history, so you can scroll back even while the computer is off.
The bridge
One program on each computer (coderail). It connects out to your server and keeps that connection open, so the computer needs no open ports, no VPN and no fixed address. It:
- runs Claude Code and Codex through their official Agent Client Protocol adapters, using the
claudeandcodexalready installed and signed in on that computer; - opens terminals, reads and writes files, runs git, and forwards dev servers for previews;
- checks folder limits again on its own side, after the server has.
On a Mac it comes inside the CodeRail app; on Linux one command installs it (Add a Linux computer). It runs in the background and starts at login.
The web app
A web app, also installable on a phone, with the layout of a desktop coding app: your sessions on the left, the chat in the middle, and panes for files, changes, terminals and previews beside it, which you can split and rearrange. Sessions and terminals keep running when every browser is closed.
What CodeRail doesn't do
- It doesn't hold your AI logins or API keys, or call any AI service itself.
- It doesn't change how the agents behave: their own settings, permissions and history apply.
- It isn't end-to-end encrypted: your server sees session content, because it keeps the history. It's your server, in your Cloudflare account.