BitTorrent Mainline DHT

P2P Infrastructure

The Kademlia-based distributed hash table (DHT) used by BitTorrent clients as a serverless, decentralized tracker for peer discovery. Defined by BEP-5 (peer-contact storage) and extended by BEP-44 (arbitrary mutable/immutable data storage). Every BitTorrent client embedding DHT becomes a node, collectively forming the largest volunteer DHT network on the internet. Used as a transport substrate by multiple unrelated systems including Hyperswarm, Hubert (Blockchain Commons), and other decentralized storage and coordination tools.

Community

Details

License Permissive (BEP specifications are open; reference implementations under various licenses; libtorrent reference: BSD-1-Clause; multiple open-source implementations in Go, Python, JavaScript, Rust)
Dev Status 🏁 Final
Dev Status Detail Released / Mature (BEP-5 Final standard; BEP-44 Accepted; actively deployed in all major BitTorrent clients; ongoing ecosystem implementations)
Owner BitTorrent Community / TokTok / open standard (BEP process governed by BitTorrent.org; original Mainline DHT designed by BitTorrent Inc.; now effectively community-maintained)
Governing Body BitTorrent.org BEP process (community-maintained; original Mainline DHT designed by BitTorrent Inc.)
Country International (distributed volunteer network; BEP process historically managed by BitTorrent Inc., USA; now community-governed)
Start Year 2005
Stack Language-agnostic (BEP-5 protocol spec over UDP; implementations in C++ (libtorrent), Go (anacrolix/torrent), JavaScript (webtorrent/bittorrent-dht), Python, Rust; BEP-44 adds ed25519 for mutable data)
Funding None / Volunteer (DHT network is self-sustaining; nodes are volunteer; no central entity funds the network)
Last Investigated Jul 1, 2026

Topology view

This tool in the centre and the things it is directly related to. Each line names the kind of relationship.

Topology view: BitTorrent Mainline DHTThis tool in the centre and the things it is directly related to. Each line names the kind of relationship.BitTorrentMainline DHTHubert (Basis for)HubertHyperswarm (Basis for)HyperswarmPKARR (Basis for)PKARRPubky Protocol (Basis for)PubkyProtocol

Open in Graph Explorer

Affordances

Local-first storage Self-hostable Works offline / mesh

P2P Infrastructure Attributes

Origins Distributed peer tracking (designed to eliminate dependence on centralized BitTorrent trackers; "trackerless" torrent support enabling peer discovery without any central server)
Database N/A (DHT is a distributed key-value routing table, not a database; nodes store routing state and temporarily cache peer-contact records, not persistent data)
Data Formats Bencoding (BEP-3 standard binary format for all DHT messages); compact peer info (6-byte IPv4 address+port records); BEP-44 values (arbitrary bytes up to 1000B; ed25519-signed for mutable data)
Mobile Support Yes (embedded in mobile BitTorrent clients; Tox and other mobile apps use DHT)
Web Support Partial (WebRTC-based DHT implementations for browser environments; not native to standard Mainline DHT which requires UDP)
Native Apps Yes (embedded in all major BitTorrent desktop clients: qBittorrent, Transmission, Deluge, libtorrent-based clients)
Terms Free (open protocol; no commercial terms; all node operation is volunteer)
Funds None
Based On Kademlia DHT (Maymounkov & Mazières 2002 paper); BEP-5 (peer-contact storage spec); BEP-44 (arbitrary data storage extension with ed25519 signing)
P2P Architecture Kademlia DHT (XOR metric for key-node distance; 160-bit node IDs; k-buckets routing table; iterative lookup converges in O(log n) hops)
Overlay Network Global (single shared Mainline DHT network; all nodes participate in same overlay; estimated 16-28M concurrent nodes as of 2013 measurements)
Content Addressing Yes (BEP-44 mutable values addressed by ed25519 public key; immutable values by SHA-1/SHA-256 hash; torrent peers addressed by info_hash)
Local-First N/A (routing infrastructure; data transits or is stored ephemerally; not a local-first storage system)
E2EE No (DHT messages are unencrypted at the protocol level; BEP-44 signed data is authenticated but not encrypted; application-layer encryption is separate)
Byzantine Fault Tolerance No (probabilistic resilience; no formal Byzantine consensus; vulnerable to Sybil and routing table poisoning attacks as documented in security assessments)
Signature Ed25519 (BEP-44 mutable data items; signatures bind value to public key; SHA-1 info_hashes for immutable lookups)
Permissions Open (any node may participate; BEP-44 mutable values writable only by holder of corresponding private key; immutable values content-addressed)
Protocol Maturity / Standardization De Facto Standard (BEP-5 Final status; BEP-44 Accepted; implemented in all major BitTorrent clients and adopted by unrelated systems (Hyperswarm, Hubert); not submitted to IETF or other formal body; BEP process is community governance)
Infrastructure Function Distributed key-value routing (peer discovery for BitTorrent; general-purpose DHT substrate for any application requiring decentralized key-value lookup or arbitrary data storage via BEP-44)
Threat Model Sybil attacks; routing table poisoning; eclipse attacks; DHT crawling/enumeration; unencrypted metadata exposure
Volunteer / Node Model Embedded (every BitTorrent client with DHT enabled is automatically a node; no dedicated relay class; nodes self-organize without incentive)
Traffic Visibility Metadata visible (DHT messages are unencrypted; node IDs, info_hashes, and IP addresses of peers are observable by any participating node or network monitor)
Active Deployment Scale ~16-28M concurrent nodes (2013 academic measurement; Mainline DHT is the largest publicly deployed DHT; exact current count untracked but embedded in hundreds of millions of BitTorrent client installations worldwide)

Relationships

How this tool connects to other tools and organizations, from relationships reviewed by the OpenHaven data steward. They describe how projects connect, not how good they are.