BitTorrent Client Integration
hali generates standard BitTorrent .torrent files and magnet URIs. You can paste them into any BitTorrent client to join the swarm. This page covers how.
Getting the magnet URI
Every model seeded by hali has a magnet URI. Find it in any of these places:
# CLI — daemon status shows magnets for all seeding models
hali daemon status
# Web dashboard — clickable magnet links at http://127.0.0.1:47433
hali stats --web
# After pulling — hali prints the magnet URI on download completion
The URI looks like:
magnet:?xt=urn:btih:a3f9c21b4d67e8f01a2b3c4d5e6f7890ab1cd2ef3&dn=mistral-7b-instruct-v0.2.Q4_K_M.gguf
- v1 infohash:
urn:btih:<40-char-hex>(SHA1) - v2 infohash:
urn:btmh:1220<64-char-hex>(SHA256)
qBittorrent
The most popular cross-platform client.
- Open qBittorrent
- File → Add Torrent Link... (or press
Ctrl+Shift+O) - Paste the magnet URI into the dialog
- Click Download
File → Add Torrent Link... → paste magnet:?... → Download
The torrent will start downloading from available peers. If your LAN has hali nodes seeding the model, qBittorrent will discover them via LSD and download at LAN speed.
qBittorrent settings for LAN optimization
Tools → Options → BitTorrent
☑ Enable Local Peer Discovery
☑ Enable DHT (disabled in hali's default torrents, but won't hurt)
Tools → Options → Speed
Set upload/download limits appropriately for your LAN
Transmission
Lightweight, available on Linux and macOS.
GUI (Transmission-gtk / Transmission-qt)
- File → Open URL... (or
Ctrl+U) - Paste the magnet URI
- Click Open
CLI (transmission-remote)
transmission-remote -a "magnet:?xt=urn:btih:a3f9c21b4d67e8..."
Transmission settings for LAN optimization
{
"lpd-enabled": true,
"dht-enabled": true
}
LPD (Local Peer Discovery) = LSD = the same protocol hali uses for LAN discovery. Enable it to find hali peers on your LAN.
Deluge
Popular on Linux servers and headless setups.
- File → Add Torrent → URL tab
- Paste the magnet URI
- Click Add
Or via the thin client/Web UI:
Connection Manager → Add → paste magnet URI
Deluge settings for LAN optimization
Preferences → Network
☑ Enable LSD (Local Service Discovery)
☑ Enable DHT (disabled in hali's torrents, but won't hurt)
rTorrent
Terminal-based, common on seedboxes and headless servers.
# In rTorrent's interface, press Backspace, paste the URI, press Enter
# Or use a watch directory:
echo "magnet:?xt=urn:btih:a3f9c21b4d67e8..." > ~/watch/mistral.magnet
rTorrent config for LAN optimization
# ~/.rtorrent.rc
dht.mode.set = auto
protocol.pex.set = no
trackers.use_udp.set = no
Aria2
Command-line download utility, popular in Docker/CI environments.
aria2c "magnet:?xt=urn:btih:a3f9c21b4d67e8f01a2b3c4d5e6f7890ab1cd2ef3"
Aria2 config for LAN optimization
# ~/.aria2/aria2.conf
enable-dht=true
bt-enable-lpd=true
bt-tracker=
How your client finds hali peers
- You paste the magnet URI from hali's daemon status or the web registry
- Your client extracts the infohash from the URI
- Your client broadcasts an LSD query on the LAN: "Who has infohash
a3f9c21b...?" - Any hali daemon on your LAN that's seeding that model responds with its IP and port
- Your client connects via TCP and downloads pieces using the standard BitTorrent wire protocol
- Once your client finishes, it becomes a seeder too — other machines on the LAN can now get pieces from you
Comparison: hali daemon vs. external client
| hali daemon | External client (qBittorrent, etc.) | |
|---|---|---|
| Purpose | Auto-seed your cached models on LAN | General-purpose torrent downloader |
| Discovery | LSD (LAN only by default) | LSD + DHT + trackers |
| Model cache | Managed (~/.hali/models/) | Wherever you save it |
| Registry integration | Yes — auto-submits manifests | No — manual only |
| Export to Ollama/LM Studio | Yes | No |
| CLI control | hali daemon start/stop/status | App-specific |
| Web dashboard | http://127.0.0.1:47433 | App-specific |
They're complementary. Use the hali daemon to manage your cache and auto-seed. Use an external client to download models from the registry when you want more control over the torrent settings, or when you're on a machine without hali installed.
Tip: Running both simultaneously
You can run the hali daemon alongside another BitTorrent client on the same machine. They'll use different ports and won't interfere. The hali daemon seeds your <DataDir>/models/ directory. Your external client downloads to wherever you configure it. Both can participate in the same swarm — more seeders = faster downloads for everyone.
If both are seeding the same model, they'll each contribute bandwidth. LAN peers will have two seeders on your machine instead of one.
Security note
All torrent traffic uses the standard BitTorrent wire protocol. There's no encryption at the protocol level (this is standard for BitTorrent). If you're concerned about LAN traffic visibility, enable HMAC authentication for hali's LAN announcements (see LAN Sharing guide), which prevents rogue machines from injecting fake model announcements. The actual piece transfer is unencrypted — same as any other BitTorrent client.