Clone Your Bot: Building a Bot Army on AWS
Once you have a working OpenClaw instance on EC2, you can easily clone it to create multiple bots — each with their own identity, personality, and channel connections.
Overview
The process:
- Create an AMI from your working EC2 instance (snapshot of everything)
- Launch new instances from that AMI
- Customize each clone with new identity and tokens
Your original instance keeps running. Clones boot up ready to configure.
Step 1: Create an AMI from Your Running Instance
An AMI (Amazon Machine Image) captures your entire disk — OS, OpenClaw installation, configs, everything.
Via AWS Console
- Go to EC2 → Instances
- Select your running OpenClaw instance
- Click Actions → Image and templates → Create image
- Fill in the details:
- Image name:
openclaw-base-YYYY-MM-DD - Image description: "OpenClaw with Node, gateway configured, ready for customization"
- Reboot instance: Leave UNCHECKED (your bot keeps running, no downtime)
- Storage: Keep defaults
- Image name:
- Click Create image
Via AWS CLI
aws ec2 create-image \
--instance-id i-YOUR_INSTANCE_ID \
--name "openclaw-base-$(date +%Y-%m-%d)" \
--description "OpenClaw base image for bot army" \
--no-reboot
Wait for AMI to Complete
- Check progress: EC2 → AMIs (left sidebar)
- Status goes from
pending→available - Usually takes 5-15 minutes depending on disk size
Step 2: Launch a New Instance from Your AMI
Once the AMI is available:
- Go to EC2 → AMIs
- Select your AMI
- Click Launch instance from AMI
- Configure the new instance:
- Name: Give it a unique name (e.g.,
openclaw-bot-2) - Instance type: Same as original or adjust (
t3.smallworks for most bots) - Key pair: Use existing or create new
- Security group: Use same security group as original (needs ports 22, 443)
- Storage: Expand the volume details:
- Click Advanced in the Storage section
- Set Encrypted → Yes
- KMS key: default
aws/ebsis fine
- Name: Give it a unique name (e.g.,
- Click Launch instance
Note the new instance's public IP — you'll need this to SSH in and configure.
Step 3: Configure the Clone
SSH into your new instance:
ssh -i your-key.pem ubuntu@NEW_INSTANCE_IP
3.1 Create a New Telegram Bot (or other channel)
- Message @BotFather on Telegram
- Send
/newbot - Give it a name and username
- Copy the bot token
3.2 Update OpenClaw Config
Run the configuration wizard:
openclaw configure
Or edit the config file directly:
nano ~/.openclaw/openclaw.json
3.3 Give the Bot a New Identity
Edit the soul file:
nano ~/.openclaw/workspace/SOUL.md
Give this bot its own personality, name, and purpose.
3.4 Clear the Memory (Fresh Start)
# Clear previous bot's memories
rm -rf ~/.openclaw/workspace/memory/*
echo "# MEMORY.md - Long-Term Memory" > ~/.openclaw/workspace/MEMORY.md
# Optionally update other identity files
nano ~/.openclaw/workspace/USER.md
nano ~/.openclaw/workspace/IDENTITY.md
3.5 Restart the Gateway
openclaw gateway restart
3.6 Test It
Message your new bot on Telegram. It should respond with its new identity!
Creating a Clean Base Image
For easier cloning, create a "clean" AMI with no channel connections:
- Launch an instance from your working AMI
- SSH in and strip the channel connection:
# Remove Telegram connection rm -rf ~/.openclaw/telegram # Stop the gateway openclaw gateway stop - Create a new AMI from this cleaned instance
- Name it something like
openclaw-clean-base-YYYY-MM-DD
Now each clone starts fresh — just add your channel config and identity.
Checklist for Each New Bot
- ☐ New EC2 instance from AMI
- ☐ New Telegram bot token (or Discord/Slack/etc.)
- ☐ Updated channel config (
openclaw configure) - ☐ New
SOUL.mdidentity - ☐ Cleared memory files
- ☐ Gateway restart
Tips for Managing Multiple Bots
Naming Convention
Use consistent naming for instances and bots:
- EC2:
openclaw-claudia,openclaw-alfred,openclaw-jarvis - Telegram:
@ClaudiaAssistantBot,@AlfredButlerBot,@JarvisAIBot
Different Purposes
Each bot can specialize:
- Personal assistant bot
- Code review bot
- Customer support bot
- Home automation bot
Cost Optimization
- Use
t3.microort3.smallfor light-duty bots - Consider spot instances for non-critical bots
- Stop instances when not in use (bots go offline but data persists)
Shared Resources
Consider sharing:
- Same security group
- Same SSH key
- Same Claude API key (if within rate limits)
Quick Reference
| Task | Command/Location |
|---|---|
| Create AMI | EC2 → Instances → Actions → Create image |
| Launch from AMI | EC2 → AMIs → Launch instance |
| Edit config | ~/.openclaw/openclaw.json |
| Edit identity | ~/.openclaw/workspace/SOUL.md |
| Clear memory | rm -rf ~/.openclaw/workspace/memory/* |
| Restart gateway | openclaw gateway restart |
| Check status | openclaw gateway status |
Now go build your army! 🤖🤖🤖