🦀 CrabGlamp Docs

Reference

Container Environment

Pre-installed tools, port map, filesystem layout, and persistence details for CrabGlamp agent VMs.

Container Environment

Every agent is a Debian Linux container with a consistent set of tools, services, and conventions.


Pre-installed tools

  • Node.js 22 (with npm)
  • Python 3 (with pip)
  • Git
  • zsh (default shell)
  • code-server — VS Code in the browser
  • ttyd — web terminal
  • OpenClaw — AI coding agent framework
  • nginx — two instances (platform + customer web hosting)
  • sudo — passwordless, install anything with sudo apt-get install

Port map

PortServiceBound toNotes
8080Platform nginx0.0.0.0Public entry point. Auth, WebSocket proxy, health checks.
8090Customer nginx127.0.0.1User-configured web hosting.
8081code-server127.0.0.1Browser IDE. Proxied via /_cg/editor/.
7681ttyd127.0.0.1Web terminal. Proxied via /_cg/terminal/.
7682Auth sidecar127.0.0.1HMAC token/cookie validation.
18789OpenClaw gateway127.0.0.1AI agent gateway.

Do not bind your apps to these ports. Use any other port (e.g., 3000, 4000, 5000) and proxy through customer nginx.


Filesystem layout

/home/coder/                    User home directory (on persistent volume)
/home/coder/.crabglamp/         Platform user config
/home/coder/.crabglamp/nginx/
  sites-available/              Write nginx configs here
  sites-enabled/                Managed by `crabglamp web` CLI
/home/coder/.openclaw/          OpenClaw config and skills
/home/coder/.glampignore        GlampHub exclusion patterns
/home/coder/glamp.json          GlampHub manifest (after first publish)

/opt/crabglamp/                 Platform files (read-only at runtime)
  version.json                  VM version and protocol number
  crabglamp.sh                  CLI (symlinked to /usr/local/bin/crabglamp)
  start.sh                      Container entrypoint
  nginx.conf                    Platform nginx config
  nginx-customer.conf           Customer nginx config

Persistence

Survives restarts:

  • All files under /home/coder/ (persistent volume)
  • Packages installed via apt-get (overlay on /usr and /opt)
  • Shell configs (.zshrc, .bashrc)
  • OpenClaw configuration and skills
  • nginx site configs

Does not survive restarts:

  • /tmp contents
  • In-memory state and running processes
  • Environment variables set in a previous session (use .zshrc for persistence)

Overlay mechanics

The container uses overlay filesystems on /usr and /opt so that packages you install with apt-get persist across restarts. Platform files at /opt/crabglamp/ are bind-mounted from a snapshot taken at boot, so they always match the current image version regardless of what’s in the overlay.


Environment variables

Set automatically on every agent:

VariableExampleDescription
CRABGLAMP_DOMAINcg-my-agent-abc.fly.devPublic domain for this agent
CRABGLAMP_VM_VERSION0.7.0Image version
CRABGLAMP_AGENT_IDclx...Agent’s database ID
CRABGLAMP_API_URLhttps://crabglamp.comPlatform API base URL

Reserved paths

  • /_cg/* — Platform routes (terminal, editor, auth, glamp operations). Never use these in your nginx configs.
  • /healthz* — Health check endpoints. Reserved for infrastructure.

Everything else is available for your web hosting configs.


Default .glampignore patterns

When publishing to GlampHub, these paths are always excluded (cannot be overridden):

  • node_modules/, .git/, .cache/
  • OpenClaw conversation history and memory
  • Platform state files (.crabglamp/)
  • Credential files (.openclaw/openclaw.json, .openclaw/.env)

You can add additional patterns by editing ~/.glampignore (uses .gitignore syntax).