Who runs their own server here and has some first hand experience? I would be really interested in running my own server but I'm not sure whether I have enough resources for it. I could run it on a small VServer, at the moment 30GB free space, 6GB RAM. At the moment the server runs Gitea, Prosody and a small Friendica instance (more or less just for testing). Do you think it makes sense to install Matrix on the server or will I soon run out of memory/storage?

· · Web · 12 · 1 · 4

Thanks for all the great replies in this short amount of time. Not sure about the crawling, mentioned by @hrthu might be an issue as well. What I worry most at the moment is the storage as Matrix stores the whole history of all rooms forever, afaik. I will mainly join a few IRC channels, some 1:1 chats and maybe 1-2 Matrix channels. I will be the only user. But if I join for example the official Matrix or Riot room to ask some question, I could imagine that it could become a problem 🤔

Are there any rough number regarding storage someone could share... How large is your Matrix db after how many years/months?

@liaizon @bjoern ours runs on a vps with 4gb ram and 1 cpu. only a handful of users though. early releases were awful, latest releases are less resource hungry.

@bjoern RAM should be ok but the hard disk will soon become too small for the Synapse database.

@bjoern it runs on a Raspberry Pi via FreedomBox, not without issues though. 1GB RAM seemed not enough to join very big chat rooms, but worked fine with smaller ones. The latest #synapse release may have improved things.

@bjoern Synapse stores shared files/images in a directory, so you can move those to different drives as needed. As to memory, it really depends how you use it. It is fine among a few friends but if you join the large federated rooms, it starts to crawl.

@bjoern An important thing to keep in mind is that it's mostly room amounts/size that matters.
On my server that's in most of the big rooms (at least and I'm faring alright with a dedicated 25GB disk for postgres and 40GB for the rest of the server, including media for synapse.
However i have to prune the data quite heavily, running a script that purges old messages from is a necessity for me.

@swedneck @bjoern Any chance you'd share your purge scripts. That sounds really useful.

@swedneck Hello. Could you please share the scripts one more time? The link presented above isn't working. I am courious about how to clean the DB in order to be still fast enough. I am using SQLite for a nonfederated home #matrix server, but the manner will be the same. More important is which tables could be edited and what information could be safely deleted

@ludman1 I'll try to fix the link, but i can't help with anything else. I'm just barely making my own stuff work and i have no real clue how sql stuff works.

I suggest you ask for help in

@swedneck Thanks for the script! I managed to edit it for my needs. Works also with SQLite3 db and can deletes local events too.

@bjoern I’d also like to see this, specifically statistics for estimated additional storage per user per month, at least on average.

@bjoern Mine is 5.3 GB for a single user that is basically in most of the big matrix rooms + around 10 active irc channels. This is for 3.5 months now.

@bjoern 700mo for 9month and 2 users.

a few 1-1 and some devroom

@bjoern like @swedneck pointed out already, how heavy Synapse is depends *entirely* on how large the rooms are your users join. If only small rooms, you'll get away with a small 2GB server for a long time. If you want to join (the HQ room), you'll need much more power quickly and lots of disk space.

The server has approx 100 users who are in very big rooms. Our server is 1,5y old and just bumped it to 8GB ram from 4GB since it started to swap. DB is approx 12GB.

@bjoern 1 year and a couple days later, my 9 users homeserver has a 3.8 GB database and media disk usage.

We do not federate heavily. 2 GB of ram is plenty.

However pay attention to the cpu botteleneck. Federated rooms with a high number of participating servers hits the CPU quite bad (tls negotiation and outbound connections). Synapse is not concurrent software but workers can be split out as needed.

@bjoern Sorry for the late reply. I run matrix synapse (ah, and gitea, by the way :) ) on a VPS with only 4GB RAM since months. Joining big federated rooms eats lots of disk space. But this is the only problem I've noticed. But if you don't overdo things, 30GB should be sufficient. Have you decided yet?

@beedaddy no, I haven't decided yet. Thanks for your answer, it will help me to come to a conclusion.

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!