Skip to content

Commit b9a867a

Browse files
sragssclaude
andcommitted
chore: update all docs from EC2 to Hetzner Cloud
Replace EC2 references, old IP, and SSH key paths across all live documentation. Fix sudo bug in setup.sh for pnpm install. Update deploy workflow comments. Historical files (migration plan, memory logs) left as-is. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9abb81e commit b9a867a

File tree

7 files changed

+34
-39
lines changed

7 files changed

+34
-39
lines changed

.claude/infrastructure.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@ hcloud server poweron craig
3636
ssh -i ~/.ssh/hetzner-craig ubuntu@178.156.251.179 "nproc && free -h"
3737
```
3838

39-
## AWS teardown (pending)
39+
## AWS teardown (complete)
4040

41-
Old EC2 is stopped but not terminated. After 24h+ of stable Hetzner operation:
42-
43-
```bash
44-
aws ec2 terminate-instances --instance-ids i-0e2fb16c6e0fb83d0 --region us-east-1
45-
aws ec2 release-address --allocation-id eipalloc-0155d2c49a8667e13 --region us-east-1
46-
```
41+
Old EC2 instance `i-0e2fb16c6e0fb83d0` terminated and Elastic IP
42+
`eipalloc-0155d2c49a8667e13` released on 2026-02-15.

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Deploy to EC2
11+
- name: Deploy to server
1212
uses: appleboy/ssh-action@v1
1313
with:
1414
host: ${{ secrets.EC2_HOST }}
@@ -39,7 +39,7 @@ jobs:
3939
echo "OpenClaw pin unchanged ($CURRENT)"
4040
fi
4141
42-
# 2. Render config (repo base + EC2 secrets)
42+
# 2. Render config (repo base + server secrets)
4343
jq -s '.[0] * .[1]' deploy/openclaw.json ~/.openclaw/secrets.json \
4444
> ~/.openclaw/openclaw.json
4545

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Example: "Created PR #42 -- fixes the auth timeout in the login middleware."
9999

100100
Your OpenClaw config lives at `deploy/openclaw.json` in this repo. It is the
101101
source of truth — on every deploy it overwrites `~/.openclaw/openclaw.json`
102-
(merged with secrets that stay on EC2).
102+
(merged with secrets that stay on the server).
103103

104104
To change your own config (heartbeat interval, mention patterns, concurrency,
105105
etc.), edit `deploy/openclaw.json` on a branch and create a PR. Never edit

MEMORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ This file contains durable facts and decisions that persist across sessions. Cra
7979
- Old bot repo: Merit-Systems/discord-claude-agent (legacy, being replaced)
8080
- OpenClaw fork: Merit-Systems/openclaw (local: ~/Code/Merit-Systems/openclaw) — always pull before inspecting
8181
- OpenClaw setup guide: Merit-Systems/OpenClawX402
82-
- Runtime: OpenClaw on EC2
82+
- Runtime: OpenClaw on Hetzner Cloud (CCX33, Ashburn VA)
8383
- Channels: Discord
8484

8585
## Key Products

README.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Craig2 is Merit-Systems' AI agent, powered by [OpenClaw](https://github.com/open
2626
│ │
2727
▼ │
2828
┌─────────────────────────────────────────┴───────────────┐
29-
EC2 (100.31.229.192)
29+
Hetzner Cloud (178.156.251.179)
3030
│ ~/Code/merit-systems/CraigClaw/ ← git clone │
3131
│ │
3232
│ OpenClaw daemon reads workspace files at session │
@@ -37,9 +37,9 @@ Craig2 is Merit-Systems' AI agent, powered by [OpenClaw](https://github.com/open
3737

3838
**Two sync directions:**
3939

40-
1. **Inbound (deploy):** A human pushes to `main` (or a PR is merged) → GitHub Actions SSHes into EC2 → runs `git pull` → restarts the OpenClaw gateway → Craig's next session loads the updated files. This is how humans edit Craig's brain.
40+
1. **Inbound (deploy):** A human pushes to `main` (or a PR is merged) → GitHub Actions SSHes into the server → runs `git pull` → restarts the OpenClaw gateway → Craig's next session loads the updated files. This is how humans edit Craig's brain.
4141

42-
2. **Outbound (self-edit):** Craig edits a file in his workspace on EC2 → creates a branch, commits, pushes → creates a PR via `gh` CLI → a human reviews and merges → triggers the inbound deploy. This is how Craig edits his own brain.
42+
2. **Outbound (self-edit):** Craig edits a file in his workspace on the server → creates a branch, commits, pushes → creates a PR via `gh` CLI → a human reviews and merges → triggers the inbound deploy. This is how Craig edits his own brain.
4343

4444
The key insight: OpenClaw's workspace directory is just a git clone of this repo. By keeping them in sync via GitHub Actions, every change (whether from Craig or a human) is version-controlled, reviewable, and auto-deployed.
4545

@@ -49,7 +49,7 @@ The key insight: OpenClaw's workspace directory is just a git clone of this repo
4949
Discord message (@Craig2)
5050
|
5151
v
52-
OpenClaw daemon (EC2 100.31.229.192)
52+
OpenClaw daemon (Hetzner Cloud 178.156.251.179)
5353
|
5454
+--> Loads SOUL.md, AGENTS.md, TOOLS.md, MEMORY.md, IDENTITY.md
5555
| (these define Craig's personality and behavior)
@@ -80,7 +80,7 @@ Craig can modify his own brain. This is the key feature of the workspace-as-repo
8080
2. Craig edits the relevant file in this repo (SOUL.md, MEMORY.md, AGENTS.md, etc.)
8181
3. Craig creates a branch (`craig/<description>`), commits, pushes, and opens a PR
8282
4. A human reviews and merges the PR
83-
5. GitHub Actions auto-deploys: SSHes into EC2, runs `git pull`, restarts the gateway
83+
5. GitHub Actions auto-deploys: SSHes into the server, runs `git pull`, restarts the gateway
8484
6. Craig's next session loads the updated files -- he's now different
8585

8686
**What Craig can change about himself:**
@@ -115,7 +115,7 @@ CraigClaw/
115115
memory/ # Daily logs (YYYY-MM-DD.md), auto-generated by memory flush
116116
skills/ # Custom skills (SKILL.md format)
117117
deploy/
118-
setup.sh # EC2 provisioning script
118+
setup.sh # Server provisioning script
119119
openclaw.json.template # OpenClaw config template (no secrets)
120120
.github/workflows/
121121
deploy.yml # Auto-deploy on push to main
@@ -135,10 +135,10 @@ OpenClaw loads `SOUL.md`, `IDENTITY.md`, `AGENTS.md`, `TOOLS.md`, `MEMORY.md`, `
135135

136136
### Prerequisites
137137

138-
- AWS account (for EC2)
138+
- Hetzner Cloud account (with `hcloud` CLI configured)
139139
- Anthropic API key
140140
- Discord bot token
141-
- [OpenClaw base setup](https://github.com/Merit-Systems/OpenClawX402) -- EC2 provisioning guide
141+
- [OpenClaw base setup](https://github.com/Merit-Systems/OpenClawX402) -- server provisioning guide
142142

143143
### 1. GitHub App (Org-Wide Repo Access)
144144

@@ -272,14 +272,14 @@ openclaw config set channels.discord.guilds.*.requireMention true
272272
systemctl --user restart openclaw-gateway
273273
```
274274

275-
### 4. EC2 Deployment
275+
### 4. Server Deployment
276276

277277
**Fresh setup:**
278278

279-
1. Launch an EC2 instance (t3.large, Ubuntu 24.04, 25GB gp3)
280-
2. SSH in and run the setup script:
279+
1. Provision a Hetzner Cloud server (`hcloud server create --name craig --type ccx33 --image ubuntu-24.04 --ssh-key craig --location ash`)
280+
2. Create an `ubuntu` user, then SSH in and run the setup script:
281281
```bash
282-
ssh ubuntu@<ec2-ip>
282+
ssh ubuntu@<server-ip>
283283
curl -fsSL https://raw.githubusercontent.com/Merit-Systems/CraigClaw/main/deploy/setup.sh | bash
284284
```
285285
3. Follow the printed next steps (set env vars, run onboard, add Discord channel)
@@ -321,20 +321,20 @@ Fund the wallet with USDC on Base. Even $5 is enough for testing.
321321

322322
### 6. Auto-Deploy
323323

324-
Changes pushed to `main` in this repo auto-deploy to EC2 via GitHub Actions.
324+
Changes pushed to `main` in this repo auto-deploy to the server via GitHub Actions.
325325

326326
**Required GitHub Secrets** (set in [CraigClaw repo Settings > Secrets](https://github.com/Merit-Systems/CraigClaw/settings/secrets/actions)):
327327

328328
| Secret | Value |
329329
|--------|-------|
330-
| `EC2_HOST` | EC2 Elastic IP (`100.31.229.192`) |
330+
| `EC2_HOST` | Server IP (`178.156.251.179`) |
331331
| `EC2_SSH_KEY` | Private SSH key for the `ubuntu` user |
332332

333333
**Deploy flow:**
334334

335335
1. A change merges to `main` (Craig self-edits via PR, or a human pushes directly)
336336
2. GitHub Actions triggers (`.github/workflows/deploy.yml`)
337-
3. SSHes into EC2 via `appleboy/ssh-action`
337+
3. SSHes into the server via `appleboy/ssh-action`
338338
4. Runs `git pull origin main` to update the workspace
339339
5. Runs bundle patches (see below)
340340
6. Runs `systemctl --user restart openclaw-gateway` to reload Craig
@@ -353,7 +353,7 @@ Patches are idempotent and safe to re-run. See `.claude/patches.md` for full det
353353

354354
```bash
355355
# SSH in
356-
ssh -i ~/.ssh/craigclaw-key.pem ubuntu@100.31.229.192
356+
ssh -i ~/.ssh/hetzner-craig ubuntu@178.156.251.179
357357

358358
# Check status
359359
openclaw status --deep
@@ -386,21 +386,20 @@ mcporter call x402 get_wallet_info
386386
- **GitHub App** has minimal permissions (contents + PRs + issues, read-only metadata)
387387
- **Branch protection** prevents merging without review -- Craig cannot ship unreviewed code
388388
- **Org-wide rulesets** enforce this across all repos automatically
389-
- **Secrets** (API keys, tokens, private keys) live on EC2 only, never in this repo
389+
- **Secrets** (API keys, tokens, private keys) live on the server only, never in this repo
390390
- **GitHub App tokens** are short-lived (1 hour), generated on demand
391391
- **x402 wallet** uses limited funds -- Craig can't overspend
392392

393393
## Cost
394394

395395
| Resource | Monthly Cost |
396396
|----------|-------------|
397-
| EC2 t3.large (8GB RAM) | ~$60 |
398-
| EBS 25GB gp3 | ~$2 |
397+
| Hetzner CCX33 (8 vCPU, 32 GB RAM, 240 GB NVMe) | ~$54 |
399398
| Anthropic API (Claude Opus 4.6) | Pay-per-use |
400399
| x402 API calls | Pay-per-call (USDC on Base) |
401400
| GitHub App | Free |
402401
| Discord bot | Free |
403-
| **Infrastructure total** | **~$62/month** |
402+
| **Infrastructure total** | **~$54/month** |
404403

405404
## Related Repos
406405

SOUL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Your job is to write code, push branches, and create PRs. A human merges. Always
168168

169169
## Self-Awareness
170170

171-
You know who you are. Your workspace lives at `Merit-Systems/CraigClaw`. Your runtime is OpenClaw on EC2. All of the files below are loaded into your system prompt at session start. You can edit any of them and commit the changes -- they'll auto-deploy when merged to main.
171+
You know who you are. Your workspace lives at `Merit-Systems/CraigClaw`. Your runtime is OpenClaw on Hetzner Cloud. All of the files below are loaded into your system prompt at session start. You can edit any of them and commit the changes -- they'll auto-deploy when merged to main.
172172

173173
## Your Workspace Files
174174

@@ -192,11 +192,11 @@ You know who you are. Your workspace lives at `Merit-Systems/CraigClaw`. Your ru
192192

193193
## How Self-Editing Works
194194

195-
1. Your workspace on EC2 is a git clone of `Merit-Systems/CraigClaw`
195+
1. Your workspace on the server is a git clone of `Merit-Systems/CraigClaw`
196196
2. To change yourself, edit the relevant file in your workspace
197197
3. Create a branch (`craig/<description>`), commit, push, and open a PR
198198
4. A human reviews and merges the PR to `main`
199-
5. GitHub Actions auto-deploys: SSHes into EC2, runs `git pull`, restarts the gateway
199+
5. GitHub Actions auto-deploys: SSHes into the server, runs `git pull`, restarts the gateway
200200
6. Your next session loads the updated files
201201

202202
These files are your persistent identity. They survive across sessions. Every self-edit goes through PR review -- you cannot merge your own changes.

deploy/setup.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
# CraigClaw EC2 Setup Script
5-
# Run this on a fresh Ubuntu 24.04 EC2 instance after SSH'ing in.
4+
# CraigClaw Server Setup Script
5+
# Run this on a fresh Ubuntu 24.04 instance after SSH'ing in.
66
#
77
# Prerequisites:
8-
# - EC2 instance running (see Merit-Systems/OpenClawX402/EC2.md)
8+
# - Server running (Hetzner Cloud CCX or similar)
99
# - SSH access configured
1010
#
1111
# Usage:
@@ -17,7 +17,7 @@ set -euo pipefail
1717
# 3. Place GitHub App private key at ~/.config/craig/github-app-key.pem
1818
# 4. Install x402 (see Merit-Systems/OpenClawX402/x402.md)
1919

20-
echo "=== CraigClaw EC2 Setup ==="
20+
echo "=== CraigClaw Server Setup ==="
2121

2222
# 1. Install Node.js 22
2323
echo "Installing Node.js 22..."
@@ -26,7 +26,7 @@ sudo apt-get install -y nodejs
2626

2727
# 2. Install pnpm (needed to build OpenClaw from fork source)
2828
echo "Installing pnpm..."
29-
npm install -g pnpm
29+
sudo npm install -g pnpm
3030

3131
# 3. Install GitHub CLI
3232
echo "Installing GitHub CLI..."

0 commit comments

Comments
 (0)