EC2OpenClaw$30/moClaude Code

You Just Need $30 or a Free Amazon Account to Deploy OpenClaw

How to Install OpenClaw on EC2 with Claude Code and Connect It to Telegram — a step-by-step guide to deploying OpenClaw on AWS EC2, wiring it up with Claude, and getting Telegram notifications for everything it does.

Skip the tutorial. Paste this into Claude Code.

Copy this prompt, open Claude Code in your terminal, paste it in, and Claude will ask you the right questions and walk you through the entire installation automatically.

Note:

All you need is a Claude Code subscription ($20/mo) to skip everything below. Paste this prompt in Claude Code and it handles the rest — no need to follow the 12 steps manually.

I want to install OpenClaw on an AWS EC2 instance and connect it to Telegram for notifications. Walk me through the entire process step by step. Before you start, ask me these questions one at a time and wait for my answer before moving on: 1. Do you have an AWS account? Is it free tier or paid? 2. Do you already have an EC2 instance running? If yes, what's the public IP address? 3. What's the path to your SSH key (.pem file)? For example: ~/.ssh/my-key.pem 4. Do you have an Anthropic API key? (Get one at console.anthropic.com if not) 5. Do you have a Telegram account and want notifications? (Yes/No) 6. If yes to Telegram: Do you have a Telegram bot token and chat ID? If not, I'll walk you through creating them. Once you have my answers, SSH into my EC2 instance and do the following: - Update the system and install Docker, Node.js 20, and Git - Clone and set up OpenClaw with docker-compose - Configure ~/.openclaw/config.yaml with my Anthropic API key and Claude Haiku 4.5 - Install Playwright's Chromium for headless browser automation - If I want Telegram: add the telegram section to config.yaml with my bot token and chat ID - Set up OpenClaw as a systemd user service so it starts on boot - Enable lingering so it runs when I'm not SSH'd in - Run openclaw health, openclaw browser status, and a test agent message to verify everything works - If Telegram is configured, send a test notification After everything is verified, show me the cheat sheet of common OpenClaw commands.

What You’ll End Up With

A fully operational OpenClaw instance running on EC2, connected to Claude and Telegram.

$30/mo
EC2 instance
Haiku 4.5
Executes browser tasks
Headless
Chrome automation
Telegram
Real-time notifications
  • OpenClaw running on a $30/month EC2 instance
  • Claude Haiku 4.5 executing browser tasks on a schedule
  • Headless Chrome for Gmail, web, and Facebook automation
  • A Telegram bot that pings you whenever a task runs
  • Claude Code on your laptop writing task instructions that OpenClaw follows

Prerequisites

1
AWS account (free tier works for testing, t3.medium for production)
2
Anthropic API key (console.anthropic.com)
3
Telegram account
4
SSH key pair for EC2

The 12 Steps

Click any step to expand it. Each one has the exact commands you need.

Cheat Sheet

Every command you’ll need after installation.

Health & Status

openclaw healthFull health check
openclaw browser statusChrome status
openclaw browser screenshotTake a screenshot

Running Tasks

openclaw agent --message "Do something"One-off task
openclaw cron run task-nameRun scheduled task now
openclaw cron runsView run history

Cron Management

openclaw cron listAll tasks
openclaw cron add --name X --schedule Y --agent main --message ZAdd task
openclaw cron enable task-nameEnable task
openclaw cron disable task-nameDisable task
openclaw cron rm task-nameRemove task

Logs & Debugging

journalctl --user -u openclaw-gateway --no-pager -n 50View logs
docker-compose logs -fDocker logs
openclaw doctor --fixFix common issues

Security

openclaw security audit --deepSecurity check
openclaw doctor --fixTighten permissions

Cost Breakdown

The full monthly cost of running OpenClaw on EC2.

EC2 t3.medium$30/month
Claude Haiku API$3-10/month
Telegram BotFree
Total~$33-40/month

That’s it. OpenClaw on EC2, Claude executing your tasks, Telegram telling you what happened. Write .md files, push them, and Haiku does the rest.