Mastodon: Support Tor-hidden servers

Created on 8 Apr 2017  路  10Comments  路  Source: tootsuite/mastodon

Some of the publicity given to Mastodon is thanks to the US government asking Twitter for the real identity of one of its users, I think. However, a question rapidly arises: is Mastodon safer than Twitter for this use case? Will an individual holding a server for a small group of people be more efficient than Twitter in suing a government in response, to protect its users?

Unfortunately, I don't think so, as size is required to make governments flex, would it be just to pay legal costs.

In order to better protect the users, a technical solution could be put in place to actually protect server admins from being "blackmailed" (I don't know the actual term for a government forcing one to deliver information) into giving away information about its users. Even the users using Tor is not enough, as private messages could be reached this way, or worse, malicious biometrics-based identification JS could be put on the server to identify the user despite Tor. (even if a special client could be developed to ban the development of such biometrics, the PM issue still exists)

I think this calls for running some mastodon servers as Tor hidden services.

The potential issues we identified are:

  1. Not all Mastodon instances run a Tor client.
  2. If relaying is put in place, banning a Tor server is much more complex (and it can change identity really easily to escape the ban)

Solutions could be:

  1. Change the protocol so that designated Tor bridges relay messages from/to the Tor network. Each Mastodon server would be configured to use one (or more?) such bridge(s), to get the message updates from Tor. As I don't know the details of the protocol, I don't know whether this means the server would have to trust the Tor bridge relatively to the name of the source server, but I'm not sure it matters much.
  2. Banning could be done either at a server level (trusting the name the Tor bridge sends the Mastodon instance), or at the network level (refusing any message incoming from Tor by not using any Tor bridge).

This would most likely require a protocol addition to support Tor bridges, but I'd think it's worth it, for privacy and security reasons.

What do you think about it?


  • [x] I searched or browsed the repo鈥檚 other issues to ensure this is not a duplicate.

Most helpful comment

Thanks for the rapid answer and the links provided, very useful!

I reached out to this guy who is running an instance with ~150 users behind an .onion address and apparently he's willing to document the correct process needed in order to set up everything correctly.

I'll try and merge all the knowledge I've been able to find regarding Mastodon+Tor and see if I can have a comprehensive writeup on everything.

All 10 comments

any updates here?

With the new FOSTA bill, this should now be a requirement, as well as probably very thorough encryption of the service.

At least if we have distributed Tor nodes here, then we should be able to keep related things alive.

I wrote a quick example of instructions of building a Tor instance.
https://gist.github.com/hcmiya/40f3810108c954b3a24017a78844e0b6

I wrote a quick example of federating with Tor instances from clearnet.
https://gist.github.com/hcmiya/e635b31ae8c4b33d903f224ddbc45197

Any news? It seems that this guy got an instance up successfully [1], but he's having a bad time while trying to set up email confirmation [2].

Activation of the account without checking the mail seems to be possible by changing the setting of Diverse and adding a worker of Sidekiq. https://theboss.tech/ and https://kurage.cc/ adopt this. The setting method is written in the following blog article:

Implemented by theboss.tech:

Implemented by kurage.cc:

Thanks for the rapid answer and the links provided, very useful!

I reached out to this guy who is running an instance with ~150 users behind an .onion address and apparently he's willing to document the correct process needed in order to set up everything correctly.

I'll try and merge all the knowledge I've been able to find regarding Mastodon+Tor and see if I can have a comprehensive writeup on everything.

We also run on tor and can contribute to upstream if necessary.

We also run on tor and can contribute to upstream if necessary.

Any chance we can get in touch?

Was this page helpful?
0 / 5 - 0 ratings