this post was submitted on 07 Oct 2026
10 points (100.0% liked)

Matrix

427 readers
6 users here now

The secure messaging protocol.

founded 2 years ago
MODERATORS
 

Could you host a matrix server using only the Tor network? If so it would make it possible to have a communication tool thats not only encrypted but anonymous, I assume much would have to be changed and maybe federations wouldn't work at all but would it be theoretically possible?

top 9 comments
sorted by: hot top controversial new old
[–] stratself 4 points 1 week ago

Yes and federation works. The caveat is that since Matrix s2s de facto mandates TLS certs, you'll need to use self-signed certs as well as accept them from other onion peers. I've been aware of some more involved setups where a server name on the clearnet can be manually mapped to its Tor onionsite as well.

Beyond that, c2s is just a simple HTTP service, and most clients should support it assuming they have a way to hop on Tor (Orbot, SOCKS5 proxy etc)

[–] artyom@piefed.social 4 points 1 week ago

I mean it would make way more sense to use one of the many messengers that explicitly use TOR like Cwtch or Briar.

[–] schnurrito@discuss.tchncs.de 2 points 1 week ago

I think it's possible to run anything that can be run over a network over Tor. Tor can be set up as a proxy for any piece of software.

[–] waldfee@feddit.org 1 points 1 week ago* (last edited 1 week ago) (1 children)

I assume it would be possible, the difference would only be to set up an onion service rather than doing traditional port forwarding. On the client side the users would have to be able to configure tor as proxy, which would likely be a hazzle. I also found this guide, though it reads sloppy. There is also a discussion about this here: https://github.com/matrix-org/synapse/issues/5152

[–] onlinepersona@programming.dev 1 points 6 days ago (1 children)

But how does TOR prevent leakage of outbound requests to the clearnet?

[–] waldfee@feddit.org 1 points 6 days ago (1 children)

By default, not at all. The server application needs to be sandboxed, firewalled, and proxied through Tor to prevent that

[–] onlinepersona@programming.dev 1 points 6 days ago* (last edited 6 days ago) (1 children)

That seems like quite the hassle. I wouldn't trust myself trying to host an anonymous service if all of that has to happen.

The link you shared doesn't mention any of that either. It might actually be putting people at risk who want to host hidden services.

[–] waldfee@feddit.org 2 points 6 days ago* (last edited 6 days ago)

The page I shared does also have a section about security advice which has a link to Onion services best practices by Riseup Collective. I figured that those who would be at risk in the event of an information leak would take this section to heart, because many use cases for onion services don't actually require location hiding, like when the site is also available through the clearnet, or when the service is only used by you and people you trust. In those cases you may as well set HiddenServiceSingleHopMode 1 to reduce latency.

It's also worth noting that in the past some high-value onion services have been deanonymized, so depending on how much of a target the service is it's worth considering taking extra precautions to prevent getting swatted if the server gets compromised

[–] refalo@programming.dev 1 points 1 week ago

or just use SimpleX