Skip to main content
The Setup skill installs and configures NanoClaw from scratch. It walks through Node.js installation, container runtime setup, Claude authentication, messaging channel configuration, and service installation.

What It Does

The Setup skill:
  • Installs Node.js 22 and dependencies
  • Configures Docker or Apple Container runtime
  • Authenticates Claude (subscription token or API key)
  • Sets up messaging channels (WhatsApp, Telegram, Slack, Discord)
  • Creates mount allowlist for filesystem access
  • Installs and starts the background service

Prerequisites

  • macOS, Linux, or WSL2
  • Terminal access with bash
  • Admin/sudo access for some steps
  • Claude Pro/Max subscription or Anthropic API key

How to Apply

1

Invoke the skill

Run the /setup command in your OpenCode or NanoClaw context.
2

Follow interactive prompts

The skill will guide you through:
  • Node.js installation (if needed)
  • Container runtime choice (Docker vs Apple Container on macOS)
  • Claude authentication method
  • Messaging channel selection
  • Directory access permissions
3

Authenticate channels

For each selected channel:
  • WhatsApp: Scan QR code or enter pairing code
  • Telegram: Provide bot token from @BotFather
  • Slack: Provide Bot Token and App Token
  • Discord: Provide bot token from Developer Portal
4

Verify installation

The skill runs a verification step checking:
  • Service is running
  • Credentials are configured
  • Channels are authenticated
  • At least one chat is registered

What Changes

The Setup skill creates and modifies:

Files Created

  • .env - Environment variables (credentials, tokens)
  • data/env/env - Container-accessible environment copy
  • store/auth/ - WhatsApp authentication credentials (if applicable)
  • store/messages.db - SQLite database for messages and groups
  • data/mounts.json - Filesystem mount allowlist
  • ~/Library/LaunchAgents/com.nanoclaw.plist (macOS) or systemd unit (Linux)

Files Modified

  • groups/{folder}/CLAUDE.md - Per-group memory files
  • src/config.ts - Trigger pattern and assistant name

Services Started

  • com.nanoclaw (launchd on macOS)
  • nanoclaw.service (systemd on Linux)
  • start-nanoclaw.sh (WSL without systemd)

Usage

After setup completes:
  1. Send a test message in your registered chat
  2. For main channel: any message triggers the agent
  3. For other channels: use the trigger word (default @Andy)
  4. Check logs: tail -f logs/nanoclaw.log

Service Management

# macOS (launchd)
launchctl load ~/Library/LaunchAgents/com.nanoclaw.plist
launchctl unload ~/Library/LaunchAgents/com.nanoclaw.plist
launchctl kickstart -k gui/$(id -u)/com.nanoclaw

# Linux (systemd)
systemctl --user start nanoclaw
systemctl --user stop nanoclaw
systemctl --user restart nanoclaw

# WSL (nohup fallback)
bash start-nanoclaw.sh
The setup skill delegates to channel-specific skills (/add-whatsapp, /add-telegram, etc.) for authentication and registration. Each channel skill handles its own code installation and JID format.

Troubleshooting

Service not starting: Check logs/nanoclaw.error.log for errors. Common issues include wrong Node path, missing .env, or missing channel credentials. Container agent fails: Ensure container runtime is running. Check groups/main/logs/container-*.log for details. No response to messages: Verify trigger pattern matches, chat is registered in database, and service is running. Channel not connecting: Verify credentials are in .env, restart service after changes, check channel-specific auth files exist.

Build docs developers (and LLMs) love