Courses

DAS05 | ๐Ÿฆž ClawdBot Complete Guide

Master ClawdBot/OpenClaw safely. Learn to install on VPS (NOT locally), configure AI models, integrate Telegram, and build automation workflows. Includes step-by-step installation, security best practices, messaging integration, and advanced features. Perfect for AI enthusiasts wanting a personal AI assistant without security risks. All commands included. From complete beginner to confident user. Covers: VPS setup, Claude/OpenAI configuration, 24/7 service setup, Telegram bots, automation.

DAS05 | ๐Ÿฆž ClawdBot Complete Guide
In this guide
  1. 01๐Ÿ” CRITICAL SECURITY UPDATE – READ BEFORE USING
  2. 02๐Ÿฆž Complete OpenClaw Installation – Safe Setup

Section 01

๐Ÿ” CRITICAL SECURITY UPDATE – READ BEFORE USING

โš ๏ธ SECURITY ALERT (Updated February 2026)

IMPORTANT: After publishing this tutorial, multiple CRITICAL security vulnerabilities have been discovered in OpenClaw. This section covers essential security hardening steps you MUST take.

Watch the Security Configuration Video:

๐Ÿ“บ Complete OpenClaw Installation – Safe Setup


๐Ÿšจ Why This Matters

Since our tutorial was published, security researchers have identified:

  • โœ–๏ธ CVE-2026-25253 – One-click remote code execution vulnerability
  • โœ–๏ธ 341+ malicious skills found in ClawHub repository
  • โœ–๏ธ Authentication bypass vulnerabilities
  • โœ–๏ธ Plaintext storage of API keys and tokens
  • โœ–๏ธ Multiple command injection vulnerabilities

Bottom line: The basic installation is NOT secure by default. You MUST apply these additional security steps.


๐Ÿ”’ Essential Security Hardening (REQUIRED)

Step 1: Secure Your Telegram Bot (CRITICAL)

After completing the main installation, you need to lock down Telegram access. Here’s what we’re doing:

The Problem:

  • By default, OpenClaw uses "pairing" mode
  • This means ANYONE can request access to your bot
  • They can attempt prompt injection attacks
  • Even with approval, there’s still risk

The Solution:

  • Switch to "allowlist" mode
  • ONLY your Telegram ID can message the bot
  • Everyone else is completely ignored (no response at all)

๐ŸŽฏ Three Commands to Lock Down Telegram

After your bot is running (from PART 7 of the main tutorial), close the terminal and run these three commands:

Command 1: Switch to Allowlist Mode
Prompt
openclaw config set channels.telegram.dmPolicy allowlist

What this does: Changes from "pairing" (anyone can request) โ†’ "allowlist" (only approved IDs)


Command 2: Whitelist Your Telegram ID
Prompt
openclaw config set channels.telegram.allowFrom '["YOUR_TELEGRAM_ID"]'

Important: Replace YOUR_TELEGRAM_ID with your actual ID!

How to find your Telegram ID:

  1. Check the bot’s response when you first message it
  2. Or search for @userinfobot in Telegram and send /start
  3. It will show you: Id: 1086205942 (example)

Example:

Prompt
openclaw config set channels.telegram.allowFrom '["1086205942"]'

Command 3: Restart Gateway
Prompt
openclaw restart

What this does: Restarts OpenClaw to apply the security changes


โœ… Verification

Test if it worked:

  1. Try messaging the bot from a different Telegram account
  2. Expected result: Complete silence (no response, no rejection message)
  3. If the bot responds: The allowlist didn’t work – double-check your commands

Check your configuration:

Prompt
openclaw config get channels.telegram

Should show:

Prompt
{
  "dmPolicy": "allowlist",
  "allowFrom": ["1086205942"]
}

๐Ÿ›ก๏ธ Additional Security Measures

Gateway Password Protection

Set a strong password:

Prompt
openclaw config set gateway.auth.password YOUR_STRONG_PASSWORD

Generate a secure password:

Prompt
openssl rand -base64 32

Enable Sandbox Mode

Force commands to run in containers:

Prompt
openclaw config set tools.exec.host sandbox
openclaw config set tools.exec.approvals.set always

This prevents direct system access even if the bot is compromised.


Firewall Check (VPS Users)

Verify port 18789 is NOT exposed:

Prompt
sudo ufw status
netstat -tlnp | grep 18789

Should ONLY show: 127.0.0.1:18789 (localhost) Should NOT show: 0.0.0.0:18789 (all interfaces)


Restrict Dangerous Tools

Disable or limit high-risk capabilities:

Prompt
openclaw config set tools.allowed '["web_search","file_read"]'
openclaw config set tools.blocked '["exec","browser","web_fetch"]'

Only enable what you actually need.


๐Ÿšซ What NOT to Install

Avoid ClawHub Skills (For Now)

Why: 341+ malicious skills have been found in the repository

Don’t install:

  • โœ–๏ธ Any skills from ClawHub
  • โœ–๏ธ Third-party extensions
  • โœ–๏ธ "What Would Elon Do?" or other viral skills

Safe approach:

  • Only use built-in capabilities
  • Wait for official skill vetting
  • Review code before installing ANY skill

๐Ÿ’ฐ Cost Warning

OpenClaw can burn through API credits VERY quickly:

  • One user reported $20 overnight just from time checks
  • Simple cron jobs can cost $0.75 per execution
  • Monthly costs can reach $750+ for basic automation

Mitigation:

  1. Use cheaper models (Claude Haiku instead of Opus)
  2. Disable unnecessary background tasks
  3. Set API spending limits with Anthropic
  4. Monitor token usage daily

Check your usage:


๐Ÿ“‹ Security Checklist

Before using OpenClaw, verify:

  • [ ] Running on VPS/VM (NOT your main computer) โœ…
  • [ ] Telegram dmPolicy set to "allowlist" ๐Ÿ”’
  • [ ] Only YOUR Telegram ID in the allowlist ๐Ÿ†”
  • [ ] Gateway password is set ๐Ÿ”‘
  • [ ] Port 18789 NOT exposed to internet ๐ŸŒ
  • [ ] Sandbox mode enabled ๐Ÿ“ฆ
  • [ ] Using latest version (post Jan 29, 2026) โฌ†๏ธ
  • [ ] No ClawHub skills installed ๐Ÿšซ
  • [ ] API spending limits configured ๐Ÿ’ฐ

๐Ÿ” How to Check Your Security

Run Security Audit

Prompt
openclaw security audit

Check OpenClaw Version

Prompt
openclaw --version

If earlier than 2026-01-29, UPDATE IMMEDIATELY:

Prompt
npm update -g openclaw

Review Logs for Suspicious Activity

Prompt
tail -f ~/.openclaw/logs/gateway.log

Look for:

  • Unauthorized access attempts
  • Failed authentication
  • Unusual API usage

๐Ÿ†˜ If You Suspect Compromise

Immediate Actions:

  1. Shut down immediately:
    Prompt
    openclaw stop
    pkill -9 openclaw
    
  2. Rotate ALL credentials:
    • Anthropic API key โ†’ console.anthropic.com
    • Telegram bot token โ†’ Revoke via @BotFather, create new one
    • VPS password
  3. Check for data leaks:
    Prompt
    cat ~/.openclaw/credentials/*
    cat ~/.openclaw/memory/*
    
  4. Consider wiping the VPS:
    • If heavily compromised, safest option is fresh install
    • Backup non-sensitive data only
    • Start from scratch

๐Ÿ“š Additional Resources

Official Security Documentation

Security Research & CVE Details

  • Cisco: "Personal AI Agents Are a Security Nightmare"
  • Tenable: "How to Mitigate OpenClaw Vulnerabilities"
  • The Register: OpenClaw Security Coverage
  • SecurityWeek: Vulnerability Analysis

Community Support

  • OpenClaw Discord: For security questions
  • GitHub Issues: Report vulnerabilities responsibly

โš–๏ธ Updated Disclaimer

This tutorial is for educational purposes.

OpenClaw is in active development and has known security vulnerabilities.

Always:

  • โœ… Use a separate VPS (never your main computer)
  • โœ… Keep API keys secure
  • โœ… Monitor resource usage
  • โœ… Update regularly
  • โœ… Review security documentation

Production use is NOT recommended until security issues are fully resolved.


๐Ÿ’ก Recommended Alternatives

If you need a production-ready AI assistant:

  1. Claude Code – Official coding agent from Anthropic (secure, supported)
  2. Claude Cowork – Official desktop automation tool
  3. Direct API Integration – Build custom solutions with Anthropic API
  4. Wait for OpenClaw 1.0 – When security is production-ready

๐ŸŽ“ What You’ve Learned

By completing this security hardening:

โœ… Switched from pairing โ†’ allowlist mode โœ… Locked Telegram to only your ID โœ… Enabled sandbox mode โœ… Set gateway password โœ… Understand the security risks โœ… Know how to monitor and respond

You now have a MUCH more secure OpenClaw installation.


๐Ÿ’ฌ Questions or Issues?

Found this security guide helpful? Drop a ๐Ÿ‘ and share with others learning AI automation!

Have questions? Ask in the community discussion below.

Discovered a vulnerability? Report it responsibly via the OpenClaw GitHub.


Remember: Security is an ongoing process, not a one-time setup. Stay vigilant! ๐Ÿฆž๐Ÿ”’


Last Updated: February 2026 Security status subject to change – always check official docs for latest info

Section 02

๐Ÿฆž Complete OpenClaw Installation – Safe Setup

"โš ๏ธ IMPORTANT: Before using your bot, read the Critical Security Update to lock down access!"



๐Ÿšจ IMPORTANT SECURITY WARNING

Do NOT install ClawdBot on your main computer!

There are real security concerns with this tool that need to be addressed. This tutorial shows you how to run it safely in a virtual environment using a VPS (Virtual Private Server), so you can test it without putting your actual system at risk.


๐Ÿ“‹ What You’ll Learn

By the end of this tutorial, you’ll have:

  • โœ… A secure VPS running Ubuntu 24.04 LTS
  • โœ… ClawdBot/OpenClaw installed and configured
  • โœ… Telegram bot integration for remote access
  • โœ… Background service setup (runs 24/7)
  • โœ… Claude Sonnet 4.5 AI model configured

Time Required: 30-45 minutes
Cost: ~$7/month for VPS hosting
Skill Level: Beginner-friendly (step-by-step)


๐Ÿ› ๏ธ What You’ll Need

Required:

  • Hostinger VPS account (or any VPS provider)
  • Anthropic API key (Claude) or OpenAI API key
  • Telegram account (for bot integration)
  • Credit card for VPS payment

Optional:

  • Google Places API key
  • Other service API keys (can be added later)

๐Ÿ“– Step-by-Step Installation Guide

PART 1: Setting Up Your VPS

Step 1: Purchase Hostinger VPS
  1. Go to Hostinger.com
  2. Navigate to: Servers โ†’ VPS Hosting
  3. Select a plan:
    • Recommended: KVM 2 ($6.99/month)
    • Specs: 2 CPU cores, 8GB RAM, Unlimited storage
    • Perfect for running AI bots
Step 2: Configure Your Server
  1. Server Type: Select KVM VPS (Kernel-based Virtual Machine)
    • Better stability for Linux systems
  2. Location: Choose closest region to you
    • Auto-selected based on your location
    • Example: Singapore โ†’ Malaysia server
  3. Operating System: Ubuntu 24.04 LTS
    • Important: Choose LTS (Long Term Support)
    • Gets 5 years of security updates
    • More stable than newer versions
  4. Access Credentials:
    • Choose Password authentication
    • Create a strong password
    • Save it securely – you’ll need it later!
  5. Additional Services: (Optional)
    • Malware Protection recommended
  6. Complete checkout and wait for setup (~2-3 minutes)

PART 2: Accessing Your Server

Step 3: Open Terminal Access
  1. Go to your VPS Dashboard in Hostinger
  2. Click "Terminal" button (top right)
  3. This opens a direct connection to your server

๐Ÿ”’ Security Note: You’ll see IP addresses and server details – never share these publicly!


PART 3: Installing ClawdBot

Step 4: Get Installation Command
  1. Visit https://openclaw.ai/ (URL may change – check official site)
  2. Find the Quick Start section
  3. Select: macOS / Linux operating system
  4. Copy the one-line installation command
Step 5: Run Installer
  1. Paste command into your VPS terminal
  2. Press Enter
  3. Wait for automatic installation (2-5 minutes)

PART 4: Configuration Wizard

Step 6: Model Selection

When prompted:

Choose AI Provider:

  • Recommended: Anthropic (Claude)
  • Alternative: OpenAI (GPT-4)

Authentication:

  • Select: Anthropic API key
  • Paste your API key when prompted

Model Selection:

  • Choose: claude-sonnet-4-5
  • Best balance of speed, capability, and cost
Step 7: Telegram Bot Setup (Optional but Recommended)

Create Telegram Bot:

  1. Open Telegram
  2. Search for: @BotFather
  3. Send: /newbot
  4. Follow instructions to create bot
  5. Copy the bot token (looks like: 1234567:ABCdefGHI...)

Configure in ClawdBot:

  • When installer asks for Telegram token
  • Paste your bot token
  • Confirm setup
Step 8: Skip Optional Services

For now, select "No" or "Skip" for:

  • Google Places API
  • Additional AI providers
  • Extra skills/plugins

You can add these later!

Step 9: Choose Installation Method

When asked "How do you want to hatch your bot?":

  • Select: "Hatch in TUI" (recommended)
  • Press Enter

PART 5: Initial Bot Configuration

Step 10: Set Bot Identity

The bot will ask you several questions:

Example responses:

Prompt
Name: DigiAI (or whatever you want)
Your name: [Your name]
Timezone: Singapore (GMT+8) or your timezone
Bot personality: Professional AI assistant
Emoji: ๐Ÿค–

Test the connection:

  • Bot should respond to initial messages
  • Confirms everything is working

PART 6: Telegram Integration Test

Step 11: Connect Telegram

In the chat, type:

Prompt
I want to connect my Telegram bot. I have the bot token ready. How do I configure it?

Or:

Prompt
Reset Telegram with existing setup
Step 12: Test Telegram Bot
  1. Open Telegram
  2. Find your bot (search for the username you created)
  3. Send: /start or Hello
  4. You should get a response!

PART 7: Making It Run 24/7

Step 13: Exit Interactive Mode
  • Press Ctrl + C twice
  • Returns you to command prompt
Step 14: Enable as System Service

Run these three commands one by one:

bash

Prompt
# Command 1: Enable auto-start on boot
systemctl --user enable openclaw-gateway

# Command 2: Start the service now
systemctl --user start openclaw-gateway

# Command 3: Check if it's running
systemctl --user status openclaw-gateway
```

**What you should see:**
```
Active: active (running)
Step 15: Test Permanence
  1. Close the terminal browser tab
  2. Open Telegram
  3. Send a message to your bot
  4. You should still get responses!

๐ŸŽ‰ Success! ClawdBot is now running 24/7 in the background.


๐Ÿ” Security Best Practices

What to NEVER Share:

  • โŒ Server IP address
  • โŒ Root password
  • โŒ API keys (Anthropic, OpenAI, etc.)
  • โŒ Session tokens in URLs
  • โŒ Telegram bot tokens

What’s Safe to Share:

  • โœ… Operating system info (Ubuntu 24.04)
  • โœ… General setup steps
  • โœ… System resource stats
  • โœ… Tutorial screenshots (with sensitive info blurred)

๐Ÿ’ก Useful Commands

Check Bot Status:

bash

Prompt
systemctl --user status openclaw-gateway

View Logs:

bash

Prompt
journalctl --user -u openclaw-gateway -f

Restart Bot:

bash

Prompt
systemctl --user restart openclaw-gateway

Stop Bot:

bash

Prompt
systemctl --user stop openclaw-gateway

Access Web Dashboard:

bash

Prompt
openclaw dashboard

Chat via Terminal:

bash

Prompt
openclaw tui

๐ŸŽฏ What Can You Do with ClawdBot?

Once installed, ClawdBot can:

System & Automation:

  • Execute shell commands
  • Manage files and directories
  • Monitor system resources
  • Schedule tasks with cron
  • Git operations

Web & Data:

  • Search the web
  • Fetch content from URLs
  • Browser automation
  • API integrations

Messaging:

  • Cross-platform messaging (Telegram + more)
  • Send proactive notifications
  • Create polls and buttons

Intelligence:

  • Semantic search across files
  • Maintain memory and logs
  • Context-aware responses
  • Spawn sub-agents for complex tasks

๐Ÿ“š Resources

Official Documentation:

API Keys:

Community:

  • Discord: Check official OpenClaw Discord
  • GitHub Issues: For bug reports

โ“ Troubleshooting

Bot Not Responding?

  1. Check if service is running: systemctl --user status openclaw-gateway
  2. Check logs for errors: journalctl --user -u openclaw-gateway -n 50
  3. Verify API key is correct
  4. Restart service: systemctl --user restart openclaw-gateway

Telegram Bot Not Working?

  1. Verify bot token is correct
  2. Make sure you’ve started the bot with /start
  3. Check if ClawdBot service is running
  4. Look for Telegram-related errors in logs

Installation Failed?

  1. Make sure you’re on Ubuntu 24.04 LTS
  2. Check internet connection on VPS
  3. Try running installer again
  4. Check official docs for latest installation method

๐ŸŽ“ Next Steps

Now that you have ClawdBot running:

  1. Explore Skills – Add plugins for extra functionality
  2. Set Up Automation – Create scheduled tasks
  3. Customize Personality – Adjust bot’s behavior and tone
  4. Add More Channels – Connect WhatsApp, Slack, Discord
  5. Build Workflows – Chain commands for complex tasks

๐Ÿ’ฌ Discussion

Questions? Drop them below!

  • Share your ClawdBot use cases
  • Ask for help with specific issues
  • Suggest topics for future tutorials
  • Share your automation workflows

โš ๏ธ Disclaimer

This tutorial is for educational purposes. ClawdBot is in active development and security best practices are evolving. Always:

  • Use a separate VPS (not your main computer)
  • Keep API keys secure
  • Monitor resource usage
  • Update regularly
  • Review security documentation

Found this helpful? Drop a ๐Ÿ‘ and share with others learning AI automation!