Skip to content
Back to skills

Netllm Swarm

ASecurity

Configure multi-machine LAN mesh for swarm-llm (netllm). Use when the user asks to set up a swarm, connect multiple machines (macOS, Linux, Windows), enable LAN routing, find peers via mDNS, configure a gateway, or invokes /netllm-swarm. Covers serve --host 0.0.0.0, peers discovery, static peers, and gateway role.

  • 25 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 11, 2026
ai-agentsrustshellbashbackendsecurity

Works with

  • cursor
  • cli

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro shows the line behind each finding and how to fix it

Scanned June 11, 2026

npx -y skills add matthewdcage/llm-swarm-router --skill netllm-swarm --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Netllm Swarm?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Netllm Swarm
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/matthewdcage-netllm-swarm/badge)](https://www.skillsdirectory.com/skills/matthewdcage-netllm-swarm)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: netllm-swarm
description: |
  Configure multi-machine LAN mesh for swarm-llm (netllm). Use when the user
  asks to set up a swarm, connect multiple machines (macOS, Linux, Windows),
  enable LAN routing, find peers via mDNS, configure a gateway, or invokes
  /netllm-swarm. Covers serve --host 0.0.0.0, peers discovery, static peers,
  and gateway role.
version: 1.0.0
license: MIT
compatibility:
  - cursor
  - codex
  - claude-code
  - copilot
allowed-tools:
  - Read
  - Shell
  - Grep
---

# netllm swarm

## When to use this skill

- Multiple machines should share one logical model pool
- User says "LAN swarm", "multi-machine netllm", "find peers", or `/netllm-swarm`
- mDNS or static peer configuration needed

## Prerequisites

- netllm installed on each machine (`netllm-setup` skill or `./netllm init`)
- Same LAN/VLAN (guest Wi-Fi often blocks mDNS)
- Local inference on at least one host (optional on workers if they only gateway)

## Workflow

1. **Per machine: init if needed**
   ```bash
   ./netllm init
   ```

2. **Bind for LAN on each host**
   ```bash
   ./netllm serve --host 0.0.0.0
   ```
   Packaged installs (systemd, Windows service, macOS app) may already bind via config, use `./netllm start` / `./netllm restart` after changing listen address.
   Confirm `agent.advertise = true` in `~/.config/netllm/config.toml` (default in [config.example.toml](../../../config.example.toml)).

3. **Firewall**, when listening on `0.0.0.0`, allow inbound TCP on the agent port (default `11400`) on each host.

4. **Security on untrusted LANs**, recommend setting `swarm.cluster_token` in config when using `0.0.0.0`. Warn user if token is empty.

5. **Discover peers** (from any machine on the LAN)
   ```bash
   ./netllm peers
   ```
   If none found:
   ```bash
   ./netllm peers --subnet-scan
   ./netllm peers --subnet-scan --save   # persist to swarm.peers
   ```

6. **Optional gateway**, on one designated machine:
   ```bash
   ./netllm gateway
   ./netllm serve --host 0.0.0.0   # restart after role change
   ```
   Point clients (Honcho, editors) at this host's URL only.

7. **Verify merged catalog**
   ```bash
   ./netllm models --lan
   ./netllm status
   ```

8. **Manual peers**, if mDNS blocked, add to config:
   ```toml
   [swarm]
   peers = ["http://192.168.1.50:11400", "http://192.168.1.51:11400"]
   ```

## Examples

**Two machines on home Wi-Fi**

| Machine | Command |
|---------|---------|
| MacBook (Ollama) | `./netllm serve --host 0.0.0.0` |
| Linux box (vLLM) | `netllm serve --host 0.0.0.0` after deb/rpm install |
| Either | `./netllm peers` then `./netllm models --lan` |

**Guest network (no mDNS)**

```bash
./netllm peers --subnet-scan --save
./netllm serve   # restart to load new peers
```

## Agent-hop routing (gateway + mesh)

When Honcho or another client points at **one gateway** (`http://<gateway>:11400/v1`), netllm routes to:

- Local inference on the gateway (`127.0.0.1:8080/v1`, etc.)
- **Peer agents** at `http://<peer-LAN-IP>:11400/v1` (not the peer's loopback oMLX URL)

For same model on multiple machines, set:

```toml
[routing]
default_strategy = "round_robin"
allow_remote = true
```

Confirm traffic reaches peers:

```bash
./netllm status   # remote backend rows show http://<peer>:11400/v1
curl -s http://127.0.0.1:11400/metrics | rg netllm_requests_total
curl -s http://<peer-LAN-IP>:11400/metrics | rg netllm_requests_total
```

## Edge cases

| Situation | Action |
|-----------|--------|
| No peers found | Check firewall, same subnet, `--subnet-scan`, manual `swarm.peers` |
| mDNS unavailable | `uv sync` or `./netllm doctor`; static peers still work |
| Linux browse empty | Ensure Avahi running; see [docs/linux-install.md](../../docs/linux-install.md) |
| Windows browse empty | Prefer `swarm.peers` or `--subnet-scan`; see [docs/windows-install.md](../../docs/windows-install.md) |
| Loopback only | `127.0.0.1` bind hides agent from LAN: must use `0.0.0.0` |
| Models missing remotely | Remote host needs online backends; check `./netllm status --url <peer>` |
| Gateway hits wrong host:8080 | Peer must be routable as `http://<LAN-IP>:11400/v1`; do not add own agent URL to `swarm.peers` |

## Do not

- Expose `0.0.0.0` without warning about `cluster_token` on public networks
- Commit machine-specific IPs to the repo without user consent

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.