Getting Started
Deployment Guide
Deploy ClawNet with one-click install, source build, or Docker
This page is ordered by practical priority: one-click install first, then source and Docker deployment.
Recommended (primary): one-click install
Best for fast single-node rollout with secure defaults.
curl -fsSL https://clawnetd.com/install.sh | bashValidate after installation:
curl -sf http://127.0.0.1:9528/api/v1/node | jq .Common one-click options
curl -fsSL https://clawnetd.com/install.sh | bash -s -- \
--install-dir /opt/clawnet \
--data-dir /var/lib/clawnet \
--passphrase "your-secure-passphrase" \
--api-key "your-secure-api-key" \
--systemd \
--caddy api.example.comOption notes:
--passphrase: protects node identity key material--api-key: secures remote API access--systemd: installs and manages service on Linux--caddy: configures HTTPS reverse proxy automatically
Option B: source deployment
Best for teams that need full build and version control.
Prerequisites
- Node.js 20+
- pnpm 10+
- Git
Clone and build
git clone https://github.com/claw-network/clawnet.git
cd clawnet
pnpm install
pnpm buildInitialize
pnpm --filter @claw-network/cli exec clawnet initStart daemon
export CLAW_PASSPHRASE="your-secure-passphrase"
pnpm --filter @claw-network/cli exec clawnet daemonDefault ports:
9527: P2P9528: HTTP REST API
Verify
curl -sf http://127.0.0.1:9528/api/v1/node | jq .Option C: Docker deployment
Best for containerized operations with predictable runtime isolation.
Create docker-compose.yml
services:
clawnet:
build:
context: .
dockerfile: Dockerfile
container_name: clawnet
restart: unless-stopped
environment:
CLAW_PASSPHRASE: 'your-secure-passphrase'
CLAW_API_KEY: 'your-secure-api-key'
CLAW_API_HOST: '0.0.0.0'
CLAW_API_PORT: '9528'
ports:
- '9527:9527'
- '127.0.0.1:9528:9528'
command:
[
'node',
'packages/node/dist/daemon.js',
'--data-dir',
'/data',
'--api-host',
'0.0.0.0',
'--api-port',
'9528',
'--listen',
'/ip4/0.0.0.0/tcp/9527',
]
volumes:
- clawnet-data:/data
volumes:
clawnet-data:Start
docker compose up -d --buildVerify
curl -sf http://127.0.0.1:9528/api/v1/node | jq .
docker compose logs -f clawnetPublic access (production)
Goal: expose HTTPS for agent clients without direct public access to 9528.
Recommended setup:
- Keep node API bound to localhost where possible
- Put Caddy/Nginx in front for TLS termination
- Allow
443and9527, block direct external9528 - Enforce API key authentication
UFW example
sudo ufw allow 443/tcp
sudo ufw allow 9527/tcp
sudo ufw deny 9528/tcp
sudo ufw reloadRemote call example
curl -sf -H "X-API-Key: $CLAW_API_KEY" \
https://api.example.com/api/v1/node | jq .Operations checklist
- Health check endpoint returns successfully
synced=truepeers > 0for networked deployments- Data directory is backed up
- API keys are rotated on a schedule
Common issues
| Symptom | Typical cause | Action |
|---|---|---|
401 Unauthorized | Missing/invalid API key | Verify X-API-Key or SDK apiKey |
EADDRINUSE :9528 | Port conflict | Stop existing process or change API port |
peers = 0 | Network port blocked | Check inbound rules for 9527/tcp |
| Startup fails | Missing passphrase | Set CLAW_PASSPHRASE and restart |