AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
# Everything on one small server: the account server (relay), HTTPS (Caddy), and AnyBot itself.
|
2026-11-04 12:38:45 +00:00
|
|
|
|
# Easiest: ./setup.sh (asks for the domain, account and keys, writes .env and Caddyfile, starts
|
|
|
|
|
|
# everything and checks it). By hand:
|
|
|
|
|
|
# 1. Point your domain at the server; copy ../../relay/Caddyfile here and put the domain in it.
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
# 2. Put your account name and password in .env (see .env.example).
|
|
|
|
|
|
# 3. docker compose up -d
|
|
|
|
|
|
# 4. On the phone open https://your-domain, create the account (first time), and use it.
|
|
|
|
|
|
# AI keys: set them in .env, or set ANYBOT_RESTORE_FROM_ACCOUNT=1 to start from the newest backup
|
|
|
|
|
|
# your Mac made (bots, chats, routines and the keys you set there).
|
2026-11-04 11:30:32 +00:00
|
|
|
|
#
|
|
|
|
|
|
# 大腦: this AnyBot is the brain of the account. It keeps the bots, chats, memory and routines,
|
|
|
|
|
|
# and works even while your computers sleep. On each of your computers: 設定 › 手機與帳號 ›
|
|
|
|
|
|
# 大腦 › 「改用它當大腦」. Those computers then show these bots, and the bots can use them as hands
|
|
|
|
|
|
# (screen, files, browser), asking you first as usual. A Linux computer without a screen can be
|
2026-11-04 12:38:45 +00:00
|
|
|
|
# hands too: run `anybot setup` there and pick this brain.
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
services:
|
|
|
|
|
|
relay:
|
|
|
|
|
|
build:
|
|
|
|
|
|
context: ../..
|
|
|
|
|
|
dockerfile: relay/Dockerfile
|
One-step install: install.sh, fixed Linux and server builds, clearer README
- install.sh (curl | sh): app, hands, server and deps modes; installs system packages
(right names per release, e.g. libasound2t64 on Ubuntu 24.04), Rust via rustup (1.95+),
Docker for the server; limits parallel compiles on small machines
- Server Docker image: add the ALSA build/runtime packages (the build failed), cache the
cargo registry and target between rebuilds, JOBS build arg
- 加一台電腦 now gives a line that installs AnyBot on a blank computer before joining it
- Makefile: make deps installs Rust too, make doctor, clear message when Rust is missing/old
- README rewritten: one line per use, getting started, update/remove, troubleshooting,
deployment options; docs/install.md and multi-device.md follow it
- Tested on fresh ubuntu:24.04 (app) and debian:12 (curl | sh hands) containers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 16:52:10 +00:00
|
|
|
|
args: { JOBS: "${ANYBOT_BUILD_JOBS:-}" }
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
environment:
|
|
|
|
|
|
# Your public address (for the links of sites the bots publish), e.g. https://anybot.example.com
|
|
|
|
|
|
ANYBOT_RELAY_PUBLIC_URL: "${ANYBOT_RELAY_PUBLIC_URL:-}"
|
|
|
|
|
|
ANYBOT_RELAY_INVITE: "${ANYBOT_RELAY_INVITE:-}"
|
|
|
|
|
|
volumes:
|
|
|
|
|
|
- relay-data:/data
|
|
|
|
|
|
caddy:
|
|
|
|
|
|
image: caddy:2
|
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
ports: ["80:80", "443:443"]
|
|
|
|
|
|
volumes:
|
2026-11-04 12:38:45 +00:00
|
|
|
|
# Written by setup.sh (your domain); ../../relay/Caddyfile is the template.
|
|
|
|
|
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
- caddy-data:/data
|
|
|
|
|
|
depends_on: [relay]
|
|
|
|
|
|
anybot:
|
|
|
|
|
|
build:
|
|
|
|
|
|
context: ../..
|
|
|
|
|
|
dockerfile: deploy/server/Dockerfile
|
One-step install: install.sh, fixed Linux and server builds, clearer README
- install.sh (curl | sh): app, hands, server and deps modes; installs system packages
(right names per release, e.g. libasound2t64 on Ubuntu 24.04), Rust via rustup (1.95+),
Docker for the server; limits parallel compiles on small machines
- Server Docker image: add the ALSA build/runtime packages (the build failed), cache the
cargo registry and target between rebuilds, JOBS build arg
- 加一台電腦 now gives a line that installs AnyBot on a blank computer before joining it
- Makefile: make deps installs Rust too, make doctor, clear message when Rust is missing/old
- README rewritten: one line per use, getting started, update/remove, troubleshooting,
deployment options; docs/install.md and multi-device.md follow it
- Tested on fresh ubuntu:24.04 (app) and debian:12 (curl | sh hands) containers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 16:52:10 +00:00
|
|
|
|
args: { JOBS: "${ANYBOT_BUILD_JOBS:-}" }
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
depends_on: [relay]
|
Bot 的電腦 can run under gVisor: its own kernel, Chromium's sandbox back on
容器隔離 in 設定 › 電腦: standard (runc, the container is the only wall, Chromium runs
--no-sandbox) or hardened (runsc: a virtualized kernel, all capabilities dropped but the few
the desktop needs, ANYBOT_BOX_SANDBOX=1 turns Chromium's own sandbox back on). Box image v7.
deploy/mac/gvisor-vm.sh makes a Lima VM with Docker + gVisor for a Mac (started at login),
gvisor-migrate.sh moves the box's files and logins there.
Checked and finished before committing:
- the hardened choice is offered only on a Docker host that has runsc; a box set to it on a
host without it opens the standard way and says so (it used to not start at all)
- the settings row shows what the box really runs on, and when 更新 is needed
- no swap only under gVisor (a standard box keeps Docker's default)
- the migrate script sees the running Mac app ("AnyBot", not "anybot")
- the VM script starts an existing VM by name, checks runsc and the kernel from the Mac
- the version test says 7
Real run in the Lima VM: desktop, VNC, numbered controls, xdotool and screenshots work; no
Chromium process has --no-sandbox, renderers run with seccomp and their own namespaces.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 16:03:25 +00:00
|
|
|
|
# A second wall for the bots' computer (optional, Linux): install gVisor on this host
|
|
|
|
|
|
# (see gvisor.dev/docs "Installation" for the apt repository + `apt-get install runsc`,
|
|
|
|
|
|
# then register it in /etc/docker/daemon.json: {"runtimes": {"runsc": {"path": "runsc"}}}
|
|
|
|
|
|
# and `systemctl restart docker`). In AnyBot: 設定 › 電腦 › 在哪裡執行 › 容器隔離 →
|
|
|
|
|
|
# 「強隔離(gVisor)」, then rebuild the computer (更新). The box gets a virtualized
|
|
|
|
|
|
# kernel and Chromium's own sandbox comes back on. On a host without runsc the box won't
|
|
|
|
|
|
# start — switch 容器隔離 back to 標準.
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
environment:
|
|
|
|
|
|
ANYBOT_ACCOUNT: "http://relay:8080|${ANYBOT_USER}"
|
|
|
|
|
|
ANYBOT_ACCOUNT_PASSWORD: "${ANYBOT_PASSWORD}"
|
|
|
|
|
|
ANYBOT_HOST_NAME: "${ANYBOT_HOST_NAME:-雲端 AnyBot}"
|
2026-11-04 12:38:45 +00:00
|
|
|
|
# First start on a new server: make the account (the first one needs no invite).
|
|
|
|
|
|
ANYBOT_ACCOUNT_CREATE: "1"
|
|
|
|
|
|
ANYBOT_RELAY_INVITE: "${ANYBOT_RELAY_INVITE:-}"
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
XAI_API_KEY: "${XAI_API_KEY:-}"
|
|
|
|
|
|
ANTHROPIC_API_KEY: "${ANTHROPIC_API_KEY:-}"
|
|
|
|
|
|
OPENAI_API_KEY: "${OPENAI_API_KEY:-}"
|
|
|
|
|
|
GEMINI_API_KEY: "${GEMINI_API_KEY:-}"
|
|
|
|
|
|
ANYBOT_RESTORE_FROM_ACCOUNT: "${ANYBOT_RESTORE_FROM_ACCOUNT:-}"
|
2026-11-05 10:20:45 +00:00
|
|
|
|
# The bots' computer goes by its own name: a desktop AnyBot on this same machine keeps
|
|
|
|
|
|
# "anybot-box" for itself (and used to pause the brain's one as idle).
|
|
|
|
|
|
ANYBOT_BOX_NAME: "anybot-brain-box"
|
2026-11-09 08:36:51 +00:00
|
|
|
|
# The Docker socket is not mounted here any more (a mounted socket is full control of this
|
|
|
|
|
|
# host). The bots' computer is driven through the filtered proxy below, which only answers
|
|
|
|
|
|
# the calls cloudbox.rs makes: containers (run/start/stop/rm/inspect/ps), exec, volumes,
|
|
|
|
|
|
# images and the box image build. DOCKER_HOST is the plain `docker` CLI default, which is
|
|
|
|
|
|
# what src/cloudbox.rs uses when its own docker_host setting is empty.
|
|
|
|
|
|
DOCKER_HOST: "tcp://docker-socket-proxy:2375"
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
volumes:
|
|
|
|
|
|
- anybot-data:/data
|
2026-11-09 08:36:51 +00:00
|
|
|
|
docker-socket-proxy:
|
|
|
|
|
|
# https://github.com/Tecnativa/docker-socket-proxy: a small nginx in front of the Docker
|
|
|
|
|
|
# socket with an endpoint allowlist. Keep this list minimal: adding an API here widens what
|
|
|
|
|
|
# a compromised brain can do on this host (no AUTH, no SECRETS, no SWARM, no plugins).
|
|
|
|
|
|
image: tecnativa/docker-socket-proxy:0.3.0
|
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
environment:
|
|
|
|
|
|
CONTAINERS: "1" # run, start, stop, rm, inspect, ps (the box's lifecycle)
|
|
|
|
|
|
EXEC: "1" # docker exec: every screen step, box_exec, snapshots
|
|
|
|
|
|
IMAGES: "1" # inspect/create the box image (build uploads it)
|
|
|
|
|
|
BUILD: "1" # 更新/重建 builds the box image
|
|
|
|
|
|
VOLUMES: "1" # anybot-box-home: inspect, create, rm (Reset/Restore)
|
|
|
|
|
|
NETWORKS: "1" # inspect/attach (docker run needs the bridge network)
|
|
|
|
|
|
POST: "1"
|
|
|
|
|
|
GET: "1"
|
2026-11-09 12:23:38 +00:00
|
|
|
|
# On a rootless-Docker host this has to be DOCKER_SOCKET=/run/user/<uid>/docker.sock in .env:
|
|
|
|
|
|
# setup.sh finds it and writes it (also into a kept .env). The rootful default is
|
|
|
|
|
|
# /var/run/docker.sock; on a rootless host that is another daemon and the proxy answers 503.
|
2026-11-09 08:36:51 +00:00
|
|
|
|
volumes:
|
|
|
|
|
|
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock:ro
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
volumes:
|
|
|
|
|
|
relay-data:
|
|
|
|
|
|
caddy-data:
|
|
|
|
|
|
anybot-data:
|