DEV Community

Cover image for How to install OpenClaw (Moltbot/Clawdbot) on macOS, Windows, or Linux
Preecha
Preecha

Posted on

How to install OpenClaw (Moltbot/Clawdbot) on macOS, Windows, or Linux

  • Git: for cloning andboarding Wizard documentation.

2. Verify the Gateway

If you installed the background service (daemon), it should already be running. Check its status with:

openclaw gateway status
Enter fullscreen mode Exit fullscreen mode

3. - "3000:3000"

env_file:
  - .env
depends_on:
  - db
  - redis
Enter fullscreen mode Exit fullscreen mode

db:
image: postgres:15
environment:
POSTGRES_USER: openclaw
POSTGRES_PASSWORD: openclaw
POSTGRES_DB: openclaw
ports:
- "5432:5432"

redis or incompatible runtime.

Fix:

  • Remove node_modules and reinstall with npm ci.
  • Match the runtime to project docs (.nvmrc, pyproject.toml, runtime.txt).
  • Don't mix package managers unless the repo supports it.

2) Database connection refused

Cause: DB service is down or DATABASE_URL is wrong.

Fix:

` is in the project root.

  • Restart the process after .env changes.
  • Verify the loader package (dotenv) is initialized early.

Post-install hardening checklist

Once OpenClaw starts successfully, do these before sharing with teammates:

  • Rotate default secrets.
  • Enforce strong API tokens.
  • Restrict CORS and callback URLs.
  • Set production-safe log levels.
  • Add health/readiness probes responses.
  • Share interactive docs with your team once stable.

If you're testing OpenClaw forks with frequent changes, that single workflow is faster than manually maintaining scripts plus separate docs.

Upgrade strategy for OpenClaw forks

Open-source bot/tool forks evolve quickly. Use a repeatable update path:

`bash
git fetch origin
git checkout main
git pull
npm ci
npm run migrate
npm test

Top comments (0)