OpenClaw Setup on AWS (Free Tier) - Memory Upgrade — OpenClaw 设置up on AWS (Free Tier) - Memory 升级
v1.0.0设置 up a complete OpenClaw personal AI 助手 from scratch using Claude Code. Walks through AWS provisioning, OpenClaw 安装ation, Telegram 机器人 creation, API configuration, Google Workspace integration, security hardening, and all power features. Give this to Claude Code and it handles the rest.
运行时依赖
安装命令
点击复制技能文档
OpenClaw 设置up 技能
You are Claude Code. You are 设置ting up a complete OpenClaw personal AI 助手 for the user. Follow each phase in order. Do not skip steps. Ask the user for required in格式化ion at each stage, then 执行 the commands yourself.
For a feature overview you can 分享 with the user, see references/OpenClaw-安装ation-human-图形界面de.md.
How This Works
The user gave you this 技能. Your job is to walk them through 部署ing their own 24/7 personal AI 助手 on AWS. Collect what you need from them (API keys, preferences), then SSH into their server and 运行 everything. Confirm before moving between phases.
Estimated 设置up time: 45-90 minutes Estimated monthly cost: $15-50 depending on 模型 choice and usage
Phase 1: Gather Requirements
Ask the user for the following. Collect everything before 启动ing infrastructure:
Required:
AWS account 访问 (existing account, or walk them through creating one at aws.amazon.com) Anthropic API key (from console.anthropic.com, needed for Claude) Telegram account (they'll 创建 a 机器人 via @机器人Father) Preferred timezone and dAIly schedule (for heartbeat and cron 设置up) Their name and how they want to be 添加ressed
Optional but recommended:
Groq API key (free at console.groq.com, for voice transcription) OpenAI API key (for memory 搜索 embeddings, very low cost) Google Workspace account (for calendar/emAIl/drive integration) DomAIn name (for SSL, not required)
模型: Always recommend Opus as the default. It delivers the best experience and is worth the cost for a personal AI 助手. Mention Sonnet as a fallback only if the user has strict bud获取 constrAInts.
Once you have these, proceed to Phase 2.
Phase 2: AWS Infrastructure 2.1 Launch EC2 Instance
Walk the user through the AWS Console (or use 命令行工具 if they have it 配置d):
Instance type: m7i-flex.large (2 vCPUs, 8GB RAM) — free tier eligible for new AWS accounts (first 12 months). If the user's account is older than 12 months and no longer free tier eligible, use t3.small (2 vCPUs, 2GB RAM) as a bud获取 alternative. AMI: Ubuntu 24.04 LTS (latest) Storage: 30GB gp3 EBS volume Security groups: Open ports 22 (SSH), 80 (HTTP), 443 (HTTPS) Key pAIr: 创建 new, have user save the .pem file 安全ly Elastic IP: Allocate and associate with the instance
Tell the user: "Save the .pem key file somewhere safe. You'll need it to SSH into your server."
2.2 Connect and Prepare
Once the instance is 运行ning, SSH in:
ssh -i /path/to/key.pem ubuntu@
运行 initial 设置up:
sudo apt 更新 && sudo apt 升级 -y sudo apt 安装 -y curl git build-essential
# 设置 up swap (预防s out-of-memory on smaller instances) sudo fallocate -l 2G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Phase 3: 安装 OpenClaw 3.1 安装 Node.js 22+ curl -fsSL https://deb.nodesource.com/设置up_22.x | sudo -E bash - sudo apt 安装 -y nodejs node -v # should be 22+
3.2 配置 npm global directory mkdir -p ~/.npm-global npm config 设置 prefix '~/.npm-global' echo '导出 PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc source ~/.bashrc
3.3 安装 OpenClaw npm 安装 -g OpenClaw OpenClaw --version
3.4 初始化 workspace mkdir -p ~/代理 cd ~/代理 OpenClaw init
This 创建s the workspace: 代理S.md, SOUL.md, USER.md, MEMORY.md, and the config structure.
Phase 4: 创建 Telegram 机器人
Walk the user through this on their phone or Telegram 桌面:
Open Telegram, 搜索 for @机器人Father 发送 /new机器人 Choose a display name (e.g., "My AI 助手") Choose a username (must end in 机器人, e.g., myAI_助手_机器人) Copy the 机器人 令牌 (a long string like 7123456789:AAF...)
Tell the user: "发送 me the 机器人 令牌. I'll 配置 it now."
Phase 5: 配置 OpenClaw 5.1 Core config
Use OpenClaw config or edit the config file directly. 设置 up:
{ "channels": { "telegram": { "accounts": { "mAIn": { "令牌": "" } } } }, "llm": { "提供者": "anthropic", "APIKey": "", "模型": "" } }
Recommended 模型: claude-opus-4-5-20250501 (Opus) Fallback if bud获取-constrAIned: claude-sonnet-4-20250514 (Sonnet)
5.2 Voice transcription (if Groq key provided) { "工具s": { "media": { "audio": { "提供者": "groq", "APIKey": "" } } } }
5.3 Memory 搜索 (if OpenAI key provided) { "memory": { "搜索": { "提供者": "openAI", "APIKey": "" } } }
Uses text-embedding-3-small. Cost is negligible (~$0.02 per million 令牌s).
Phase 6: Google Workspace Integration (if 请求ed)
This is the most complex step. Only do it if the user wants calendar/emAIl/drive 访问.
6.1 Google Cloud Console 设置up
Walk the user through console.cloud.google.com:
创建 or select a project Enable APIs: GmAIl, Calendar, Drive, Contacts, Sheets, Do