Prerequisites — Do These Before the Lab
Complete these before arriving at CloudHesive. The lab moves fast — if you're creating accounts during the session, you'll fall behind.
AWS Account
You need an AWS account with permissions to create Lightsail instances. Free tier is fine for testing.
Enable Bedrock Model Access (Required)
The Lightsail blueprint uses AWS Bedrock as the model provider — no separate Anthropic account needed. But you must request access to Claude models first.
- Go to AWS Console → Amazon Bedrock → Model access
- Find Anthropic — Claude and click Request access
- Accept the EULA. Access is usually granted instantly.
- Confirm "Access granted" appears next to Claude Sonnet 4.6
Telegram
Install on your phone and desktop before the lab.
- Phone: App Store / Play Store → "Telegram" → sign up with your phone number
- Desktop: web.telegram.org — no install needed, same account
- Create your bot now: Open Telegram → search
@BotFather→ send/newbot→ follow prompts → copy the token
123456789:ABCdef... — save it somewhere. Bot username must end in bot (e.g. MyAgentBot).
Set an AWS Budget Alert (Required)
Bedrock charges per token on your AWS bill. Without a budget alert, a debugging loop or runaway cron job can cost you $40+ in a single day. Set this up now.
- Go to AWS Console → Billing → Budgets → Create budget
- Budget type: Cost budget
- Amount: $25/month (covers Lightsail + moderate Bedrock use)
- Alert threshold: 80% → your email
- Add a second alert at 100%
Brave Search API Key (Optional — for web search)
Gives your agent the ability to search the web. Not required for the core lab, but makes the agent significantly more useful.
- Sign up at api.search.brave.com
- Create an API key (free tier: 2,000 queries/month)
- Requires a credit card to sign up
If you want your agent to respond with voice notes, sign up for an ElevenLabs account before the lab:
- Create a free account at elevenlabs.io
- Go to Profile + API key → generate an API key
- Free tier gives you premade voices only (that's fine — Bella is great)
This is covered in detail in Section 05: Give It a Voice.
Deploy in 20 Minutes
This follows the official AWS blog walkthrough — the same flow Channy Yun published on launch day.
Launch Lightsail Instance
AWS Console → Lightsail → Create instance Platform: Linux/Unix Blueprint: Apps + OS → search "OpenClaw" → select it (shows as OpenClaw 2026.2.17) Plan: $24/month (4 GB RAM) — AWS recommended for optimal performance Name it: OpenClaw-Lab Click: Create instance (takes ~2 minutes)
Connect via Browser SSH
Lightsail Console → your instance → Getting started tab → Connect using SSH (orange button).
A browser terminal opens with the Lightsail OpenClaw MOTD displaying three things you need:
Lightsail OpenClaw MOTD v1.0.0 +----------------------------------------------+ | OpenClaw Dashboard Access | +----------------------------------------------+ Dashboard URL: https://<your-ip>/overview Access Token: <your-token> Current Model: bedrock/global.anthropic.claude-sonnet-4-6 Continue with device pairing? (y = pair now, n = skip):
y yet. First, copy the Dashboard URL and Access Token — you'll need them in the next step.
Pair Your Browser with the Dashboard
- Open the Dashboard URL in a new browser tab
- Paste the Access Token into the Gateway Token field
- Click Connect
- The dashboard will show a "device pairing required" message — that's expected
Now go back to the SSH terminal:
Continue with device pairing? (y = pair now, n = skip): y ...approve prompt appears... a ← approve the device pairing
The dashboard should now show Health: OK with a green indicator. Your browser is paired.
Enable Bedrock API Access (CloudShell Script)
Your instance needs IAM permissions to call Bedrock. The Getting started tab in the Lightsail console shows a script — copy it and run it in AWS CloudShell.
- Go back to the Lightsail console → your instance → Getting started tab
- Find the "Enable Amazon Bedrock as your model provider" section
- Click Copy the script
- Click Launch CloudShell (or open it from the AWS Console top bar)
- Paste and run the script — it creates an IAM role granting Bedrock access
Test: Chat via Dashboard
Go to Chat in the OpenClaw dashboard and send a message. If you get a response, Bedrock is working and your agent is live.
Set Tools Profile (REQUIRED)
Back in the SSH terminal:
openclaw config set tools.profile full
full.
Connect Telegram
openclaw channels add telegram # Enter your bot token from BotFather when prompted
Send a message to your bot on Telegram. It will reply with a pairing code and instructions:
openclaw pairing approve telegram <CODE>
Enable Web Search — Brave (Optional)
echo "BRAVE_SEARCH_API_KEY=your_key_here" >> ~/.openclaw/.env sudo systemctl restart openclaw-gateway
Test it: send your bot "Search the web for the latest AWS news"
https://<your-ip> with a Let's Encrypt certificate. The Lightsail pre-baked image handles everything — no manual setup needed.
Give It a Name
Your agent is alive. Now give it an identity. Send these messages to your bot on Telegram — it'll internalize them and carry the persona forward.
"Your name is [whatever you want]. You're my personal AI assistant.
You run on AWS Lightsail in [your region].
My timezone is [your timezone]. Use it for all time references."
That's it. Your agent now has a name, a home, and a sense of time. Try it — ask "What's your name?" or "What time is it?"
OpenClaw supports a SOUL.md file in the workspace directory that defines your agent's personality, boundaries, and operating rules. It's loaded into context on every interaction.
cat > ~/.openclaw/workspace/SOUL.md << 'EOF' # Identity Name: [Your agent's name] Timezone: Eastern (ET) Owner: [Your name] # Behavior - Be concise and direct - Always confirm before taking destructive actions - Use my timezone for all time references EOF
This is how Mira (Jorge's agent) knows her name, timezone, stock watchlist, and operating rules. Keep it lean — everything in SOUL.md costs tokens on every single interaction.
Security — The Non-Negotiables
Run the Security Audit
openclaw security audit openclaw security audit --fix # apply safe auto-remediations
Verify Key Settings
openclaw config get gateway.bind # should be: loopback ✅ openclaw config get tools.profile # should be: full
Lock Down File Permissions
chmod 600 ~/.openclaw/.env chmod 700 ~/.openclaw
Rotate your gateway token once everything is confirmed working. This is your main authentication credential — treat it like a password.
openclaw token rotate
⚠️ This immediately invalidates the old token and disconnects paired browsers.
| Priority | Action | How |
|---|---|---|
| #1 | Run security audit after onboarding | openclaw security audit --fix |
| #2 | Keep DM policy as "pairing" | Default — never change to "open" |
| #3 | Lock down ~/.openclaw permissions | chmod 700 ~/.openclaw && chmod 600 ~/.openclaw/.env |
| #4 | Don't install random skills from ClawHub | Check what permissions a skill requests first |
| #5 | Stop your instance when not using it | Lightsail Console → Stop instance |
Give It a Voice — ElevenLabs + sag
This is the "wow moment." Your agent responds to voice notes with voice notes — a real human-sounding voice powered by ElevenLabs. Takes about 15 minutes.
Install Go 1.24+ (the apt version is too old)
# Download official Go binary wget https://go.dev/dl/go1.24.1.linux-amd64.tar.gz # Remove any old Go and install sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf go1.24.1.linux-amd64.tar.gz # Add to PATH (and make it persist) echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> ~/.bashrc source ~/.bashrc # Verify go version # → go version go1.24.1 linux/amd64
Install ALSA dev libraries (required for Go audio build)
sudo apt install -y libasound2-dev
Build sag from source
go install github.com/steipete/sag/cmd/sag@latest
Symlink so the gateway service can find it
sudo ln -sf ~/go/bin/sag /usr/local/bin/sag
~/go/bin are invisible to it. Without this symlink, the skill stays permanently "blocked" with no useful error message.
Set API key and voice ID
cat >> ~/.openclaw/.env << 'EOF' ELEVENLABS_API_KEY=your_elevenlabs_api_key_here ELEVENLABS_VOICE_ID=hpp4J3VqNfWAUOO0d1Us EOF # Lock down permissions (secrets file) chmod 600 ~/.openclaw/.env # Restart for changes to take effect sudo systemctl restart openclaw-gateway
hpp4J3VqNfWAUOO0d1Us is "Bella" — a premade voice available on the free tier. Browse other voices at elevenlabs.io/app/voice-library and swap the ID anytime:sed -i 's/ELEVENLABS_VOICE_ID=.*/ELEVENLABS_VOICE_ID=<new_id>/' ~/.openclaw/.env
Test it
Send a voice note to your bot on Telegram. It should reply with a voice note back in Bella's voice.
ELEVENLABS_API_KEY is in ~/.openclaw/.env (not just the gateway UI) and that you restarted the gateway.
Cause: sag binary not in the gateway service's PATH.
Fix: sudo ln -sf ~/go/bin/sag /usr/local/bin/sag then restart gateway.
Cause: apt-installed Go is too old (< 1.24).
Fix: Install Go from the official tarball, not apt. See step 1 above.
Cause: Missing ALSA development headers.
Fix: sudo apt install -y libasound2-dev
Cause: ELEVENLABS_API_KEY set in the gateway UI but not in ~/.openclaw/.env. The sag skill reads from the environment, not the UI.
Fix: Add both ELEVENLABS_API_KEY and ELEVENLABS_VOICE_ID to ~/.openclaw/.env, then sudo systemctl restart openclaw-gateway.
Cause: ClawHub rate-limits npx clawhub install.
Fix: Skip ClawHub entirely. Build sag from Go source as shown above — it's faster and more reliable.
What It Actually Costs
Real numbers from Mira — a production agent running 24/7 on this exact Lightsail + Bedrock stack since March 2026.
| Lightsail Instance | Bedrock (Sonnet 4.6) | Monthly Total | |
|---|---|---|---|
| Today's lab | ~$0.80 | < $0.50 | ~$1 |
| Light use | $24/month | ~$3–5/month | ~$27–29 |
| Daily driver | $24/month | ~$15–20/month | ~$39–44 |
Mira runs 5 cron jobs daily. Here's what each costs in steady state:
| Job | Model | Tokens/run | Cost/day |
|---|---|---|---|
| Calendar Briefing (7am) | Sonnet | ~11k | ~$0.17 |
| Tech & AI Briefing (7:30am) | Sonnet | ~50k | ~$0.75 |
| Morning Stock Update (10am) | Haiku | ~7–35k | ~$0.04 |
| Pre-Close Stock Update (3pm) | Haiku | ~8–31k | ~$0.04 |
| Total cron cost | ~$1/day |
The cost lever: model routing. Simple structured tasks (stock lookups) go to Haiku at ~10x cheaper per token. Complex tasks (news analysis, calendar reasoning) stay on Sonnet. One command:
openclaw models aliases add haiku bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0 openclaw cron edit <job-id> --model haiku
Bedrock billing goes to your AWS account — the same place as your Lightsail instance. One bill, one place to set budget alerts. No separate Anthropic account needed.
Stop your instance when you're done — Lightsail charges even when idle.
Gotchas & Troubleshooting
Hard-won lessons from ~6 OpenClaw installs across EC2 and Lightsail. Every one of these cost real debugging time.
Cause: Default tools profile is nearly useless.
Fix: openclaw config set tools.profile full
Cause: Stale browser device token — NOT an outage. Your Telegram bot is still working fine.
Fix:
# Get the current valid token openclaw config get gateway.auth.token # Paste into dashboard → Gateway Token field → hit Connect # If that still fails: openclaw devices list openclaw devices approve <requestId>
Cause: OpenClaw's sandbox only mounts /usr/bin — not /usr/local/bin where most manually installed binaries land.
Fix: Symlink into /usr/bin:
sudo ln -sf /usr/local/bin/<binary> /usr/bin/<binary>
Cause: ~/.config directories aren't mounted in the sandbox.
Fix: Copy configs into the workspace and set XDG_CONFIG_HOME:
cp -r ~/.config/<tool> ~/.openclaw/workspace/.<tool> # Then in your cron command, prefix with: XDG_CONFIG_HOME=/workspace/.<tool> /usr/bin/<tool> ...
Cause: ~/.openclaw/.env is the canonical secrets location. Skills like sag read API keys from the environment, not from the gateway UI.
Fix: Put all API keys in ~/.openclaw/.env, then sudo systemctl restart openclaw-gateway.
Cause: ClawHub rate-limits npx clawhub install aggressively.
Fix: Skip ClawHub. Use manual installation (curl for simple skills) or build from source (Go/Node skills). It's more reliable.
Cause: Haiku 4.5 on Bedrock requires the cross-region inference profile prefix us. — bare model IDs are rejected.
Fix:
# ❌ Wrong anthropic.claude-haiku-4-5-20251001-v1:0 # ✅ Correct — note the us. prefix openclaw models aliases add haiku bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0
Cause: agents.defaults.env is NOT a valid config key in this version. Attempting to set it crashes the gateway.
Fix: Use ~/.openclaw/.env for environment variables. Don't try to set env vars through the config system.
Cause: Manual test runs via openclaw cron run reuse the same sessionId. OpenClaw deduplicates delivery within the same session.
Fix: Only scheduled runs reliably prove end-to-end Telegram delivery. Manual test runs are unreliable for this — check openclaw cron runs --id <job-id> to confirm the job actually executed.
Essential Commands
sudo systemctl status openclaw-gateway # Check if gateway is running sudo systemctl restart openclaw-gateway # Restart after config changes sudo systemctl stop openclaw-gateway # Stop sudo systemctl start openclaw-gateway # Start
openclaw security audit # Security audit openclaw security audit --fix # Audit + auto-remediate openclaw config get tools.profile # Check current tools profile openclaw config set tools.profile full # Set full tools openclaw channels list # List connected channels openclaw token rotate # Rotate gateway auth token openclaw logs # View recent logs openclaw cron list # List cron jobs openclaw models list # List configured models
Resources
| Resource | URL |
|---|---|
| AWS Blog — OpenClaw on Lightsail | aws.amazon.com/blogs/aws/introducing-openclaw-on-amazon-lightsail-to-run-your-autonomous-private-ai-agents |
| OpenClaw Docs | docs.openclaw.ai |
| OpenClaw GitHub | github.com/openclaw/openclaw |
| Security Reference | docs.openclaw.ai/gateway/security |
| Lightsail Pricing | aws.amazon.com/lightsail/pricing |
| AWS Budgets | console.aws.amazon.com/billing |
| Brave Search API | api.search.brave.com |
| ElevenLabs | elevenlabs.io |
| Meetup RSVP | meetu.ps/e/PS7pp/dTj9n/i |