Claude Context System — Complete Setup & Recovery Guide¶
Created: 2026-03-27 Owner: Brian Witlin (bwitlin@rootphi.com)
What This System Is¶
A persistent memory system for Claude conversations. It stores your preferences, project history, conversation summaries, and files in an organized folder structure on your Mac, with automatic nightly backups to Dreamhost. When you start a new Cowork session, Claude reads this context and picks up where you left off.
What's Installed¶
1. Context Folder (on your Mac)¶
- Location:
~/Documents/claude-context/ - Contains:
GLOBAL.md— Your profile, preferences, active projects, people, terminology_index.md— Master catalog of all conversations (dates, tags, summaries)chats/— Per-conversation folders with summaries, thread context, and filesprojects/— Cross-conversation project groupingsSETUP-GUIDE.md— This file
2. Context-Manager Skill (Cowork plugin)¶
- Location:
~/.claude/skills/context-manager/SKILL.md - What it does: Tells Claude how to read, track, and save context each session
- Triggers on: "save this", "remember this", "what do you know about me", "pick up where I left off", "load my context", "wrap up this chat", etc.
3. Backup Script (daily sync to Dreamhost)¶
- Script:
~/Documents/claude-context-backup.sh - Schedule config:
~/Library/LaunchAgents/com.rootphi.claude-context-backup.plist - Runs: Every day at 10:00 PM automatically
- Backs up to: Dreamhost via SSH/rsync (only changed files)
- Log file:
~/Documents/claude-context/.backup-log.txt
3b. Knowledge Base Website (context.rootphi.net)¶
- Deploy script:
~/Documents/claude-context-deploy.sh - Password reset script:
~/Documents/claude-context-reset-password.sh - MkDocs config:
~/Documents/claude-context-mkdocs.yml - Built site output:
~/Documents/claude-context-site/(generated, do not edit) - Password protection:
.htaccess+.htpasswdin the claude-context folder - Login: Username
brian, password set via reset script - URL: https://context.rootphi.net
- Hosted on: Dreamhost under claude_backup user
- Requires: MkDocs + Material theme (
pip3 install mkdocs mkdocs-material)
4. SSH Key (passwordless Dreamhost access)¶
- Private key:
~/.ssh/claude_backup_key - Public key:
~/.ssh/claude_backup_key.pub - Used by: The backup script to connect to Dreamhost without a password
5. Python 3.12.9¶
- Installed from: python.org standalone installer
- Location:
/Library/Frameworks/Python.framework/Versions/3.12/ - Command:
python3
Dreamhost Backup Details¶
| Setting | Value |
|---|---|
| Host | iad1-shared-e1-11.dreamhost.com |
| Username | claude_backup |
| Port | 22 |
| Remote path | /home/claude_backup/claude-context-backup/ |
| Access type | SFTP + SSH |
| Plan | Shared Unlimited |
| Associated domain | None (standalone user) |
| Dreamhost panel | panel.dreamhost.com (Brian's rootphi Chrome profile) |
How to Recover Everything From Scratch¶
If your Mac is lost, replaced, or wiped, follow these steps on the new machine:
Step 1: Download the backup from Dreamhost¶
You'll need SFTP access. Use any SFTP client (Cyberduck, FileZilla, or Terminal):
# Option A: From Terminal (after setting up SSH key — see Step 3)
rsync -avz -e "ssh -p 22 -i ~/.ssh/claude_backup_key" \
claude_backup@iad1-shared-e1-11.dreamhost.com:/home/claude_backup/claude-context-backup/ \
~/Documents/claude-context/
# Option B: Use an SFTP client
# Host: iad1-shared-e1-11.dreamhost.com
# Port: 22
# Username: claude_backup
# Password: (your Dreamhost password for this user)
# Navigate to: /home/claude_backup/claude-context-backup/
# Download everything to: ~/Documents/claude-context/
Step 2: Install Python 3¶
curl -o ~/Downloads/python-installer.pkg https://www.python.org/ftp/python/3.12.9/python-3.12.9-macos11.pkg
open ~/Downloads/python-installer.pkg
# Click through the installer
Verify: python3 --version should show Python 3.12.9
Step 3: Generate a new SSH key and send it to Dreamhost¶
ssh-keygen -t ed25519 -f ~/.ssh/claude_backup_key -N ""
ssh-copy-id -i ~/.ssh/claude_backup_key.pub -p 22 claude_backup@iad1-shared-e1-11.dreamhost.com
# Type 'yes' when asked about the host fingerprint
# Enter your Dreamhost password for claude_backup when prompted
Step 4: Restore the backup script and schedule¶
The backup script and schedule plist should be in your recovered Documents folder. If not, recreate them:
Backup script — save as ~/Documents/claude-context-backup.sh:
#!/bin/bash
REMOTE_HOST="iad1-shared-e1-11.dreamhost.com"
REMOTE_USER="claude_backup"
REMOTE_PATH="/home/claude_backup/claude-context-backup/"
LOCAL_PATH="$HOME/Documents/claude-context/"
LOG_FILE="$HOME/Documents/claude-context/.backup-log.txt"
if [ ! -d "$LOCAL_PATH" ]; then
echo "$(date): ERROR - Local context folder not found at $LOCAL_PATH" >> "$LOG_FILE"
exit 1
fi
echo "$(date): Starting backup..." >> "$LOG_FILE"
rsync -avz --delete \
-e "ssh -p 22 -i $HOME/.ssh/claude_backup_key -o StrictHostKeyChecking=accept-new" \
"$LOCAL_PATH" \
"${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}" \
>> "$LOG_FILE" 2>&1
if [ $? -eq 0 ]; then
echo "$(date): Backup completed successfully." >> "$LOG_FILE"
else
echo "$(date): ERROR - Backup failed. Check log for details." >> "$LOG_FILE"
fi
Make it executable: chmod +x ~/Documents/claude-context-backup.sh
Schedule plist — save as ~/Library/LaunchAgents/com.rootphi.claude-context-backup.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.rootphi.claude-context-backup</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/brianwitlin/Documents/claude-context-backup.sh</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>22</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<key>StandardOutPath</key>
<string>/tmp/claude-backup-stdout.log</string>
<key>StandardErrorPath</key>
<string>/tmp/claude-backup-stderr.log</string>
<key>RunAtLoad</key>
<false/>
</dict>
</plist>
Load it: launchctl load ~/Library/LaunchAgents/com.rootphi.claude-context-backup.plist
Step 5: Install the context-manager skill in Cowork¶
You'll need the .skill file. If you don't have it:
1. Open Cowork and start a new chat
2. Ask: "Can you help me install the context-manager skill? The SKILL.md content is in my ~/Documents/claude-context/SETUP-GUIDE.md"
3. Or manually create ~/.claude/skills/context-manager/SKILL.md with the skill content
Step 6: Test everything¶
# Test the backup
bash ~/Documents/claude-context-backup.sh
cat ~/Documents/claude-context/.backup-log.txt
# Test SSH connection
ssh -i ~/.ssh/claude_backup_key -p 22 claude_backup@iad1-shared-e1-11.dreamhost.com "ls -la claude-context-backup/"
# Verify Python
python3 --version
Deploy the Knowledge Base Website¶
bash ~/Documents/claude-context-deploy.sh
This builds the MkDocs site from your markdown files and pushes it to context.rootphi.net. Run this after updating context files if you want the website to reflect the latest changes.
Reset the Website Password¶
bash ~/Documents/claude-context-reset-password.sh
You'll be prompted for a new password. It updates both the local .htpasswd file and pushes the change to Dreamhost immediately.
Manual Backup (Anytime)¶
bash ~/Documents/claude-context-backup.sh
Check the log: cat ~/Documents/claude-context/.backup-log.txt
Check If Daily Backup Is Running¶
launchctl list | grep claude
If it shows com.rootphi.claude-context-backup, it's loaded and running on schedule.
Stop/Start the Daily Backup¶
# Stop
launchctl unload ~/Library/LaunchAgents/com.rootphi.claude-context-backup.plist
# Start
launchctl load ~/Library/LaunchAgents/com.rootphi.claude-context-backup.plist
Troubleshooting¶
Backup fails with "Permission denied": Your SSH key may not be set up on Dreamhost. Re-run:
ssh-copy-id -i ~/.ssh/claude_backup_key.pub -p 22 claude_backup@iad1-shared-e1-11.dreamhost.com
"python3: command not found": Reinstall Python from python.org (see Step 2 above).
Context-manager skill not triggering in Cowork:
Make sure you selected your Documents folder when starting the Cowork session. The skill needs access to ~/Documents/claude-context/.
Dreamhost password forgotten: Log into panel.dreamhost.com → Websites → SFTP Users → find claude_backup → Change password.
Important Security Notes¶
- The SSH private key (
~/.ssh/claude_backup_key) should never be shared with anyone - Your Dreamhost password for the claude_backup user is only stored in Dreamhost's systems — it's not saved anywhere on your Mac (the SSH key replaces it for automated access)
- API keys (OpenAI, Google, etc.) should be stored in
~/.zshrcor a.envfile, never pasted visibly in Terminal