Connect Hermes to AntStation P2P AI Network via SSH Reverse Tunnel

Route peer-to-peer AI models through your laptop's AntStation directly into your VPS-hosted Hermes agent — no AntStation installation on the server needed.

April 2026 • Tutorial • 6 min read

🎯 Why This Setup Rocks

AntStation connects you to a decentralized network of AI providers — peers offering models at competitive P2P pricing. Running it on your laptop and tunneling to your VPS gives Hermes access to that entire network without any server-side installation.

What You'll Need

💰 Need to Fund Your Account?

The short version above assumes you already have USDC deposited. For a full walkthrough of depositing funds via Rabby, MetaMask, or Coinbase Wallet using AntStation's local web UI (http://localhost:3118), see the Complete Mac Guide.

Step 1: Install AntSeed CLI on Your Local Machine

The AntStation desktop app doesn't expose CLI commands by default. Install the CLI:

npm install -g @antseed/cli

Verify it works:

antseed --version

Step 2: Pin a Peer on Your Local Machine

AntStation won't route requests until you pin a peer — think of it like selecting a VPN server.

Browse available peers:

antseed network browse

This shows all available providers with their models, pricing, and reputation.

Inspect a specific peer for details:

antseed network peer <peer-id>

For example, to see Surplus Intelligence's full service list (my preferred peer — extremely competitive pricing for the model quality, plus 75+ free models):

antseed network peer 0e49122e76bd8b9ccb2fe10c0088c41ceb608927

Pin your chosen peer:

antseed buyer connection set --peer 0e49122e76bd8b9ccb2fe10c0088c41ceb608927

Verify the pin:

antseed buyer status

You should see:

Pinned peer                  │ 0e49122e76bd8b9ccb2fe10c0088c41ceb608927

Step 3: Configure Hermes

Tell Hermes to use AntStation as a model provider. Give Hermes this prompt:

💬 Prompt for Hermes

I want to add AntStation (a peer-to-peer AI network buyer proxy) as a model provider option when I use the /model command.

The setup details:
- AntStation buyer proxy runs on localhost:8377
- It supports OpenAI Chat Completions API at http://localhost:8377/v1
- For OpenAI-compatible requests, use:
  OPENAI_BASE_URL=http://localhost:8377/v1
  OPENAI_API_KEY=unused (any placeholder works)

Please:
1. Add "AntStation" as a selectable option in the /model command list
2. When selected, configure all API calls to route through http://localhost:8377
3. Use the model name from the user's request to route to the appropriate provider on the P2P network
4. Keep existing providers working alongside this new option
5. Save the configuration so it persists across sessions

Or manually add this to your ~/.hermes/config.yaml:

custom_providers:
  - name: antstation
    base_url: http://localhost:8377/v1
    api_key: unused
    api_mode: chat_completions

Step 4: Open the SSH Reverse Tunnel

Add port 8377 to your existing SSH command:

ssh -L 18789:localhost:18789 -L 9119:localhost:9119 -R 11434:localhost:11434 -R 8377:localhost:8377 account@your-vps-ip

What each port does:

Port Direction Purpose
-L 18789 Local → VPS Hermes/OpenClaw dashboard
-L 9119 Local → VPS OpenClaw dashboard
-R 11434 VPS → Local Hermes/OpenClaw → Ollama
-R 8377 VPS → Local Hermes/OpenClaw → AntStation (NEW)

💡 Pro Tip

Keep this SSH session running in a terminal, or set up autossh / a systemd service to maintain the tunnel automatically. The tunnel is the only thing connecting your VPS to your local AntStation.

Step 5: Switch Models in Hermes

First, see what models your pinned peer offers:

antseed network peer 0e49122e76bd8b9ccb2fe10c0088c41ceb608927

Then switch to a model in Hermes (model and provider must be specified together):

/model opus-4.7 --provider antstation

Example Models Available on AntStation Peers

Pricing varies by peer. Below is a sample model lineup at typical AntStation rates — Surplus Intelligence (my pinned peer) often undercuts these and includes 75+ free models on top:

Model Input $/1M Output $/1M Best For
gpt-5.4 $0.25 $1.50 Chat, code, multimodal
gpt-5.5 $0.40 $2.00 Chat, reasoning, multimodal
minimax-m2.5 $0.21 $0.84 Chat, writing, creative
minimax-m2.7 $0.21 $0.84 Chat, writing, creative
minimax-m2.7-highspeed $0.42 $1.68 Fast chat, writing, creative

How Model Selection Works

Your request → model: "opus-4.7"
Hermes → localhost:8377 (tunneled to your laptop)
AntStation proxy (pinned to Surplus Intelligence)
Surplus Intelligence returns response
Payment settles in USDC automatically

How to Switch Between Peers

Want to try a different provider? Browse the network, find a peer you like, and pin it:

# See all available peers
antseed network browse

# Pin a different peer (e.g., Open Forge)
antseed buyer connection set --peer 1d90f467689d499dc435e5744b4613c3203eb0aa

# Or back to Surplus Intelligence (recommended — best price/quality)
antseed buyer connection set --peer 0e49122e76bd8b9ccb2fe10c0088c41ceb608927

# Clear the pin (no default peer)
antseed buyer connection clear

Once pinned, any model you request will be routed to that peer automatically — no changes needed in Hermes.

Managing Your USDC Deposit

New users get $1 trial credit. To deposit more:

antseed payments

This opens a local web interface where you can connect your wallet and add USDC.

Troubleshooting

⚠️ "No peer pinned" error

Run:

antseed buyer connection set --peer <peer-id>

⚠️ Can't reach AntStation from VPS

⚠️ Hermes can't validate the model

This warning is cosmetic — just try sending a message anyway. It happens because Hermes tries to validate from the VPS before routing through the tunnel. The actual model call works fine once you send a message.

Summary

  1. Install AntSeed CLI: npm install -g @antseed/cli
  2. Browse peers: antseed network browse
  3. Pin a peer: antseed buyer connection set --peer <peer-id>
  4. Add -R 8377:localhost:8377 to your SSH command
  5. Configure Hermes with the AntStation provider
  6. Switch models (model and provider together): /model <model-name> --provider antstation

That's it — your VPS-hosted agent now has access to the entire AntSeed P2P network, powered by whatever providers you pin.

Happy hacking!

See also: Want to understand the full AntSeed protocol — architecture, payments, reputation system, and why it matters? Read AntSeed: The Open Market for AI Inference That Has No Gatekeepers. For the Mac desktop walkthrough, check out the Complete Mac Guide.

💬 Comments