OnionBalance — Load Balancing for .onion Services
OnionBalance distributes traffic for a single .onion address across multiple backend servers. This provides load balancing, redundancy, and DDoS resilience for Tor hidden services — essential for high-traffic .onion sites.
Need this done for your project?
We implement, you ship. Async, documented, done in days.
Why You Need OnionBalance
- High availability — If one backend server goes down, others continue serving traffic.
- Load distribution — Spread traffic across multiple servers to handle more concurrent users.
- DDoS mitigation — Distributed backends are harder to overwhelm with attacks.
- Geographic distribution — Place backends in different locations for better performance.
How It Works
OnionBalance works by having a frontend that publishes a single .onion address, with traffic routed to multiple backend Tor instances:
- Each backend server runs its own Tor hidden service
- OnionBalance collects the descriptor information from each backend
- It publishes a combined descriptor under the main .onion address
- Tor clients connecting to the main .onion are routed to different backends
Setup Overview
# Install OnionBalance
pip3 install onionbalance
# Generate configuration
onionbalance-config --n 3 # 3 backend instances
# This creates:
# - Master .onion address and keys
# - 3 backend instance configurations
# - config.yaml for OnionBalanceDeploy each backend configuration to a separate server, then run OnionBalance on the frontend to coordinate them.
Managed OnionBalance with AnubizHost
Setting up OnionBalance correctly is complex. AnubizHost offers managed Tor hosting with built-in load balancing for high-traffic .onion services. We configure OnionBalance, manage multiple backends, and ensure your .onion service stays online and fast.
Related Services
Why Anubiz Labs
Ready to get started?
Skip the research. Tell us what you need, and we'll scope it, implement it, and hand it back — fully documented and production-ready.