Skip to main content

ROHB

Remote Ollama Herd Bridge

ROHB is a lightweight bridge between Vast.ai and Ollama Herd.

It discovers Vast.ai instances, establishes secure SSH tunnels to remote Ollama nodes, waits for connectivity, and then launches herd-node using the tunneled endpoint.

The goal is to allow cloud-hosted Ollama instances to participate in a local Ollama Herd deployment without requiring direct network exposure.


Features

  • Vast.ai instance discovery
  • Instance selection by ID
  • Instance selection by label
  • Automatic discovery of running instances
  • SSH tunnel management
  • Readiness checks
  • Ollama Herd integration
  • Environment variable support
  • CLI argument overrides
  • Local development friendly

Installation

Using uv

uv add remote-ollama-herd-bridge

Development

git clone https://github.com/DellanX/remote-ollama-herd-bridge.git
cd rohb

uv sync

Run the CLI:

uv run rohb run

Concepts

ROHB manages three stages:

identify
    ↓
tunnel
    ↓
herd-node

Identify

Resolve a target Vast.ai instance.

Sources are checked in the following order:

1. Manual host/port
2. Instance ID
3. Instance label
4. First running instance

Tunnel

Create an SSH tunnel from a local port to the remote Ollama instance.

Example:

localhost:11434
    ↓
vast.ai instance
    ↓
localhost:11434

Herd

Launches herd-node using the local side of the tunnel.


Commands

Run

Default Command:

rohb run

Startup flow:

identify
    ↓
tunnel
    ↓
wait
    ↓
herd-node

Identify

Discover the target instance.

rohb identify

Example output:

{
  "id": 123456,
  "host": "1.2.3.4",
  "port": 40222,
  "label": "router",
  "status": "running"
}

Tunnel

Create and validate an SSH tunnel.

rohb tunnel

Or manually specify a target:

rohb tunnel \
  --host 1.2.3.4 \
  --port 40222

Herd

Launch Herd directly.

rohb herd

Useful for testing an existing tunnel.


Configuration

Vast.ai Discovery

Variable Description
VASTAI_API_KEY Vast.ai API key
VASTAI_INSTANCE_ID Direct instance selection
VASTAI_INSTANCE_LABEL Instance label
VASTAI_INSTANCE_INDEX Index within matching labels
VASTAI_HOST Manual host override
VASTAI_PORT Manual port override

Tunnel

Variable Description
SSH_USER SSH username
SSH_IDENTITY_FILE SSH private key path
LOCAL_HOST Local bind address
LOCAL_PORT Local bind port
REMOTE_HOST Remote host
REMOTE_PORT Remote port
WAIT_INTERVAL Seconds between readiness checks
WAIT_MAX_RETRIES Maximum readiness attempts

Herd

Variable Description
NODE_ID Herd node identifier
ROUTER_URL Herd router URL
LEARN_CAPACITY Enable adaptive capacity learning
LOG_LEVEL Logging level

Examples

Connect to a Specific Vast.ai Instance

rohb run \
  --instance-id 12345678

Connect by Label

rohb run \
  --instance-label inference

Skip Discovery Completely

rohb run \
  --host 1.2.3.4 \
  --port 40222

Use a Specific SSH Identity

rohb run \
  --ssh-identity-file ~/.ssh/id_ed25519

Custom Tunnel Port

rohb run \
  --local-port 11435

Architecture

+-------------+
| Ollama Herd |
| Router      |
+------+------+
       ^
       |
       |
+------+------+
| ROHB         |
| SSH Tunnel   |
+------+------+
       |
       |
       v
+------+------+
| Vast.ai      |
| Ollama Node  |
+-------------+

Security

ROHB does not store credentials.

Recommended authentication:

SSH public/private keys

Avoid password-based authentication whenever possible.


License

MIT

Metadata

Release files for remote-ollama-herd-bridge 0.3.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remote-ollama-herd-bridge 0.3.16
File Size Uploaded Provenance Actions
remote_ollama_herd_bridge-0.3.16.tar.gz 194.6 kB With provenance Details for remote_ollama_herd_bridge-0.3.16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for remote-ollama-herd-bridge 0.3.16
File Interpreter ABI Platform Actions
remote_ollama_herd_bridge-0.3.16-py3-none-any.whl Python 3 none any Details for remote_ollama_herd_bridge-0.3.16-py3-none-any.whl

Total release size: 202.8 kB

Release files / remote_ollama_herd_bridge-0.3.16.tar.gz

Download URL remote_ollama_herd_bridge-0.3.16.tar.gz
Size 194.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2ab6a537bca9fc30018f15c8d3bbe4bbe7532f96279b0f05dcda1a7dbda487f6
BLAKE2b-256 checksum
How to use checksums
bfc59a2422a80292859d1a45888193dea4141d7508681b9efe219602e3c29c6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / remote_ollama_herd_bridge-0.3.16-py3-none-any.whl

Download URL remote_ollama_herd_bridge-0.3.16-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25260655636f8a782d90cb6e4af88158caf02abf79adb397e8f0782cfeb849c0
BLAKE2b-256 checksum
How to use checksums
2cf222451b16c47d0791bee929065a473a4b5878cc50c48432694d4e325ac508
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for remote-ollama-herd-bridge 0.3.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for remote_ollama_herd_bridge-0.3.16.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page