this post was submitted on 28 Feb 2026
64 points (98.5% liked)

Selfhosted

57042 readers
525 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Hi. I'm kinda of a noob in the world of self-hosting and matrix, for that matter. But I was wondering how heavy is it to host a matrix server?

My understanding how matrix works is each participating server in the room stores the full history and then later some sort of merging happens or something like that.

How is that sustainable? Say in 5 years matrix becomes mainstream and 5 people join my server and each also join 3 different 10k+ people rooms with long histories. So now what I have to account for that or people have to be careful of joining larger rooms when they sign up in a smaller-ish server?

Or do I not understand how Matrix works? Thanks.

top 22 comments
sorted by: hot top controversial new old
[–] stratself@lemdro.id 4 points 5 hours ago

I wanna reshare my experiences here. Essentially it doesn't scale well with large rooms, and isn't friendly with janky/underpowered equipment like XMPP. But with a lot of performance tuning it can go a long way.

For a room, the amount of servers you federate with is a more reliable metric than member count (so 5000 accounts on 2 servers would likely take less load than 500 accounts on 500 servers, as an example). There are some large public rooms that are very broken, and I advise banning them before users get to join

[–] pcouy@lemmy.pierre-couy.fr 19 points 14 hours ago

I don't know about other homeserver implementations but synapse kinda sucks. It used to randomly eat 100% of 1 or 2 CPU cores (including the database) until I tracked it down to 3 rooms having a messed up state which caused costly SQL queries. I removed the rooms from my server (using a third party admin panel because there's no proper admin GUI built in, the documentation just mentions curl commands to hit the admin API, with placeholders to manually replace). It has been fine since I did it, but I'm the only user on my server. And I expect other issues to come up at any time...

It also eats a lot of storage, mostly the database. It grew very large quickly, but it's more stable now

[–] poVoq@slrpnk.net 13 points 13 hours ago* (last edited 13 hours ago) (2 children)

This is a fundamental issue of the Matrix protocol, yes. For regular small scale use it doesn't matter so much, and the state history gets reset every time you do a room upgrade, which is another annoying "feature" of Matrix, but it eases the fundamental problem a bit.

But IMHO the Matrix protocol is a child of the Bitcoin hype era and is built on a similar data-structure that is inherently impossible to scale and the developers of Matrix should have realized that early on. Their bosses back then actually did, but they spun it off as a separate company and got some crypto-currency investments so the can was kicked down the road and here we are...

[–] cRazi_man@europe.pub 8 points 13 hours ago (1 children)

Is there a good alternative that you would recommend?

[–] poVoq@slrpnk.net 16 points 13 hours ago (1 children)
[–] Onomatopoeia@lemmy.cafe 11 points 13 hours ago (2 children)

Still staggering to me that XMPP isn't the default, since it was used in many chat apps in the late 90's.

[–] iamthetot@piefed.ca 2 points 6 hours ago (1 children)

What client(s) do you use/prefer?

Like many, I am looking for a Discord replacement and (possibly hot take) I largely like Discord's layout, UI, and chat flow. That is to say, I like threads, channels, categories, and "servers" (spaces, what-have-you) to partition my chat experience. There are a few Matrix clients that replicate this closely, but the XMPP ones I have seen so far at least were not very enjoyable user experiences for me.

(Not for nothing, I also have been able to get a Synapse server running on my homelab, but have thus far not been able to successfully get an XMPP server running so that's not helping my experience either)

Happy to check out your suggestions.

[–] hexagonwin@lemmy.today 3 points 4 hours ago

it seems like movim is the most discord-ish xmpp client

[–] SreudianFlip@sh.itjust.works 6 points 12 hours ago (2 children)

Does it do screen sharing, group calls, etc.?

[–] Neptr@lemmy.blahaj.zone 5 points 12 hours ago (1 children)

Screensharing is the only thing i dont think it does. Voice and video good. See snikket or conversations.im

[–] SreudianFlip@sh.itjust.works 4 points 11 hours ago

Neither of those client promo pages mention group calling. le sigh

[–] Eldaroth@lemmy.world 4 points 11 hours ago (1 children)

I believe group calling is only a thing certain clients (e.g. Dino, Movim) support, although there is a initiative to implement it on protocol level as far as I am aware.

[–] SreudianFlip@sh.itjust.works 5 points 11 hours ago (1 children)

So, Onomatopoeia there is wondering why xmpp isn't standard, and I'm getting the sense that it is targeted at oldskool usage.

Discord is popular because it's easy to start using, it has collaboration features like group screensharing, and it doesn't assume an ubernerd is the target audience.

Maybe we'll get a more unified, feature rich xmpp implementation, but until then, sounds like matrix/element is closer, despite its warts.

[–] Eldaroth@lemmy.world 0 points 10 hours ago

Yeah you could consider it old school, or maybe just a product of another time were people didn't mind to use multiple software for different uses.

I for one don't mind using Mumble for voice and XMPP for text chat or one to one calls for example.

I don't have a computer or smartphone so I only can install one app and that's it. And I know I might be in the minority when it comes to that, at least compared to the general public. For gods sake it's already hard to get people to install a second messenger app, not even trying to get them off WhatsApp or other meta crap...

[–] illusionist@lemmy.zip 3 points 13 hours ago (1 children)

Any source for the coin stuff? Never read about it

[–] poVoq@slrpnk.net 6 points 13 hours ago* (last edited 13 hours ago)

They (Element / New Vector) got a major early investment in 2018 from Status, a cryptocurrency/web3 company, and later in 2021 an even bigger one in relation to Protocol Labs, who peddle their own cryptocurrency.

[–] LodeMike@lemmy.today 11 points 14 hours ago (2 children)

It can baloon as it scales up. Matrix.org (homeserver) has had at least one DB corruption and that's with their proprietary Rust bindings for Synapse. Small communities, especially ones that share rooms between them, should be fine on most systems. Make regular backups of the DB.

[–] northernlights@lemmy.today 14 points 12 hours ago* (last edited 12 hours ago) (1 children)

And, importantly, run the db on postgre, not sqlite, and implement the regular db maintenance steps explained in the wiki. I've been running mine like that in a small VM for about 6 months, i join large communities, run whatsapp, gmessages and discord bridges, and my DB is 400MB.

Before when I was still testing and didn't implement the regular db maintenance it balloned up to 10GB in 4 months.

screenshot of cloudbeaver

[–] drkt@scribe.disroot.org 5 points 11 hours ago (1 children)

It is my understanding that all of the ballooning DB is room states, something that you can't really prune. What exactly are you pruning from the DB?

[–] northernlights@lemmy.today 9 points 10 hours ago

I purge 2 weeks old media using these. Then I purge the largest rooms' history events using these. Then I compress the DB using this.

It looks like this:

export PGPASSWORD=$DB_PASS
export MYTOKEN="mytokengoeshere"
export TIMESTAMP=$(date --date='2 weeks ago' '+%s%N' | cut -b1-13)

echo "DB size:"
psql --host core -U synapse_user -d synapse -c "SELECT pg_size_pretty(pg_database_size('synapse'));"

echo "Purging remote media"
curl \
	-X POST \
	--header "Authorization: Bearer $MYTOKEN" \
	"http://localhost:8008/_synapse/admin/v1/purge_media_cache?before_ts=%24%7BTIMESTAMP%7D"

echo ''
echo 'Purging local media'
curl \
	-X POST \
	--header "Authorization: Bearer $MYTOKEN" \
	"http://localhost:8008/_synapse/admin/v1/media/delete?before_ts=%24%7BTIMESTAMP%7D"

echo ''
echo 'Purging room Arch Linux'
export ROOM='!usBJpHiVDuopesfvJo:archlinux.org'
curl \
	-X POST \
	--header "Authorization: Bearer $MYTOKEN" \
	--data-raw '{"purge_up_to_ts":'${TIMESTAMP}'}' \
	"http://localhost:8008/_synapse/admin/v1/purge_history/$%7BROOM%7D"

echo ''
echo 'Purging room Arch Offtopic'
export ROOM='!zGNeatjQRNTWLiTpMb:archlinux.org'
curl \
	-X POST \
	--header "Authorization: Bearer $MYTOKEN" \
	--data-raw '{"purge_up_to_ts":'${TIMESTAMP}'}' \
	"http://localhost:8008/_synapse/admin/v1/purge_history/$%7BROOM%7D"

echo ''
echo 'Compressing db'
/home/northernlights/scripts/synapse_auto_compressor -p postgresql://$DB_USER:$DB_PASS@$DB_HOST/$DB_NAME -c 500 -n 100

echo "DB size:"
psql --host core -U synapse_user -d synapse -c "SELECT pg_size_pretty(pg_database_size('synapse'));"

unset PGPASSWORD

And periodically I run vacuum;

[–] LodeMike@lemmy.today 3 points 14 hours ago

There's also issues with the state disagreement / resolution algorithms across federation.

Has this been solved? Maybe it's also due to database corruption, where some state is forgotten across the federation, and thus the algorithm breaks down?

[–] littleomid@feddit.org 6 points 12 hours ago

Barely 1-2% CPU usage. Using synapse.