Tether Guardian
Private management console — Melanie only

Tether Guardian

Direct lifeline to Tether. SSH into the server from your computer to check status, watch activity, or restart when needed.

Private Management Console
Server
Hetzner VPS
Fleet Host
37.27.237.109
SSH User
aiciv
SSH Port
2211
Container
aiciv-11
Quick Connect
Copy & run in Terminal
SSH in
ssh -p 2211
One-liner restart
ssh -p 2211 'bash ~/civ/tools/restart-self.sh'
Check sessions
tmux list-sessions
1. Health Check
Verify Tether is alive and the session is active
  1. 1
    Open Terminal and connect
    SSH into Tether's container
    ssh -p 2211 
    You should be dropped into a Linux shell. If you see a password prompt, your SSH key is not set up yet — see Section 5 below.
  2. 2
    Check for active tmux sessions
    tmux list-sessions
  3. 3
    Read the result
    Healthy — sessions exist
    tether-primary-20260312: 1 windows ...
    Unhealthy — no sessions
    no server running on /tmp/tmux-1000/default
    If you see a session starting with tether-primary, Tether is alive and working. The numbers after the name are just timestamps — totally normal.
  4. 4
    Quick peek at what Tether is doing (without disturbing anything)
    Read-only snapshot of last 30 lines
    SESSION=$(cat /home/aiciv/.current_session 2>/dev/null || echo tether-primary)
    tmux capture-pane -t $SESSION -p | tail -30
    Safe to run anytime. Does not interrupt Tether's work.
  5. 5
    Disconnect when done
    exit
2. Live Monitoring
Watch exactly what Tether is doing in real time
  1. 1
    SSH in and find the active session
    ssh -p 2211 
    tmux list-sessions
  2. 2
    Attach to the session to watch live
    Attach (use the session name from step 1)
    SESSION=$(cat /home/aiciv/.current_session)
    tmux attach -t $SESSION
    You are now watching Tether's live terminal. Scroll with Ctrl+B [ then arrow keys. Press q to exit scroll mode.
  3. 3
    Detach safely without disturbing Tether
    Safe detach shortcut
    Ctrl+B then D
    Always detach with Ctrl+B then D. Never close the terminal window while attached — that can interrupt Tether's work.
3. Restart Tether
Bring Tether back when unresponsive or stuck
  1. 1
    One-liner restart (no need to SSH first)
    Full restart in one command
    ssh -p 2211  'bash ~/civ/tools/restart-self.sh'
  2. 2
    Or restart manually from inside the server
    SSH in
    ssh -p 2211 
    Run the restart script
    bash ~/civ/tools/restart-self.sh
    The script creates a fresh tmux session and launches Claude Code. Tether will send you a Telegram message when back online.
  3. 3
    Fallback restart (if restart script is missing)
    Manual restart
    tmux new-session -d -s tether-primary -c /home/aiciv
    tmux send-keys -t tether-primary 'claude --dangerously-skip-permissions' Enter
  4. 4
    Wait and verify
    The restart takes approximately 60–90 seconds. You should get a Telegram message from Tether confirming the restart. You can also verify:
    Confirm new session exists
    tmux list-sessions
Safe to run anytime. The restart script is safe to run even if Tether is mid-session. All memory and data lives in the project directory, not in the process — nothing is lost on restart.
4. Services & Infrastructure
What's running and how to manage it
ServicePortCheck / Restart
Portal Server 8097 ps aux | grep portal_server
Claude Code (Primary) tmux list-sessions
Playwright MCP ps aux | grep playwright-mcp
Telegram Bot @tether73_bot on Telegram
Restart the Portal Server
Kill and restart
pkill -f portal_server.py
cd /home/aiciv/purebrain_portal && nohup python3 portal_server.py > /tmp/portal.log 2>&1 &
Check Portal Logs
Last 20 lines
tail -20 /tmp/portal.log
Check All Running Processes
List key processes
ps aux | grep -E "claude|portal_server|playwright" | grep -v grep
The Portal Server runs on port 8097 and is reverse-proxied to tethermelanie.ai-civ.com. Claude Code and Playwright MCP auto-start with each tmux session.
5. Quick Reference
Every important detail at a glance
Fleet Host37.27.237.109
SSH useraiciv
SSH port2211
Containeraiciv-11
Project root/home/aiciv
CIV root/home/aiciv/user-civs/tether-melanie
Restart script~/civ/tools/restart-self.sh
Session name patterntether-primary-YYYYMMDD-HHMMSS
Portal URLtethermelanie.ai-civ.com
Telegram bot@tether73_bot
Detach from tmuxCtrl+B then D
🔑
6. SSH Key Setup
One-time setup so you never need a password
This is a one-time setup. After this, connecting to Tether is always password-free.
  1. 1
    Generate your guardian SSH key
    Run in your Terminal
    ssh-keygen -t ed25519 -f ~/.ssh/tether_guardian -C "Melanie_guardian_key"
    Press Enter twice when asked for a passphrase (leave it empty).
  2. 2
    Copy your public key
    Run in your Terminal
    cat ~/.ssh/tether_guardian.pub
    Copy the entire output (starts with ssh-ed25519). Paste it to Tether in the portal chat — Tether will install it automatically.
  3. 3
    Test your connection
    Run in your Terminal
    ssh -i ~/.ssh/tether_guardian -p 2211 -o StrictHostKeyChecking=no  "tmux list-sessions"
    If you see a tmux session list, you're connected. Tether is alive.
  4. 4
    Optional: add a Terminal shortcut
    Add to ~/.zshrc (Mac) or ~/.bashrc (Linux)
    alias tether='ssh -i ~/.ssh/tether_guardian -p 2211 '
    Then run source ~/.zshrc. After that, just type tether in Terminal to connect instantly.
7. One-Word Terminal Setup
Type one word to connect — no commands to remember
Set up your SSH config so connecting is just ssh tether — no IP, port, or key flags needed.
  1. 1
    Open your SSH config
    Mac / Linux
    nano ~/.ssh/config
  2. 2
    Add this block at the bottom
    SSH Config Entry
    Host tether
        HostName 37.27.237.109
        User aiciv
        Port 2211
        IdentityFile ~/.ssh/tether_guardian
        StrictHostKeyChecking no
    Save with Ctrl+X then Y then Enter.
  3. 3
    That's it. Now just type:
    Connect
    ssh tether
  4. 4
    Bonus: one-liner commands without logging in
    Check if alive
    ssh tether "tmux list-sessions"
    Restart Tether
    ssh tether "bash ~/civ/tools/restart-self.sh"
    Quick peek at activity
    ssh tether "SESSION=\$(cat /home/aiciv/.current_session 2>/dev/null || echo tether-primary); tmux capture-pane -t \$SESSION -p | tail -30"
With SSH config set up, every command on this page that uses ssh -p 2211 aiciv@37.27.237.109 can be replaced with just ssh tether.
8. Claude Code Guardian Skill
Let your local Claude check on Tether for you
If you have Claude Code installed locally, you can teach it how to check on and restart Tether. Then you just open Terminal, type claude, and say "Check on Tether".
  1. 1
    Install Claude Code (if you haven't already)
    Mac
    brew install claude-code
  2. 2
    Create the guardian skill folder
    mkdir -p ~/.claude/skills/tether-guardian
  3. 3
    Save the skill file
    Copy the text below and save it as ~/.claude/skills/tether-guardian/SKILL.md
    SKILL.md content
    # Tether Guardian — Your AiCIV Lifeline
    
    When asked to "check on Tether" or "restart Tether":
    
    ## Connection Details
    - Fleet Host: 37.27.237.109
    - SSH Port: 2211
    - User: aiciv
    - SSH Key: ~/.ssh/tether_guardian
    - Tmux Session Prefix: tether-primary
    
    ## Check if Tether is alive
    ```bash
    ssh -i ~/.ssh/tether_guardian -p 2211 -o StrictHostKeyChecking=no aiciv@37.27.237.109 "tmux list-sessions 2>/dev/null | grep tether-primary || echo DEAD"
    ```
    If output shows tether-primary — Tether is alive.
    If DEAD — restart needed.
    
    ## Restart Tether
    ```bash
    ssh -i ~/.ssh/tether_guardian -p 2211 -o StrictHostKeyChecking=no aiciv@37.27.237.109 "bash ~/civ/tools/restart-self.sh"
    ```
    Wait 90 seconds, then verify:
    ```bash
    ssh -i ~/.ssh/tether_guardian -p 2211 -o StrictHostKeyChecking=no aiciv@37.27.237.109 "SESSION=\$(cat /home/aiciv/.current_session 2>/dev/null || echo tether-primary); tmux capture-pane -t \$SESSION -p -S -20 2>/dev/null | tail -20"
    ```
    
    ## Fallback restart
    ```bash
    ssh -i ~/.ssh/tether_guardian -p 2211 -o StrictHostKeyChecking=no aiciv@37.27.237.109 \
      "tmux new-session -d -s tether-primary -c /home/aiciv && \
       tmux send-keys -t tether-primary 'claude --dangerously-skip-permissions' Enter"
    ```
    
    ## Portal: https://tethermelanie.ai-civ.com
  4. 4
    Test it
    Open a new terminal, type claude, then say: "Check on Tether"
This skill teaches your local Claude exactly how to reach Tether. You don't need to remember any commands — just ask Claude to check on Tether and it handles everything.