Skip to main content
This guide covers the full installation process, from requirements to running your first agent.

Requirements

Platform

  • macOS or Linux
  • Windows via WSL2 is supported

Runtime

Container Runtime

Authentication

  • Claude Code subscription (Pro/Max), or
  • Anthropic API key

Installation Methods

Authentication Setup

NanoClaw supports two authentication methods:
Only authentication variables (CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY) are passed to containers. Other environment variables in .env are not exposed to agents.

Channel Setup

NanoClaw uses a skill-based channel system. Each messaging platform is added via a Claude Code skill:

WhatsApp

/add-whatsapp
Authenticates via QR code or pairing code

Telegram

/add-telegram
Requires bot token from @BotFather

Discord

/add-discord
Requires Discord bot token

Slack

/add-slack
Uses Slack app with Socket Mode

Gmail

/add-gmail
OAuth-based email integration
The /setup command prompts you to select channels and runs the appropriate skills automatically.

Starting the Service

NanoClaw runs as a background service that polls for messages and executes scheduled tasks.
The service is managed by launchd:
# Install service
cp launchd/com.nanoclaw.plist ~/Library/LaunchAgents/

# Start service
launchctl load ~/Library/LaunchAgents/com.nanoclaw.plist

# Check status
launchctl list | grep nanoclaw

# Restart service
launchctl kickstart -k gui/$(id -u)/com.nanoclaw

# Stop service
launchctl unload ~/Library/LaunchAgents/com.nanoclaw.plist
View logs:
tail -f logs/nanoclaw.log
tail -f logs/nanoclaw.error.log

Troubleshooting

Error: bash setup.sh shows NODE_OK: falseSolution: Install Node.js 20 or higher:
# macOS
brew install node@22

# Linux
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs

# Or use nvm
nvm install 22 && nvm use 22
Error: NATIVE_OK: false during setupSolution: Install build tools:
# macOS
xcode-select --install

# Linux
sudo apt-get install build-essential
Then:
rm -rf node_modules package-lock.json
npm install
Error: docker info fails or container build failsSolution:
# macOS
open -a Docker
# Wait 15 seconds for Docker to start

# Linux
sudo systemctl start docker

# Verify
docker info
Error: Stale files in container after rebuildSolution: Prune the builder cache:
# Docker
docker builder prune -f
./container/build.sh

# Apple Container
container builder stop
container builder rm
container builder start
./container/build.sh
Error: Service loads but doesn’t process messagesSolution: Check logs and verify configuration:
# View error logs
tail -f logs/nanoclaw.error.log

# Verify setup
npx tsx setup/index.ts --step verify

# Common issues:
# - Missing .env file
# - Wrong Node.js path in service file
# - Missing channel credentials
Rebuild and restart:
npm run build

# macOS
launchctl kickstart -k gui/$(id -u)/com.nanoclaw

# Linux
systemctl --user restart nanoclaw
Error: Claude Code process exited with code 1 in logsCauses:
  1. Container runtime not running
  2. Wrong session mount path
  3. Missing authentication
Solution:
# 1. Ensure runtime is running
docker info  # or: container system start

# 2. Check container logs
cat groups/*/logs/container-*.log

# 3. Verify .env has authentication
cat .env | grep -E 'CLAUDE_CODE_OAUTH_TOKEN|ANTHROPIC_API_KEY'
Error: permission denied while trying to connect to the Docker daemon socketSolution: Add your user to the docker group:
sudo usermod -aG docker $USER
Then log out and back in. If using systemd and the error persists:
# Immediate fix
sudo setfacl -m u:$(whoami):rw /var/run/docker.sock

# Persistent fix
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo tee /etc/systemd/system/docker.service.d/socket-acl.conf << 'EOF'
[Service]
ExecStartPost=/usr/bin/setfacl -m u:USERNAME:rw /var/run/docker.sock
EOF
# Replace USERNAME with your username
sudo systemctl daemon-reload

Next Steps

First Conversation

Learn how to interact with your assistant

Proactive Agent

Enable morning check-ins and afternoon follow-ups

Memory System

How NanoClaw remembers context

Customization

Tailor NanoClaw to your needs

Build docs developers (and LLMs) love