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
| Port | Service | Bound to | Notes |
|---|---|---|---|
| 8080 | Platform nginx | 0.0.0.0 | Public entry point. Auth, WebSocket proxy, health checks. |
| 8090 | Customer nginx | 127.0.0.1 | User-configured web hosting. |
| 8081 | code-server | 127.0.0.1 | Browser IDE. Proxied via /_cg/editor/. |
| 7681 | ttyd | 127.0.0.1 | Web terminal. Proxied via /_cg/terminal/. |
| 7682 | Auth sidecar | 127.0.0.1 | HMAC token/cookie validation. |
| 18789 | OpenClaw gateway | 127.0.0.1 | AI 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/usrand/opt) - Shell configs (
.zshrc,.bashrc) - OpenClaw configuration and skills
- nginx site configs
Does not survive restarts:
/tmpcontents- In-memory state and running processes
- Environment variables set in a previous session (use
.zshrcfor 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:
| Variable | Example | Description |
|---|---|---|
CRABGLAMP_DOMAIN | cg-my-agent-abc.fly.dev | Public domain for this agent |
CRABGLAMP_VM_VERSION | 0.7.0 | Image version |
CRABGLAMP_AGENT_ID | clx... | Agent’s database ID |
CRABGLAMP_API_URL | https://crabglamp.com | Platform 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).