logfile.ch

Matrix Recorder helps you store your precious conversations

While end-to-end encryption on Matrix provides secure messaging on your own infrastructure, it has the downside of making it impossible to retrieve your message history once you lose your encryption keys (which can happen e.g. by logging out of Riot or — when you use the web-based client — by clearing your browser’s local storage).

If you want to be prepared for such cases, you can use Matrix Recorder proactively to keep a history of your conversations:

This tool (written in Node.js(https://nodejs.org/en/)) retrieves all messages you receive or send just as a regular client would. It uses your existing Matrix account but registers as a new device with its own encryption keys, which means that it can decrypt messages sent to you after Matrix Recorder has been registered. You don’t need to keep it running all the time but can just start it from time to time - it will continue from where it left off when you start it the next time.

All timeline events retrieved that way will be stored in an sqlite database which you can just keep as a backup or use to create your own archive. Matrix Recorder comes with a small utility that extracts messages from this database into HTML files that can be viewed in your browser.

Just to make this clear: You can only use Matrix Recorder to record E2E encrypted messages after you have started using it. You can’t decrypt messages from the past.

It is written using the matrix-js-sdk provided by the Matrix developers, which makes developing your end-to-end encryption enabled applications and tools for Matrix extremely easy. I really recommend giving it a try!