Tor Tutorials

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.

Start a Brief

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:

  1. Each backend server runs its own Tor hidden service
  2. OnionBalance collects the descriptor information from each backend
  3. It publishes a combined descriptor under the main .onion address
  4. 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 OnionBalance

Deploy 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.

Why Anubiz Labs

100% async — no calls, no meetings
Delivered in days, not weeks
Full documentation included
Production-grade from day one
Security-first approach
Post-delivery support included

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.

Support Chat

Online