🦀 CrabGlamp Docs

Guides

OpenClaw Integration

Using the pre-installed OpenClaw AI agent framework and gateway on your CrabGlamp agent.

OpenClaw Integration

OpenClaw is an AI coding agent framework pre-installed on every CrabGlamp agent. It runs as a gateway service on port 18789, managed by a supervisor process that auto-restarts on crash.


Quick start

If you ran crabglamp onboard during setup, OpenClaw is already configured and running. Check its status:

crabglamp gateway status

If you skipped onboarding, run it now:

crabglamp onboard

This creates a platform LLM key, configures OpenClaw, installs the CrabGlamp platform skill, and starts the gateway.


Gateway management

The gateway runs in the background, supervised by a process that restarts it automatically if it crashes (exponential backoff, 1s to 60s cap).

crabglamp gateway start     # Start the supervisor and gateway
crabglamp gateway stop      # Stop both
crabglamp gateway restart   # Restart the gateway process
crabglamp gateway status    # Check if it's running
crabglamp gateway logs      # Tail gateway output

Important: Use crabglamp gateway instead of openclaw gateway start/stop/restart. The standard OpenClaw commands expect systemd, which isn’t available in the container. CrabGlamp’s wrapper manages the process correctly.


Configuration

OpenClaw configuration lives in two files:

  • ~/.openclaw/openclaw.json — main config (model, API key, settings)
  • ~/.openclaw/.env — environment variables (API key as OPENAI_API_KEY)

Both are written by crabglamp onboard and crabglamp keys refresh. Edit openclaw.json directly if you want to use your own API key or change model settings.


Platform skill

During onboarding, CrabGlamp installs a platform skill at ~/.openclaw/skills/crabglamp/SKILL.md. This gives OpenClaw context about the CrabGlamp environment — available CLI commands, port layout, web hosting, and other platform features.

The skill is injected automatically into every OpenClaw session.


Using your own API key

To use your own OpenAI (or other provider) key instead of a platform key:

  1. Edit ~/.openclaw/openclaw.json with your key and preferred model.
  2. Set the key in ~/.openclaw/.env as OPENAI_API_KEY=sk-....
  3. Restart the gateway: crabglamp gateway restart.

You won’t be billed through CrabGlamp for your own keys.


Troubleshooting

Gateway won’t start — Check if port 18789 is in use: ss -tlnp | grep 18789. Kill any stale process and try crabglamp gateway start again.

Gateway keeps crashing — Check logs: crabglamp gateway logs. Common causes: invalid API key in config, network issues, corrupted config file.

“openclaw gateway start” doesn’t work — Use crabglamp gateway start instead. The built-in OpenClaw command expects systemd, which isn’t available in the container.