Overview

This guide walks you through deploying an AI assistant powered by Anthropic using Local Deployment. You'll configure the provider, set up the deployment environment, and get your assistant running.

Why Anthropic?

  • 200K context window
  • Image understanding
  • Tool/function calling

Why Local Deployment?

  • Simplest setup
  • No network exposure
  • Full control

Requirements

  • Node.js 22+: Node.js version 22 or higher is required
  • macOS, Linux, or WSL2: Supported operating systems
  • npm or pnpm: Package manager for installation
  • Anthropic credentials: API key or authentication

Step 1: Configure Anthropic

Standard API key authentication

  1. Create an account at console.anthropic.com
  2. Navigate to API Keys section
  3. Generate a new API key
  4. Set ANTHROPIC_API_KEY environment variable
Environment Variable: ANTHROPIC_API_KEY

Step 2: Prepare Local Deployment Environment

  1. Install OpenClaw: Install OpenClaw globally via npm or the installer script
    curl -fsSL https://openclaw.bot/install.sh | bash
  2. Run Onboarding: Complete the setup wizard
    openclaw onboard --install-daemon
  3. Configure Providers: Add your AI provider credentials during onboarding or manually
  4. Start Gateway: Start the Gateway service
    openclaw gateway start
  5. Verify Status: Check that everything is running correctly
    openclaw status

Step 3: Configuration

Create your openclaw.json configuration:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-sonnet-4-20250514"
      }
    }
  },
  "models": {
    "providers": {
      "anthropic": {
  "models": {
    "providers": {
      "anthropic": {
        "apiKey": "${ANTHROPIC_API_KEY}
    }
  }
}

Step 4: Deploy

{
  "gateway": {
    "mode": "local",
    "bind": "loopback",
    "port": 18789,
    "auth": {
      "mode": "token",
      "allowTailscale": false
    }
  }
}

Step 5: Verify

# Check deployment status
openclaw status

# View logs
openclaw logs --follow

# Test with a message
openclaw test "Hello, are you working?"

Connect to Channels

Now connect your deployed Anthropic assistant to messaging channels: