Comment on Self-hosting matrix server on Raspberry Pi 4 next to Navidrome and Jellyfin
stratself@lemdro.id 2 weeks ago
Hi, as someone running their Matrix server on the same ware (using Continuwuity I have some thoughts:
- The bulk of the load is in federation with other homeservers. If you only run it in non-federated mode the resource usage would be minimal like a simple REST API server.
- If you do enable federation on such a low powered device, consider performance tuning it. DNS tuning is the most essential one, and then you should allow it to use some more RAM than normal (increasing cache capacity)
- Also if you enable federation, expect it to be the software with the most resource impact. I think usually Jellyfin and Navidrome only uses CPU when you’re streaming something, but Matrix may do a lot more background work because federation and so on.
- Calls are handled by a separate LiveKit SFU, which uses WebRTC for most of its operations rather than HTTPS. So you cannot expose it using Cloudflare Tunnels, and you may run into issues forwarding/routing a large number of UDP ports as well.
- I usually recommend renting a VPS for Livekit instead for simpler config and networking. But if you somehow get it working on the Pi itself as well it’d be great to know.
- I used mautrix-whatsapp a long time ago for the bridge. It was good enough, but do note that it is just a stopgap solution to prevent social isolation. Its better to eventually move people to federated protocols.
I’d also like to say you’d get much more juice out of a mini PC or some other non-embedded devices like a used laptop. This is for all your apps anyways.
And yes, Continuwuity can run in docker compose. There’s a few example files for it on the site, feel free to check it out and ask in the support room.
Thanks a lot for this detailed response and the reference to the resources! It helped a lot!
I can give an update on my progress.
I have a functioning matrix server with the mautrix bridge running on my pi now. For livekit I’ve followed your recommendation and set up a VPS for that as well as for routing traffic to my pi (due to my ISP’s policies it is a hassle to get inbound traffic working without a VPN).
The next step now is to get an Android Virtual Device configured and running for whatsapp to receive messages through the mautrix bridge (or get hands on another phone to run whatsapp on there). Having to resort to mautrix is unsatisfactory to me as I would prefer to completely get rid of whatsapp. I am trying to get people to switch to matrix but getting people to switch is a tough fight against the demons of indifference and convenience that so many people value over everything. I guess that is the price people have to pay for trying to live a more privacy conscious life. Until something switches in people’s minds using the bridge is unfortunately the best it gets for me.