Opendray – run Claude Code/Codex agents on your own box, drive from anywhere Opendray, a self-hosted gateway for AI coding agents like Claude Code and Codex, allows users to run agent sessions on their own infrastructure and control them from web, mobile, or chat. The open-source tool prevents agent sessions from dying when a laptop closes and supports multiple accounts with load balancing and local-first memory. Self-hosted gateway for Claude Code, Codex, Antigravity, Grok Build, and OpenCode. Run agent sessions on your own infrastructure. Drive from web, mobile, or chat. 🌐 English · 简体中文 /Opendray/opendray/blob/main/README.zh.md · فارسی /Opendray/opendray/blob/main/README.fa.md · Español /Opendray/opendray/blob/main/README.es.md · Português /Opendray/opendray/blob/main/README.pt-BR.md · 日本語 /Opendray/opendray/blob/main/README.ja.md · 한국어 /Opendray/opendray/blob/main/README.ko.md · Français /Opendray/opendray/blob/main/README.fr.md · Deutsch /Opendray/opendray/blob/main/README.de.md · Русский /Opendray/opendray/blob/main/README.ru.md flowchart LR subgraph before "❌ SSH direct" laptop1 Your laptop -.- |ssh, dies on sleep| host1 Server + CLI end subgraph after "✅ opendray gateway" web Web -- gw opendray phone Phone -- gw chat Telegram / Slack / Discord -- gw gw -- |survives disconnect| cli Claude Code · Codex · Antigravity · Grok Build · OpenCode · shell end Running Claude Code or Codex over SSH means the agent dies the moment your laptop closes. opendray runs it on a host that stays awake a Mac mini under your desk, a NAS, a VPS and lets you reattach from a web admin, a mobile app, or a chat message. Sessions keep executing whether or not anyone is connected. Multiple accounts get pooled with per-tier balancing and live account-switch. A local-first memory layer keeps every embedding on your network. opendray wraps the AI coding CLIs you already use Claude Code, Codex, Antigravity, Grok Build, OpenCode, plus any shell and turns them into something you can drive from anywhere. Run sessions on your home server, NAS, or VPS. Get notified on Telegram when a session goes idle. Reply from your phone to feed the next prompt back in. All over a self-hosted gateway you control end to end. - 🛰 One backend, three surfaces. Single Go binary serving a React web admin and a Flutter mobile app, with every action also exposed over a REST + WebSocket API for third-party integrations. - 💬 Six bidirectional channels, no walled gardens. Telegram, Slack, Discord, Feishu 飞书 , DingTalk 钉钉 , WeCom 企业微信 , plus a Bridge adapter for anything custom. Replies on any channel route back into the right session. - 🧠 Local-first memory. ONNX / Ollama / LM Studio embeddings with three-scope retrieval user, project, session , smart ranking, and cross-layer conflict detection. No vector data leaves your network. - 🔌 Integration-grade API. Scoped API keys, per-call audit log, reverse-proxy mounts. Treat opendray as the gateway behind your own product or just as a personal command centre. - 🔑 Multi-account fleet for Claude, Codex, Antigravity. Drop multiple logged-in credential directories onto the host; opendray auto-discovers them via a filesystem watcher, balances new sessions across enabled accounts, and lets you switch a live session between accounts without losing the conversation transcript migrates under the hood . Each account row shows live capacity subscription tier, rate-limit tier, active sessions, last-used, current login email . - 🔒 Self-hosted, licence-clear. Apache 2.0, one static binary, cosign-signed releases with SPDX SBOM. No telemetry, no cloud account, no subscription. opendray is a Go binary that serves a web admin at /admin/ and a REST + WebSocket API at /api/v1/ . Here is what it does, in the shapes you would actually see. bash $ opendray sessions ls ID PROVIDER PROJECT STATE STARTED ses a1f claude-code app/web running 2h ago ses b2c codex internal/session idle 5m ago ses c9d grok-build docs/ running 14m ago ses d34 shell misc/deploy-logs idle 1h ago bash $ opendray providers list PROVIDER VERSION ACCOUNTS ACTIVE NOTES claude-code 1.4.11 3 1 auto-discovered via CLAUDE CONFIG DIR codex 0.29.0 2 1 openai login antigravity 0.7.2 1 0 agy, HOME-isolated grok-build 2.5.1 1 1 xai opencode 0.6.3 - 0 local endpoint required shell - - 1 arbitrary The web admin embeds xterm.js. You see the same PTY the CLI wrote to. Close the browser tab and the session keeps running on the host. Reopen it hours later and the transcript is where you left it. claude-code ses a1f · app/web · 2h 14m refactor the router to lazy-load the mobile view I'll look at the current router and figure out the cleanest split. ● Read app/web/src/router.tsx ⎿ 342 lines ● Grep pattern: "loadable", path: "app/web/src" ⎿ found 3 uses ... sequenceDiagram participant U as You Telegram participant TG as Telegram Bot participant OD as opendray participant S as Session ses a1f S- OD: session emits "review needed on line 42" OD- TG: send message + session tag TG- U: notification with quick-reply U- TG: "yes, ship it" TG- OD: webhook incoming OD- S: inject "yes, ship it" as next PTY input S- OD: agent continues Same shape for Slack, Discord, Feishu, DingTalk, WeCom, and any Bridge-adapter transport. php flowchart LR prompt Agent asks for context -- ret memory retrieve ret -- user USER scope