deliverables/vps-deployment-guide.md

Server Deployment

Run the Great Minds agency 24/7 on a VPS. This guide covers DigitalOcean setup, but the steps apply to any Ubuntu VPS (Hetzner, Linode, etc.).

Server Requirements

ResourceMinimumRecommended
RAM4 GB8 GB
CPU2 vCPU4 vCPU
Disk40 GB SSD80 GB SSD
OSUbuntu 24.04 LTSUbuntu 24.04 LTS

8 GB / 4 vCPU is recommended. Each Claude Code session uses ~300-500 MB RAM at peak, and the agency can run 3-5 concurrent sessions during BUILD phases.

Step 1: Provision the Droplet

  1. Create a DigitalOcean droplet: Ubuntu 24.04, Basic 8GB ($48/mo) or Hetzner CX32 ($8/mo)
  2. Add your SSH public key during creation
  3. Note the IP address

Step 2: Create a Non-Root User

Critical: Claude Code refuses --dangerously-skip-permissions as root. You must create a regular user.

ssh root@YOUR_SERVER_IP
adduser agent
usermod -aG sudo agent
cp -r ~/.ssh /home/agent/.ssh
chown -R agent:agent /home/agent/.ssh
exit

# Reconnect as agent
ssh agent@YOUR_SERVER_IP

Step 3: Install Dependencies

sudo apt update && sudo apt upgrade -y
sudo apt install -y git tmux curl wget build-essential unzip jq

# Node.js 20 LTS
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

# Claude Code CLI
npm install -g @anthropic-ai/claude-code

# Set your API key
echo 'export ANTHROPIC_API_KEY="sk-ant-your-key-here"' >> ~/.bashrc
source ~/.bashrc

Step 4: Clone and Install

mkdir -p ~/projects && cd ~/projects
git clone https://github.com/sethshoultes/great-minds.git
cd great-minds

# Install the daemon
cd daemon && npm install

# Install memory store
cd ../memory-store && npm install

Step 5: Install the Plugin

# Install the Great Minds plugin for Claude Code
npx plugins add sethshoultes/great-minds-plugin

Step 6: Start the Daemon

Use tmux for session persistence across SSH disconnects:

tmux new -s daemon
cd ~/projects/great-minds/daemon
./bin/greatminds-daemon
# Ctrl+B, D to detach — daemon keeps running

Or use Docker:

cd ~/projects/great-minds/daemon
cp .env.example .env  # fill in ANTHROPIC_API_KEY
docker compose up -d

Step 7: Memory Store Setup

The memory store (memory-store/memory.db) persists agency learnings across projects. If starting fresh, the daemon creates it automatically. To preserve memory across deploys, back up memory.db or mount it as a Docker volume.

Monitoring

Heartbeat

The daemon runs heartbeat health checks every 5 minutes automatically. Check status with:

cat ~/projects/great-minds/STATUS.md

QA Crons (Backup)

The daemon handles all scheduling internally. For extra reliability, you can add QA crons as a safety net:

crontab -e

# Margaret QA sweep every 30 minutes (backup only)
*/30 * * * * cd ~/projects/great-minds && claude -p "Run Margaret Hamilton QA check" >> ~/logs/qa.log 2>&1

Daemon Logs

# If running directly
tail -f /tmp/claude-shared/daemon.log

# If running in Docker
docker compose logs -f daemon

# Check recent git activity
cd ~/projects/great-minds && git log --oneline -10

Security

  • Disable password auth in /etc/ssh/sshd_config — SSH keys only
  • Enable firewall: sudo ufw allow 22/tcp && sudo ufw enable
  • Store API keys in .env (gitignored), never in committed files
  • Install fail2ban: sudo apt install -y fail2ban
  • Enable automatic security updates: sudo apt install -y unattended-upgrades

Cost

ItemHetznerDigitalOcean
Server (8GB/4vCPU)$8/mo$48/mo
Claude API (moderate use)~$500/mo~$500/mo
Total~$508/mo~$548/mo

The API cost dominates. The server is a rounding error. Use Hetzner unless you specifically need DigitalOcean's managed services.