Dies ist eine alte Version des Dokuments!

Change Matrix room retention time

Systemli's Matrix home server instance has a default retention time of 30 days. We allow values from 1-180 days.

Clients that have already downloaded and stored the event/message might continue to show it, unless they themselves implement support for message retention policies, the homeserver can not do anything about this.

Sadly, this setting is currently not exposed in Element. If you want to increase/decrease this time, do as follows:

  • Find you personal access token in Element by:
    • Click on your username in the upper left corner
    • All settings > Help & About > Advanced
    • Access Token: <click to reveal>
  • Find room id in Element by:
    • Click on room info (i) in the upper right corner
    • Room settings > Advanced > Room information
    • Internal room ID: …
  • The APi only accept a time in miliseconds, so calulate a new time:
    • 1000*60*60*24*$number_of_days
  • Use curl to put another lifetime
curl -X PUT -d '{"max_lifetime": 7}' --header "Authorization: Bearer $your_access_token" '$your_room_id/state/' 

Check if custom retention time is set

curl --header "Authorization: Bearer $your_access_token" '$your_room_id/state/'       

If something custom is configured it should return something like


Further reading

howto/matrix/max_lifetime.1626543423.txt.gz · Zuletzt geändert: 2021/07/17 19:37 von unbuntu