Skip to content

Instantly share code, notes, and snippets.

@marclar
Created March 22, 2026 12:48
Show Gist options
  • Select an option

  • Save marclar/a64448ae1955672a144d2227f2c5de5f to your computer and use it in GitHub Desktop.

Select an option

Save marclar/a64448ae1955672a144d2227f2c5de5f to your computer and use it in GitHub Desktop.
Laptop Build Server Setup for OpenClaw Resource Offloading

Laptop Build Server Setup Instructions

On Your Laptop (macOS/Linux):

1. Add SSH Access

# Add the public key to authorized_keys
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKT/WRa6rF/mzFv5mJcA0EyJhq4ZV1TIrmRTWBME/JPs openclaw-nuc-to-laptop" >> ~/.ssh/authorized_keys

# Set proper permissions
chmod 600 ~/.ssh/authorized_keys

2. Install OpenClaw (if not already installed)

# Install via npm or download binary
npm install -g @openclaw/cli
# OR download from releases

3. Create Build Workspace

mkdir -p ~/cerebruh-builds
cd ~/cerebruh-builds

# Clone the repositories
git clone https://github.com/bigpager/cerebruh.is.git
git clone https://github.com/bigpager/ajent.one.git

# Install dependencies
cd cerebruh.is && npm install && cd ..
cd ajent.one && npm install && cd ..

4. Configure Git

git config --global user.name "marclar"
git config --global user.email "mk@mk4p.com"

5. Optional: Create Launch Agents for Dev Servers

If you want the dev servers running automatically:

# Create Launch Agent for cerebruh.is
cat > ~/Library/LaunchAgents/com.cerebruh.cerebruh-is-dev.plist << 'EOF'
<?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.cerebruh.cerebruh-is-dev</string>
    <key>ProgramArguments</key>
    <array>
        <string>/opt/homebrew/bin/npm</string>
        <string>run</string>
        <string>dev</string>
    </array>
    <key>WorkingDirectory</key>
    <string>/Users/[YOUR_USERNAME]/cerebruh-builds/cerebruh.is</string>
    <key>KeepAlive</key>
    <true/>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/Users/[YOUR_USERNAME]/cerebruh-builds/logs/cerebruh-is-dev.log</string>
    <key>StandardErrorPath</key>
    <string>/Users/[YOUR_USERNAME]/cerebruh-builds/logs/cerebruh-is-dev.log</string>
    <key>EnvironmentVariables</key>
    <dict>
        <key>PORT</key>
        <string>3000</string>
        <key>NODE_ENV</key>
        <string>development</string>
    </dict>
</dict>
</plist>
EOF

# Create Launch Agent for ajent.one
cat > ~/Library/LaunchAgents/com.cerebruh.ajent-one-dev.plist << 'EOF'
<?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.cerebruh.ajent-one-dev</string>
    <key>ProgramArguments</key>
    <array>
        <string>/opt/homebrew/bin/npm</string>
        <string>run</string>
        <string>dev</string>
    </array>
    <key>WorkingDirectory</key>
    <string>/Users/[YOUR_USERNAME]/cerebruh-builds/ajent.one</string>
    <key>KeepAlive</key>
    <true/>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/Users/[YOUR_USERNAME]/cerebruh-builds/logs/ajent-one-dev.log</string>
    <key>StandardErrorPath</key>
    <string>/Users/[YOUR_USERNAME]/cerebruh-builds/logs/ajent-one-dev.log</string>
    <key>EnvironmentVariables</key>
    <dict>
        <key>PORT</key>
        <string>3004</string>
        <key>NODE_ENV</key>
        <string>development</string>
    </dict>
</dict>
</plist>
EOF

# Create logs directory
mkdir -p ~/cerebruh-builds/logs

# Load the services
launchctl load ~/Library/LaunchAgents/com.cerebruh.cerebruh-is-dev.plist
launchctl load ~/Library/LaunchAgents/com.cerebruh.ajent-one-dev.plist

6. Update Cloudflare Tunnels (Optional)

If you want external access to dev servers:

Testing the Setup

From the NUC, test SSH access:

ssh laptop-build 'echo "Connection successful"'
ssh laptop-build 'cd ~/cerebruh-builds && ls -la'

Benefits of This Architecture:

OpenClaw stays safely on NUC - Only coordination/monitoring
Resource-intensive work on laptop - All the compute power
Automatic failover - If laptop is off, falls back to NUC
Easy debugging - SSH into laptop for direct investigation
No container issues - Native macOS/Linux environment

Quick Summary

The Problem: NUC gets overwhelmed by resource-intensive sub-agent tasks

The Solution:

  • OpenClaw stays on NUC (coordination only)
  • Heavy work gets SSH-offloaded to laptop
  • GitHub agent automatically routes tasks based on complexity

Next Steps:

  1. Run this setup script on your laptop
  2. Update /home/node/openclaw/.ssh/config with your laptop IP
  3. Test: ssh laptop-build 'echo success'
  4. GitHub agent will automatically start using laptop for resource-intensive work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment