5.2 KiB
5.2 KiB
OpenClaw Setup Guide
Personal AI Assistant that executes actions - emails, calendar, shell commands, API integrations.
Quick Setup
1. Configure Secrets
Edit ~/.openclaw_secrets with your API keys:
nano ~/.openclaw_secrets
Fill in:
| Secret | Purpose |
|---|---|
ANTHROPIC_API_KEY |
Claude API from Anthropic |
OPENAI_API_KEY |
GPT-4 / Codex from OpenAI |
GITHUB_TOKEN |
GitHub Copilot API access |
TWILIO_* |
WhatsApp integration (optional) |
TELEGRAM_* |
Telegram bot integration (optional) |
2. Load Secrets
source ~/.openclaw_secrets
Or they auto-load when you open a new shell (bashrc sources them).
3. Start Service
cd ~/mydocker
docker compose up -d openclaw
Access
Web UI
| Detail | Value |
|---|---|
| URL | https://openclaw.sebson.space (via Traefik) |
| Port | 3000 |
| Purpose | Task management, memory, integrations |
CLI
# Helper function (auto-loaded)
openclaw-cli "do something"
# Or directly
docker compose exec openclaw openclaw "command"
Telegram (Primary)
- Enabled - requires
TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_ID - Bot responds to messages and executes actions
WhatsApp (Placeholder)
- Disabled by default (can be enabled)
- Requires Twilio account +
TWILIO_*variables - Set
"enabled": truein config to activate
API
| Detail | Value |
|---|---|
| Internal | http://localhost:3007 (changed from 3001 to avoid Grafana conflict) |
| Via Traefik | https://api.openclaw.sebson.space (optional - requires DNS record) |
curl -X POST http://localhost:3007/api/execute \
-H "Content-Type: application/json" \
-d '{"action":"email","to":"user@example.com","subject":"test"}'
Port Mapping
| Host | Container | Purpose |
|---|---|---|
| 3000 | 3000 | Web UI |
| 3007 | 3001 | API |
Bash Helpers
Auto-added to ~/.bashrc:
| Command | Description |
|---|---|
openclaw-secrets |
Check which integrations are configured |
openclaw-start |
Start the service |
openclaw-logs |
View logs |
openclaw-cli "..." |
Execute command via CLI |
Configuration
File: /home/seba/mydocker/openclaw-config.json
Key settings:
| Setting | Description |
|---|---|
ai.provider |
Default AI model (claude, gpt, copilot) |
integrations |
Enable/disable services (WhatsApp, Telegram, Gmail, GitHub, etc.) |
system.sandbox |
Run in sandbox mode (safe) |
system.shellAccess |
Allow shell command execution |
webUI.port |
Web interface port (3000) |
api.port |
REST API port (3001 internally, mapped to 3007) |
AI Model Priority
OpenClaw tries models in order:
- Claude (Anthropic) - Recommended, most capable
- GPT-4 (OpenAI) - Alternative
- Copilot (GitHub) - Code-focused
Configure via OPENCLAW_MODEL env var or config file.
Persistent Memory
- Location:
/data/memory(Docker volume) - Survives restarts: Yes
- Clearable:
docker compose downwill NOT delete it
Stores: preferences, past conversations, learned patterns, custom skills.
Security
Important considerations:
- OpenClaw runs with shell access (configurable via
system.shellAccess) - Docker container is sandboxed from host
- API keys stored in environment variables (not in code)
- Config file mounted read-only
To disable shell access (safer):
"system": {
"shellAccess": false
}
Then restart:
docker compose restart openclaw
Capabilities
OpenClaw can:
- Read/write files
- Execute shell commands (if enabled)
- Call APIs (50+ integrations)
- Send emails and messages
- Manage calendars
- Write its own plugins (with safe limits)
Troubleshooting
# Check secrets are loaded
openclaw-secrets
# View logs
openclaw-logs
# Rebuild image
docker compose build --no-cache openclaw
# Full reset (DELETES memory)
docker compose down openclaw
docker volume rm mydocker_openclaw_memory
docker compose up -d openclaw
Integration Examples
# Send email
openclaw-cli "send email to boss@company.com subject 'report' body 'attached is...'"
# Check calendar
openclaw-cli "what's on my calendar tomorrow"
# Execute command
openclaw-cli "run git status in /home/seba/project"
# GitHub action
openclaw-cli "create pull request to close issue #123"
# Send Telegram message
openclaw-cli "send message to telegram: hello"
Docker Commands
# Start
docker compose up -d openclaw
# Stop
docker compose stop openclaw
# Restart
docker compose restart openclaw
# Follow logs
docker compose logs -f openclaw
# Shell access
docker compose exec openclaw /bin/bash
# Delete service (keeps memory/config)
docker compose down openclaw
# Rebuild
docker compose build --no-cache openclaw && docker compose up -d openclaw
Quick Start Checklist
- Add API keys to
~/.openclaw_secrets - Run
source ~/.openclaw_secrets - Start service:
openclaw-start - Access Web UI: https://openclaw.sebson.space
- Try CLI:
openclaw-cli "hello" - Set up Telegram (optional)
Resources
- GitHub: https://github.com/openclaw/openclaw
- Docs: https://openclaw.ai/docs
- API Docs: https://openclaw.ai/api