torports

Concerning Tor relays, what is the difference between ORPort and DirPort?


I'm setting up a relay and my understanding is that the ORPort is required to be open to relay traffic from the outside world but do I need to enable the DirPort too?


Solution

  • No, you don't need to enable DirPort. If you set the DirPort, your relay will also serve as a directory mirror.

    As a directory mirror other relays can query you for information about other relays on the network (for example to get a list of relays for building circuits).

    Note that enabling this can significantly increase your bandwidth usage (full directory listings can be fairly large) and you'll have a lot more incoming connections. For example, one of my relays serving as a mirror has over 1200 incoming connections for dir requests and pushes an extra 10-20 Mbps as a result.

    I believe the BandwidthRate option includes limiting directory traffic (which is separate from RelayBandwidthRate).

    If you want to just run a relay, it's fine to leave DirPort as 0 so you can dedicate as much bandwidth to relaying. There are a lot of relays running as mirrors so I think the capacity for them is pretty good, but running one when possible is encouraged.