Why Dual Install?
ClawMagic and OpenClaw are separate AI agent runtimes that serve different use cases. Running both on the same machine lets you:
- Test plugins across both runtimes during development
- Compare agent behavior side-by-side with the same provider and model
- Build applications that interact with either or both systems
- Develop with Claude Code or Codex against a live ClawMagic + OpenClaw stack
This is experimental. Both runtimes are stable individually, but dual-install configurations are not officially supported. Port conflicts, shared config files, and memory usage are the main areas to watch.
Default Ports
| Runtime | Gateway Port | Portal Port | Config Dir | State Dir |
|---|---|---|---|---|
| ClawMagic | 18790 | 5173 | ~/.clawmagic/ | state/ (project root) |
| OpenClaw | 18789 | N/A (CLI-first) | ~/.openclaw/ | state/ (project root) |
The default ports are one apart (18789 vs 18790), so both can run simultaneously without conflict out of the box. Each runtime uses its own config directory.
Option A: Same User, Separate Directories
The simplest approach. Install each runtime in its own directory:
# ClawMagic (port 18790) npm install -g clawmagic clawmagic onboard # OpenClaw (port 18789) — in a separate directory git clone https://github.com/openclaw/openclaw.git ~/openclaw cd ~/openclaw npm install && npm run build node main.js
Both use their own state/ directories and separate config paths. They share the same user’s home directory but do not conflict.
If you installed ClawMagic via the full installer (not npm global), it lives at ~/clawmagic. Keep OpenClaw in ~/openclaw to avoid confusion.
Option B: Separate User Profiles
For stricter isolation, run each runtime under a different OS user. This prevents any possibility of shared config, environment variables, or process interference.
macOS
# Create a dedicated user for the second runtime sudo dscl . -create /Users/clawdev sudo dscl . -create /Users/clawdev UserShell /bin/zsh sudo dscl . -create /Users/clawdev NFSHomeDirectory /Users/clawdev sudo mkdir -p /Users/clawdev sudo chown clawdev /Users/clawdev # Switch to that user and install su - clawdev npm install -g clawmagic clawmagic onboard
Linux
sudo useradd -m -s /bin/bash clawdev sudo su - clawdev npm install -g clawmagic clawmagic onboard
Each user gets its own ~/.clawmagic/ or ~/.openclaw/ config, own state/, and own process tree. This is the safest isolation without containers.
Custom Port Configuration
If you need to change ports (e.g., both runtimes use the same default), set environment variables before starting:
# ClawMagic — override gateway port export CLAWMAGIC_GATEWAY_PORT=18790 # OpenClaw — override gateway port export OPENCLAW_GATEWAY_PORT=18789
Or set the port in each runtime’s config file:
# ClawMagic: ~/.clawmagic/config.json
{ "gateway": { "port": 18790 } }
# OpenClaw: ~/.openclaw/config.json
{ "gateway": { "port": 18789 } }Both installers auto-detect port conflicts and offer to remap. If you run clawmagic doctoror openclaw doctor, each will report its configured port and whether it’s available.
Running Both Simultaneously
# Terminal 1 — ClawMagic clawmagic start # Gateway: http://127.0.0.1:18790/health # Portal: http://127.0.0.1:5173 # Terminal 2 — OpenClaw cd ~/openclaw node main.js # Gateway: http://127.0.0.1:18789/health
Both gateways run on localhost. Each uses your AI provider API keys independently. They do not communicate with each other — they are separate runtimes.
Recommended: Development with Claude Code or Codex
The primary use case for dual install is development and testing. When building applications that integrate with AI agent runtimes, having both systems running gives you:
- Live API targets on two ports for integration testing
- Plugin compatibility testing across both runtimes
- Side-by-side comparison of agent responses and behavior
We recommend using Claude Code (terminal) or Codex (IDE) as your coding agent alongside the dual install. A typical workflow:
- Start both ClawMagic (port 18790) and OpenClaw (port 18789)
- Open Claude Code or Codex in your project directory
- Build and test your integration against both APIs
- Use ClawMagic’s marketplace plugins for extended functionality
- Run
clawmagic doctorandopenclaw doctorto verify both systems
# Example: test plugin on both runtimes curl http://127.0.0.1:18790/health # ClawMagic curl http://127.0.0.1:18789/health # OpenClaw # Build your app with Claude Code claude "Build an API client that talks to both ClawMagic and OpenClaw"
What to Watch For
- Memory usage: each runtime consumes 200–500 MB RAM at baseline. Running both with active agents and plugins may require 2–4 GB total.
- AI provider rate limits: both runtimes use your API keys. Concurrent agent activity doubles your API usage.
- Background services: both may install launchd (macOS) or systemd (Linux) services. Ensure each service has a unique name and points to the correct port.
- State isolation: each runtime has its own
state/directory. Do not share state directories between them. - Plugin manifests differ: ClawMagic uses
claw.plugin.json, OpenClaw usesopenclaw.plugin.json. Plugins built for one may need a manifest adapter for the other.
Docker: Dual Container Setup
For the cleanest isolation, run each runtime in its own container:
# docker-compose.yml for dual install
services:
clawmagic:
image: ghcr.io/clawmagic/clawmagic:latest
ports:
- "18790:18790"
volumes:
- clawmagic-state:/app/state
- clawmagic-config:/root/.clawmagic
openclaw:
image: ghcr.io/openclaw/openclaw:latest
ports:
- "18789:18789"
volumes:
- openclaw-state:/app/state
- openclaw-config:/root/.openclaw
volumes:
clawmagic-state:
clawmagic-config:
openclaw-state:
openclaw-config:Containers provide full filesystem, network, and process isolation. No risk of config or state crossover.
Next Steps
- /docs/install-macos-linux — full ClawMagic install guide including Docker and npm global.
- /docs/deployment — production deployment, remote access, and health checks.
- /docs/plugin-development — build plugins compatible with both runtimes.
- /docs/basic-use — understand how to use ClawMagic day-to-day.