this post was submitted on 28 Feb 2026
99 points (98.1% liked)
Selfhosted
59999 readers
624 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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam.
-
Posts here are to be centered around self-hosting. Please ensure it is clear in your post how it relates to self-hosting.
-
Don't duplicate the full text of your blog or git here. Just post the link for folks to click.
-
Submission headline should match the article title.
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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.
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.
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?
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:
And periodically I run vacuum;
Thank you for the queries. The rhetorical question is why isn't the server handling this.
I don't know, can't speak for the devs. It is weird that if you don't implement these API calls buried a bit deep in the wiki, you end up storing every meme and screenshot anybody posted on any instance for the rest of time. But I found these through issue reports with many people asking for these to be implemented by default with for instance a simple setting "purge after X days" and a list of rooms to include or exclude from the history clean-up.
are the media files redownloaded from other servers when someone tries to load them? I guess all local media is lost forever, but maybe not remote ones
In my understanding that's the idea, the local ones are lost unless another federated instances synced them. As for the remote ones, maybe they're backed up but I really don't care for an instant messaging platform to not have a rear view past 2 weeks.
I don't think the homeserver tries to fetch media remotely that was local but since deleted
we often talk about how discord is a black hole of information, but this is worse than that
tbh that should apply to any kind of selfhosted service, especially when its not only for you
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?