# FBx day 4: Matrix Synapse's howto

**URL:** https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194
**Category:** Hardware Owners Support
**Created:** [November 8, 2020, 12:54am UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194 "2020-11-08T00:54:37Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![perken](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/perken/32/461_2.png) [@perken](https://discuss.freedombox.org/u/perken)
#### Post date: [November 8, 2020, 12:54am UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/1 "2020-11-08T00:54:37Z")

</div>

Hello,

After running my first few tests, I must say I am very happy with my FBx’s Synapse. The call quality is really great both on voice and on video, the chat is very responsive, and I had lots of fun trying out different clients for it. I have a few questions, following this first experience :

-When connecting to [matrix.org](http://matrix.org)’s rooms through federation, my FBx is extremely slow. Like, extremely. It seems that FBx has to copy all of the room’s previous communications to storage, before the user can interact. Is there a way around this inefficiency ?

-How do I check that abandonned rooms’ communications have been erased ?

-How can I add phone numbers to users’ accounts on my Synapse ? The current setup doesn’t allow it.

-Is there a way to connect people through phone numbers on my Synapse ? Example à la whatsapp: telephone contacts that use the Matrix network would be immediately findable on the client.

---

<div class="post-metadata">

### Author: ![NickA](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@NickA](https://discuss.freedombox.org/u/NickA)
#### Post date: [November 8, 2020, 11:45am UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/2 "2020-11-08T11:45:33Z")

</div>

Well, seems matrix is good at a couple of things, though, that could rather be marketing and lobbying than actually privacy in the user’s interest.

Your observations bring up some performance issues with its centralized meta-data and (message) data handling. (The implementation details that were often glossed over.)  
And no, you can’t control nor check what is done on other matrix servers and the clients. I think matrix stores things like provided phone contacts on central servers, and all clients (possibly even servers) default to connect to these central services in parallel to the connection to your own server (and server-to-server).

If you want phone number based contact discovery, one might have to compare the privacy policy and usability of matrix (Vector Corp. etc.) with the [https://quicksy.im](https://quicksy.im) solution (conversations.im flavor) that works in the XMPP (Jabber) network.

There were some interesting comments under this [link (machine translated)](https://linuxnews.de/2020/07/matrix-im-bildungsbereich-in-schleswig-holstein-und-hamburg/):

> [@Tom wrote 3 month ago](#):
>
> Ouch, the matrix implementations are not designed for privacy and security.
> 
> [Freie Messenger](https://www.freie-messenger.de/sys_matrix/riot/#datenschutz)
> 
> - “what is really drawing us to XMPP is how it is designed with the user’s privacy as a central pillar. While the Matrix protocol […] architectural focus is directed elsewhere” [Disroot: Abkehr von Matrix – Fokus auf XMPP ⋆ Kuketz IT-Security Blog](https://www.kuketz-blog.de/disroot-abkehr-von-matrix-fokus-auf-xmpp/)
> 
> - Investigation documents: [The Grid Protocol / Home · GitLab](https://gitlab.com/thegridprotocol/home)
> 
> - [https://www.reddit.com/r/privacy/comments/bca2k2/matrix\_riot\_hacked\_for\_the\_second\_time\_stay\_away/](https://www.reddit.com/r/privacy/comments/bca2k2/matrix_riot_hacked_for_the_second_time_stay_away/)
> 
> - [https://www.reddit.com/r/privacy/comments/a314mj/is\_riotimmatrix\_really\_private/](https://www.reddit.com/r/privacy/comments/a314mj/is_riotimmatrix_really_private/)
> 
> It’s time for an iOS XMPP client to support audio and video telephony to be compatible with Conversations.im and Quicksy.im and Movim.eu.

> [@Rolf wrote 1 month ago](#):
>
> Matrix is a (H) birth of the American Amdocs Group!
> 
> “The initial project was created inside Amdocs…”  
> [Matrix (protocol) - Wikipedia](https://en.wikipedia.org/wiki/Matrix_(protocol))
> 
> In more than 90 countries with over 26,000 employees, mobile phone call billings are created for more than half of the world’s population!
> 
> That means they know who has contact with whom since the 80s, how often, how long and at what time!
> 
> Amdocs:  
> [Amdocs - Wikipedia](https://en.wikipedia.org/wiki/Amdocs)
> 
> That’s called meta data!
> 
> And with them you can run a lot of shindluder if you own it!
> 
> The Matrix Client [http://Element.io](http://Element.io) even openly adds that they use meta data for profiling users!
> 
> “… we might profile metadata… "
> 
> See their (non) privacy statement:  
> [Element | Privacy Policy | Personal Data | Data-Protection](https://element.io/privacy)
> 
> Hands off such sniffing programs.
> 
> Seemingly “Free” is NEVER free!

---

<div class="post-metadata">

### Author: ![perken](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/perken/32/461_2.png) [@perken](https://discuss.freedombox.org/u/perken)
#### Post date: [November 8, 2020, 11:38pm UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/3 "2020-11-08T23:38:05Z")

</div>

Yikes, sounds quite (not) reassuring!

So, according to the info you gave me, Matrix is a communications protocol developped by foreign powers, meant to store the american public’s communications, which mutated into an inefficient metadata collector… basically, just the kind of service that anyone would dream of using.

Thanks for the pointer. Do I understand correctly also if I say that :

1.XMPP/jabber is a more secure interoperable standard than Matrix.  
2.There is currently no technical solution that allows for phone number sign up outside of Quicksy’s registry.

Question regarding JSXC:

-I have my DDNSup and running. Ejabberd is on, as well. JSXC doesn’t let me in, and says: “BOSH server NOT reachable or misconfigured.”  
Is there anything else I need to do to get in ?

 ![Capture d’écran 2020-11-08 à 15.34.14](https://discuss.freedombox.org/uploads/default/original/1X/e17fc38beba4109de18772d6f9760d782cd34f1f.png)

---

<div class="post-metadata">

### Author: ![NickA](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@NickA](https://discuss.freedombox.org/u/NickA)
#### Post date: [November 9, 2020, 1:29am UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/4 "2020-11-09T01:29:10Z")

</div>

At least I don’t know another at least workable alternative than XMPP. Its less monolithic (extensible) way of organizing things does come with some drawbacks (like at least temporary interoperability problems).

For example, searching for that JSXC problem turns up this post:

> [@Xep-363 and xep-359 support](https://discuss.freedombox.org/t/xep-363-and-xep-359-support/668/11):
>
> confounded Unfortunately you can either have a working upload OR a working jsxc webclient … Which of both depends on your choice to set tls = true (upload works) or false (jsxc works). The login screen informs that it cannot connect to bosh server and throws error code 520. I don’t know much about bosh, but I understand that in the past it worked without ssl on port 5280. Maybe bosh isn’t able to use tls at all? …

---

<div class="post-metadata">

### Author: ![NickA](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@NickA](https://discuss.freedombox.org/u/NickA)
#### Post date: [November 9, 2020, 2:26am UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/5 "2020-11-09T02:26:47Z")

</div>

Unfortunately, supporting video chat with freedombox still needs a workaround and backported ejabberd:

> [@Building/configuring a TURN server](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/49):
>
> I scripted a quick and dirty fix for the dynamic IP problem in my case. That might help others until there will be an official solution. #!/usr/bin/python3 import socket, shutil # Read the current coturn config # config = {} with open('/etc/coturn/freedombox.conf') as f: for line in f: key, val…

---

<div class="post-metadata">

### Author: ![perken](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/perken/32/461_2.png) [@perken](https://discuss.freedombox.org/u/perken)
#### Post date: [November 9, 2020, 5:30am UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/6 "2020-11-09T05:30:40Z")

</div>

Seems like my BOSH issue was encountered previously here:

> [@JSXC broken in Freedombox 20.4?](https://discuss.freedombox.org/t/jsxc-broken-in-freedombox-20-4/747/11):
>
> I can’t find any hint how to fix this BOSH problem. Is here anyone who has mod\_bosh in ejabberd on port 5443 and tls: true and jsxc still working?! Even if I put tls on false - then I lose http\_upload. https:\<mydomain\>:5443/bosh leads correctly to the test-page of mod\_bosh, so the bosh server obviously works. But if I start jsxc and type in the domain field the check outputs a failure BOSH server NOT reachable or misconfigured. 502 Proxy Error Any hint welcome!

From the discussion, it looks like it’s a matter of JSXC’s version, but it doesn’t explain why I can’t reach the server from other clients…

In my situation:

> [https://mydomain.freedombox.rocks:5443/bosh](https://mydomain.freedombox.rocks:5443/bosh) does not lead anywhere.  
> The internal server issue persists when I try to connect via other clients.

Is there anything that I can do to connect to the ejabberd server ?

---

<div class="post-metadata">

### Author: ![Onurb](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/onurb/32/458_2.png) [@Onurb](https://discuss.freedombox.org/u/Onurb)
#### Post date: [November 9, 2020, 3:54pm UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/7 "2020-11-09T15:54:37Z")

</div>

I’m sry but I think some information is out of date by now. (or I am misinformed. You never know…)  
Also I think it is relevant to differentiate between the protocol Matrix ([Matrix Specification](http://matrix.org/docs/spec/)), that is maintained by the foundation ([Redirect](http://matrix.org/foundation/)), and the company Element (used to be new vector) and their chat client Element (used to be riot). There are members of Element who are also in the Foundation, mainly because they founded both. The idea came from two people working at amdocs to not create another proprietary chat but instead one to “glue” all together and that can be implemented fairly easily by anyone. But as a proof of concept they needed to build a server implementation (synapse) and a client implementation (riot), otherwise who would use a protocol without a working example. Originally they were funded by amdocs but not since 2017. They seem to be fairly good sponsored by now with multiple big companies and governments being interested in the development of an open, decentralized and secure protocol. And the foundation is there in place to …“act as the neutral guardian of the standard on behalf of the whole Matrix community.” Matrix is under a lot of development from the spec getting refined with new ideas to all the server, client, bot and bridge implementations. They publish a weekly blog ([matrix.org/blog](http://matrix.org/blog)) where you can read everything that is being done around the protocol.

For the first link:

> [@Tom wrote 3 month ago](#):
>
> “what is really drawing us to XMPP is how it is designed with the user’s privacy as a central pillar. While the Matrix protocol […] architectural focus is directed elsewhere”

The matrix protocol doesn’t define when a server deletes its data. What you say in a conversation, can be remembered by anyone who participated. (Not unlike in the real world) Yes it seems that the homeserver they used (synapse) didn’t have the room deletion api back then so it wasn’t that convenient to delete data. ([synapse/docs/admin\_api/rooms.md at develop · matrix-org/synapse · GitHub](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/rooms.md#delete-room-api))  
I don’t think the solution is to use xmpp and just don’t store any data.  
The rest is just complains that synapse at the time had federation problems, which I don’t know but I can say that it is working pretty nicely since I started to use matrix exclusively in April.

> [@](#):
>
> Investigation documents: [The Grid Protocol / Home · GitLab](https://gitlab.com/thegridprotocol/home)

Reading this I can’t find anything speaking against matrix. This just looks like a (not currently developed) matrix competitor that even states that it doesn’t see matrix as inferior just following different philosophies.

The next two links already clear themselves up if you read the reddit comments.

In the next paragraph seems to be confused as to how everything interacts.  
Amdocs used to fund the development. So now the independent protocol is connected to what amdocs did/does by themselves?  
And the metadata they are talking about is on the one hand your ip (for 180 days), if you request the website, and anonymous usage reporting, if you enabled it (it isn’t by default).  
But you can also just host the element webclient yourself or use any other client.

But matrix has it’s problems:  
Mainly that most users are on [matrix.org](http://matrix.org). It’s the hosted server by the Foundation for themselves and open to anyone. (because most people won’t try a chat where you have to setup your own server first) This is of course against the decentralization idea and accumulates metadata on their end. But that’s exactly why you should run your own.

On the other hand there are very interesting things being done with this protocol. For example a complete p2p webclient (and I think there is already an ios build?..). Where you run a matrix server inside your browser! Threading seems to be coming in the near future. Portable accounts that can move between servers. Gitter is being transformed into/onto matrix. And a lot more…

Hopefully I could make sense of myself. To much things i wanted to write 😃 and thanks for reading 🙂

---

<div class="post-metadata">

### Author: ![perken](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/perken/32/461_2.png) [@perken](https://discuss.freedombox.org/u/perken)
#### Post date: [November 9, 2020, 6:42pm UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/8 "2020-11-09T18:42:44Z")

</div>

Ok, I understand. Thanks for the insight.

Anything about the BOSH server issue on ejabberd ?

---

<div class="post-metadata">

### Author: ![NickA](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@NickA](https://discuss.freedombox.org/u/NickA)
#### Post date: [November 9, 2020, 8:41pm UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/9 "2020-11-09T20:41:04Z")

</div>

> > Investigation documents: [The Grid Protocol / Home · GitLab](https://gitlab.com/thegridprotocol/home)
> 
> Reading this I can’t find anything speaking against matrix.

Actually seems they sorted out the repository, found the documents here now: [libremonde-org / Papers / Research / privacy-matrix.org · GitLab](https://gitlab.com/libremonde-org/papers/research/privacy-matrix.org)

> To much things i wanted to write 😃 and thanks for reading

But what you wrote reads just like the stories that come from the sources you cite.

Did you want to write why you would like clients to default to connect to central places?  
Why you would like them checking stuff and creating tracks in the process?  
Why you would like if things are transferred to storage on other servers?  
Why you would agree with repeated backpedaling only after things were discovered, after silently not doing good (repeatedly) in the first place?

> I don’t think the solution is to use XMPP and just don’t store any data.

Really? Ok, then the solution may indeed be some crucial improvements to the matrix protocol, like envisioned as “grid protocol”.

---

<div class="post-metadata">

### Author: ![Onurb](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/onurb/32/458_2.png) [@Onurb](https://discuss.freedombox.org/u/Onurb)
#### Post date: [November 10, 2020, 10:18am UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/10 "2020-11-10T10:18:28Z")

</div>

> [@](#):
>
> Actually seems they sorted out the repository, found the documents here now: [libremonde-org / Papers / Research / privacy-matrix.org · GitLab](https://gitlab.com/libremonde-org/papers/research/privacy-matrix.org) 1

Wow thanks. I didn’t know about this document. Very interesting and enlightening. Even tough i only read it once or twice now I still need to go through all the links provided. But doesn’t look that good for the avarage matrix user 😕

> [@NickA](#):
>
> Did you want to write why you would like clients to default to connect to central places?

No. No central place for all users. That’s obviously bad.  
But a central place for all clients a user uses (f.e. the Freedombox) then yes 🙂

> [@NickA](#):
>
> Why you would like them checking stuff and creating tracks in the process?

I don’t want any tracks created by checking stuff. But the fact that everyone who participated in a conversation knows about it is hard to change. You can trust the other side to delete something along side you but given information is given. I didn’t know that the IS gets information even if it is not yet activated in the client (very worrisome).

> [@NickA](#):
>
> Why you would like if things are transferred to storage on other servers?

Isn’t it good if a room exists on both our servers and I don’t have to ask your server all the time about a conversation?

> [@NickA](#):
>
> Why you would agree with repeated backpedaling only after things were discovered, after silently not doing good (repeatedly) in the first place?

I didn’t know about that / the original github gist and the reactions. (Makes matrix look really bad)

> [@NickA](#):
>
> Ok, then the solution may indeed be some crucial improvements to the matrix protocol, like envisioned as “grid protocol”.

Well yes 😃 if matrix has such security holes that won’t get revised, a fork/competitor would be preferable.

But then there are a lot of the problems that seem to be solvable by having you own IS and Stun/Turn configured. Maybe the Freedombox could be such a “Default” secure setup.  
Sad to see them not trying to fix reported security issues.

Thanks for educating me.  
And sorry for getting this thread off topic

---

<div class="post-metadata">

### Author: ![NickA](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@NickA](https://discuss.freedombox.org/u/NickA)
#### Post date: [November 11, 2020, 2:14pm UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/11 "2020-11-11T14:14:40Z")

</div>

> Anything about the BOSH server issue on ejabberd ?

There does not seem to exist an issue at [Issues · FreedomBox / FreedomBox · GitLab](https://salsa.debian.org/freedombox-team/freedombox/-/issues) , you could file one and maybe look for a newer, backported JSXC package version.

---

<div class="post-metadata">

### Author: ![NickA](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@NickA](https://discuss.freedombox.org/u/NickA)
#### Post date: [November 16, 2020, 8:07pm UTC](https://discuss.freedombox.org/t/fbx-day-4-matrix-synapses-howto/1194/12 "2020-11-16T20:07:52Z")

</div>

> [@Onurb](#):
>
> But then there are a lot of the problems that seem to be solvable by having you own IS and Stun/Turn configured. Maybe the Freedombox could be such a “Default” secure setup.

Having own information services would probably defeat the central/global scope, and it can’t do anything about the clients connecting elsewere.

But I guess it’s still ok to have both alternatives available. Though, vanilla custom XMPP servers do not need any information service running, and there exist a multitude of alternative client projects. And its just the integration of the same Stun/Turn server package installation in the freedombox XMPP server setup that is missing.
