Command Overview
openclaw setup is OpenClaw's all-in-one installation command. It automatically handles environment detection, dependency installation, initial configuration, and service startup.
Basic Usage
openclaw setup
This launches an interactive setup wizard that guides you through all configuration steps.
Installation Flow
After running openclaw setup, the following steps are executed in order:
1. Environment Detection
Checking environment...
✓ Node.js v20.11.0
✓ npm v10.2.4
✓ Git v2.43.0
✓ Operating System: Linux x64
✓ Available memory: 4GB
✓ Available disk: 50GB
2. Select Installation Mode
Select installation mode:
[1] Quick Setup (recommended)
[2] Custom Setup
[3] Headless Setup (non-interactive)
3. Configure Model Provider
Select your primary model provider:
[1] OpenAI
[2] Anthropic
[3] Ollama (local)
[4] Other / Custom
4. Configure Channels
Select channels to enable:
[x] Telegram
[ ] Discord
[ ] WhatsApp
[ ] Slack
[ ] Web Chat
5. Security Settings
Configure security:
Set Gateway API Key? [Y/n]
Enable rate limiting? [Y/n]
Command-Line Options
Non-Interactive Mode
openclaw setup --non-interactive \
--provider openai \
--api-key "sk-your-key" \
--channel telegram \
--telegram-token "123456:ABC"
Specify a Configuration File
openclaw setup --config /path/to/config.json
Install from a Template
openclaw setup --template minimal
openclaw setup --template full
openclaw setup --template developer
Available templates:
minimal: Minimal configuration, core features onlyfull: Full configuration, all featuresdeveloper: Developer-oriented, includes debugging tools
Specify Installation Directory
openclaw setup --dir /opt/openclaw
Skip Specific Steps
openclaw setup --skip-deps # Skip dependency checks
openclaw setup --skip-channel # Skip channel configuration
openclaw setup --skip-start # Don't auto-start after installation
Docker Installation
Install using Docker mode:
openclaw setup --docker
This automatically generates a Docker Compose file and environment variable file:
Generated files:
docker-compose.yml
.env
config/config.json
Import Existing Configuration
Migrate from an existing installation:
openclaw setup --import /path/to/old/config.json
Import from environment variables:
openclaw setup --import-env
Post-Installation Verification
Diagnostics run automatically after installation:
Running post-installation checks...
✓ Configuration valid
✓ Provider connected
✓ Channel configured
✓ Gateway started on port 3000
Setup complete! Your OpenClaw instance is ready.
Dashboard: http://localhost:3000
Re-Running Setup
If you need to reconfigure:
# Keep existing config, just add new components
openclaw setup --add
# Complete reconfiguration
openclaw setup --reset
Note: --reset clears existing configuration. Back up first:
openclaw configure --export backup.json
Common Questions
Q: What if setup fails midway?
Re-run openclaw setup. It detects completed steps and skips them.
Q: Can I add channels later?
Yes, use openclaw channels add or re-run openclaw setup --add.
Q: How do I view setup logs?
cat ~/.openclaw/logs/setup.log
Summary
openclaw setup is the fastest way to get started with OpenClaw. It encapsulates the complex configuration process behind an interactive wizard, allowing new users to launch a fully functional AI assistant service in just a few minutes.