Retention policy

Hi everyone,
Is the a feature that enable to the rocket chat admins to set a retention policy for the content that is sent/posted in private/public rooms and private chats? Our Mongo DB is already after a few months bigger than 5GB and it failed unexpected a few weeks ago and there was a message like "DB is bigger tham 4 GB " or something like that.
Is there already a solution or are working on this ?


Best, and quickest way is to switch to a 64bit install where there is not a limit on the size of the mongodb. Or if you are using a free mongodb provider that only allows 4GB… stop using gridfs for files and use amazon s3 or another block store to upload your files

We already have a 64Bit installation. But anyway we don’t want to keep messages and a attachments for ever. As i said our DB has already over 5GB and we are looking for a solution in order to remove chats and attachments that are older than 6 months for example. Keeping chat history is not an option and it’s also not necessary.

This will be implemented here:

Good job. That looks really good.


It would be great if I could have a global retention policy which defines the upper limit for maximum age of the messages and uploads and every channel/group owner is allowed to choose if they want to use the global default or also a smaller age for their channel/group, but not more than the global policy.
So I can enforce a default retention policy for everything, but it is allowed to have stricter policies on individual channels/groups.