Automating Cleaning Synapse Empty Rooms and Room History

I’ve been trying out the matrix protocol (@stevensaus:faithcollapsing.com), largely because of its focus on bridging between different protocols. I’ve been selfhosting a node on the network (using Synapse) because, well, I’m me. For the most part, it’s been the challenging kind of fun… at least for me.

But sometimes I’ve thought there has to be a better way – particularly when talking about documentation for how to run a Synapse node.

For example, there’s a relatively clear tutorial on cleaning up the history on your Synapse server (and compressing the database, but I’m focusing on the first bit) over on Levan’s Workshop.

But it didn’t work out of the box. And a lot of it is set up to be done by hand. For example, their explanation on how to purge "forgotten" or empty rooms suggests that you’ve got to manually cut and paste all the addresses every time.

Forget that.

So I put together this BASH script (uses CURL and jq as well) which will automatically remove rooms that have no participants and purge the history of the rooms on your server – both high volume ones more frequently than the "regular" rooms.

You can find the script (the documentation still needs some work, ironically) on GitHub at https://github.com/uriel1998/synapse-utility.

Featured Image by Michal Jarmoluk from Pixabay

Was this post helpful or insightful? Buy me a coffee here or here and share this post with others!

Popular posts:

  • The difference between boundaries and rules
  • Two Ways to get CMYK Separation Using GIMP Instead of Photoshop in 2022
  • Weekend Project: Whole House and Streaming Audio for Free with MPD
  • Word Porn Quotes
  • Organizing and Tiling Your Windows on #Openbox Using Only... Openbox
  • Simple Smart Playlists for MPD (that work!)

Recent Posts

One Comment

Comments are closed.