I am looking to perform a series of experiments that would result in a tor-like implementation on a non-desktop platform for purely academic purposes. Before starting implementation itself, I would like to setup an environment in which I will be able to safely test my future implementation. In short, I am looking to configure a private tor network.

I imagine the testing setup looking like that:

  • Some directory authorities
  • Several guard/relay nodes (2-3 of them)
  • Single exit node
  • My own implemented node acting as guard/relay/bridge/exit depending on configuration

I will consider my little project a success when I will be able to access the internet and/or some onion services through the Tor Browser with traffic routed through my network.


  1. How do I configure directory authorities and how many of them do I need? Most of the documentation, unsurprisingly, focuses on configuring relay or exit. I can see that it's advised in many similar questions and in Tor documentation to use Chutney or Shadow, I'd prefer to setup network myself and probably some of those tools do not fit my use case.
  2. Can I run everything from a single machine, is there anything I will stumble upon that would prevent me from completing a circuit that is all on one machine?
  3. While you are here, do you see something inherently flawed in my setup that I would stumble upon only after investing multiple hours into completing the testing circuit and implementing a node?

1 Answer 1


Tor provides the TestingTorNetwork torrc option to simplify this kind of local testing on a single machine. For example it sets reduced voting intervals, allows exits to connect to localhost, speeds up bootstrapping significantly, etc. Use man tor and search for TestingTorNetwork to see all of the options it sets. Chutney would be the recommended tool in this scenario (and I've performed the same type of experiments as you described using Chutney), but if you want to do it manually, I recommend reading the Chutney source code and using Chutney as a guide. Tor has some nuanced behavior that isn't documented, but Chutney has developed workarounds for.

For the specific question about configuring Tor to act as a directory authority, see Chutney's torrc file and the _genAuthorityKey() function.

  • Thank you, I'll see the way Chutney does it. But do you suggest I can use Chutney in my use case? In other words, is it possible to compile a Tor node that will communicate with Chutney-created network but is outside of it?
    – mdccxv
    Jun 20, 2020 at 11:17
  • Do you need to start your custom node from outside of Chutney? What I did was in the network configuration file (example), I set the argument tor='/path/to/custom/tor' argument for one of the nodes which would cause Chutney to launch a specific relay using my custom tor binary. If you do need to start your node from outside of Chutney, that becomes trickier.
    – Steve
    Jun 20, 2020 at 18:27
  • Yes, I will need to start it from outside or at least that is my current understanding. The node will be written from scratch and it'll be a Dart project. When you say 'trickier', do you mean 'practically impossible'?
    – mdccxv
    Jun 20, 2020 at 19:27
  • Not impossible, but you would have to modify chutney in order to start your relay with your own custom flags/configuration/etc. Either way, you should get an idea of how Chutney works so that you can decide if you want to write something from scratch or adapt Chutney. If you write a network launcher from scratch, you will need to duplicate a lot of Chutney's functionality anyways so understanding generally how it works will be helpful.
    – Steve
    Jun 20, 2020 at 19:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .