Home / Servers / Tor Relay VPS

Run a Tor middle relay or obfs4 bridge

Servury allows Tor middle relays and obfs4 bridges, but not exit relays. A middle relay wants bandwidth, and the standard plans are unmetered. A bridge needs less, and Blackbox adds IPv6 and encrypted memory.

Deploy a relay server from $15.59 a monthunmetered bandwidth
  • Middle relays and obfs4 bridges
  • No exit relays
  • IPv6 on Blackbox

How big a relay each plan carries

BandwidthRate in torrc limits Tor's average rate in each direction. On Blackbox these values use about 90% of the transfer allowance, which leaves room for updates and everything else on the server.

Standard VPS and VDS, unmetered
No allowance to stay under. Fair use is about 1 Gbit/s at the 95th percentile, inbound and outbound combined, so on a 1 or 10 Gbps port a relay can give up to about 500 Mbit/s each way. Hong Kong plans have a 100 Mbps port. IPv4 only, in Singapore and Hong Kong, from $15.59 a month.
Blackbox Nano, 2 TB per 31 days
BandwidthRate 600 KBytes, about 4.9 Mbit/s each way, all period. That is under the 10 Mbit/s minimum the Tor Project sets for a relay, so use it for an obfs4 bridge or a Snowflake proxy.
Blackbox Core, 4 TB per 31 days
BandwidthRate 1300 KBytes, about 10.6 Mbit/s each way, all period. That meets the Tor Project's 10 Mbit/s minimum for a relay but not the 16 Mbit/s it recommends, so an obfs4 bridge or a Snowflake proxy puts it to better use.
Blackbox Plus, 8 TB per 31 days
BandwidthRate 2600 KBytes, about 21.3 Mbit/s each way, all period. That clears the 16 Mbit/s the Tor Project recommends for a relay.
Blackbox Max, 16 TB per 31 days
BandwidthRate 5200 KBytes, about 42.6 Mbit/s each way, all period. A fast middle relay, past the 40 Mbit/s mark where the Tor Project asks for 1 GB of RAM. Every plan has more than that.
Blackbox Ultra, 32 TB per 31 days
BandwidthRate 10500 KBytes, about 86.0 Mbit/s each way, all period. The biggest Blackbox relay, still far below the 400 to 450 Mbit/s the Tor Project expects one tor instance to carry on a CPU with AES-NI.

Blackbox counts the larger of inbound and outbound, so a relay's traffic is not counted twice. A term shorter than 31 days includes its share of the allowance, and the same rate stays inside it. Past the allowance the port drops to 10 Mbps until the period rolls over; nothing extra is billed.

Set up a middle relay

As root. A new relay sees little traffic for its first days while the network measures it, then ramps up over the following weeks.

# Tor's own repository has the current release (Ubuntu 24.04, Debian 12 or 13)
apt update && apt install -y curl gpg
KEY=A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
RING=/usr/share/keyrings/deb.torproject.org-keyring.gpg
curl -fsSL https://deb.torproject.org/torproject.org/$KEY.asc | gpg --dearmor -o $RING
. /etc/os-release
echo "deb [signed-by=$RING] https://deb.torproject.org/torproject.org $VERSION_CODENAME main" \
  > /etc/apt/sources.list.d/tor.list
apt update && apt install -y tor deb.torproject.org-keyring

# A non-exit middle relay. Nickname and ContactInfo are published.
cat > /etc/tor/torrc <<'EOF'
Nickname MyMiddleRelay
ContactInfo relay-ops@example.org
ORPort 443
ExitRelay 0
SocksPort 0
# On Blackbox Plus, stay inside 8 TB per 31 days:
# BandwidthRate 2600 KBytes
EOF

systemctl restart tor
# Wait for "Self-testing indicates your ORPort ... is reachable"
journalctl -fu tor@default

Before you start

Or run an obfs4 bridge

Bridges are unlisted, so people in countries that block the public relays, such as Russia or Turkmenistan, can still reach Tor through them. Censors in China and Iran have found ways to detect and block bridges too. Share the bridge line privately or let Tor's distributor hand it out.

# After the repository step in the relay setup above.
# obfs4proxy is packaged in Ubuntu 24.04 and Debian 12 and 13.
apt install -y obfs4proxy

cat > /etc/tor/torrc <<'EOF'
BridgeRelay 1
# Two ports above 1024: tor's systemd unit stops obfs4proxy binding lower ones.
# Skip 9001, the port everyone associates with Tor.
ORPort 41823
ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
ServerTransportListenAddr obfs4 0.0.0.0:52417
ExtORPort auto
ContactInfo bridge-ops@example.org
Nickname MyObfsBridge
# Blackbox Nano: stay inside 2 TB per 31 days
BandwidthRate 600 KBytes
EOF

systemctl restart tor

# The line to give people: fill in the IP, the port and the fingerprint
cat /var/lib/tor/pt_state/obfs4_bridgeline.txt
cat /var/lib/tor/fingerprint

# Full guide: https://community.torproject.org/relay/setup/bridge/debian-ubuntu/

Run a bridge on Blackbox

A bridge usually carries far less than a middle relay, and the BandwidthRate in the bridge config keeps it inside Blackbox Nano's 2 TB per 31 days. On a Blackbox Linux image the CPU encrypts the VM's memory, the bridge's keys included.

MontrealAmsterdam (pre-order)New York City (launch pre-order)
Deploy Blackbox from $4.99 a month
  • Memory encrypted by the CPU on Linux images (AMD SEV-SNP), and optional full-disk encryption with a passphrase only you hold.
  • A routed IPv6 /64 next to the IPv4 address.
  • Addresses announced from Servury's network, AS395904.
  • No guest agent, so the host has no channel to run commands inside.
  • Any term from 7 to 365 days, prorated by the day; Blackbox Nano is sold for 31 days or more.

How Blackbox works

Questions

Are exit relays allowed?

No. An exit sends other people's traffic to the open internet from your server's IP, and the abuse reports follow that IP. Servury does not allow exits on any server. Middle relays, obfs4 bridges and Snowflake proxies are welcome; keep ExitRelay 0 in your torrc.

Why run a middle relay or bridge?

Tor runs on volunteer relays. A middle relay adds capacity for everyone using the network. A bridge is an unlisted entry point for people whose country or network blocks the public relays, and obfs4 makes its traffic harder to recognise.

How much bandwidth will it use?

As much as you allow. The standard plans are unmetered, under a fair-use guideline of about 1 Gbit/s at the 95th percentile, inbound and outbound combined. On Blackbox, cap the relay with BandwidthRate so it stays inside the plan's transfer allowance: 600 KBytes keeps Blackbox Nano inside 2 TB per 31 days. Blackbox counts the larger of inbound and outbound, so relayed traffic is not counted twice.

How much RAM and CPU?

Less than the smallest plan has. The Tor Project asks for 512 MB of RAM for a relay under 40 Mbit/s and 1 GB above that, and the smallest plan here has 2 GB. It expects one tor instance on a CPU with AES-NI to carry about 400 to 450 Mbit/s each way. To go past that, run a second instance with tor-instance-create and declare both relays as one family in each torrc (FamilyId, plus MyFamily for older clients).

Will my IP get blocklisted somewhere?

Lists of exit relays leave middle relays out, but some lists and some websites block every address in the Tor consensus. Expect a few sites to refuse a middle relay's IP. Bridges are not in the public consensus. Keep mail and anything else that needs a clean reputation on a different server.

Will I get abuse emails?

Rarely. A middle relay passes encrypted traffic between other relays and never connects to websites for its users, so it does not draw the complaints an exit does. Bridges draw even less attention.

Can I run a hidden service on the same VPS?

It works: add HiddenServiceDir and HiddenServicePort lines and point them at a service listening on 127.0.0.1. The relay is public, though, and an onion service that goes down whenever the relay does can be linked to it. If the .onion's location should stay hidden, run it on another server.

Does Servury log my Tor traffic?

No. We keep no traffic logs for customer servers. Blackbox counts bytes for the transfer allowance and shows the total on the server's Overview. Your account is a generated credential with no email or name. Tor itself publishes each public relay's IP, nickname and ContactInfo, which is part of running one.

Guides on this topic

Related pages

Support

Questions before you buy? Ask here. You do not need an account: your first message creates one, and you get its credential to come back for our reply.