The Main Event
This is where your server becomes an AI assistant. OpenClaw's install process uses a setup wizard that walks you through connecting your AI provider and messaging channels.
Step 1: Install OpenClaw
SSH into your server:
ssh claw@YOUR_SERVER_IP
cd ~/openclaw
Pull and start OpenClaw:
docker pull openclaw/openclaw:latest
docker run -d \
--name openclaw \
--restart unless-stopped \
-v $(pwd)/data:/app/data \
-v $(pwd)/config:/app/config \
-p 3838:3838 \
openclaw/openclaw:latest
Verify the container is running:
docker ps
You should see an openclaw container listed with a status of Up. If it shows Restarting or isn't listed, check the logs:
docker logs openclaw --tail 20
You should see OpenClaw starting up and eventually showing a setup URL or onboarding prompt.
Step 2: Run the Setup Wizard
OpenClaw includes an onboarding wizard on first run. Follow it to:
- Skip the AI provider for now — we'll set up Claude (Anthropic) properly in Lesson 10
- Connect Telegram:
- Select Telegram as your channel
- Paste your bot token from Lesson 8
- OpenClaw will automatically start polling for messages
Alternatively, you can configure Telegram directly in the config file:
nano ~/openclaw/config/default.yaml
Add your Telegram bot token in the channels section:
channels:
telegram:
botToken: "YOUR_BOT_TOKEN_HERE"
Restart OpenClaw after config changes:
docker restart openclaw
Step 3: Open the Firewall for OpenClaw
If you want to access the OpenClaw web interface:
sudo ufw allow 3838/tcp
Then visit http://YOUR_SERVER_IP:3838 in your browser.
Step 4: Send Your First Message
Open Telegram and send a message to your bot. Something simple:
Hello, are you there?
Watch the Docker logs in real time to confirm the message arrives:
docker logs openclaw --tail 10 -f
Press Ctrl+C to stop following the logs.
Troubleshooting
- Bot doesn't respond: Check
docker logs openclawfor errors. Most common cause: wrong bot token. - Can't reach web interface: Make sure UFW allows port 3838 (
sudo ufw status) and the container is running (docker ps). - Container keeps restarting: Check logs with
docker logs openclaw— usually a config syntax error indefault.yaml. - Docker not running: If
docker psgives an error, make sure Docker is started:sudo systemctl start docker. - Port already in use: If you see a "port already allocated" error, check what's using 3838 with
sudo lsof -i :3838and stop it, or change the port mapping in thedocker runcommand (e.g.,-p 3839:3838). - Permission denied: Make sure your
clawuser is in thedockergroup (you did this in Lesson 7). If you just added it, log out and back in.
When You're Done
- OpenClaw Docker container running (
docker psshows it asUp) - Telegram channel connected via bot token
- Sent a test message to your bot
- Message appears in Docker logs
- Web interface accessible (optional)