Rocket.Chat message retention policies

Rocket.Chat retention policies delete old messages and files on a schedule you set globally or per room. This page covers the options, permissions, setup sequence and what cannot be recovered afterward.

On this page

How Rocket.Chat message retention policies work and when to set them

Rocket.Chat message retention is a scheduled deletion mechanism: it removes messages and files once they pass an age you set, and it does not move them anywhere else. Organizations that must keep some chat for recordkeeping while deleting casual conversation on a schedule use retention to define how long each category of message exists. The global policy sets the default for the whole workspace, with separate toggles and maximum ages for channels, private groups and direct messages. A room can override that global policy with its own setting, so a project channel can keep messages longer than the default without changing the rest of the workspace. Rocket.Chat's security guidelines use an illustrative pattern of deleting casual chat after 30 days while keeping project discussions for six months, which shows the decision in its simplest form: sort conversations by how long the business needs them, then map each group to a room type or room. The Rocket.Chat retention policy documentation lists each setting and how the override works.

Set retention when you can name the records you must keep and the period each one has to last, and confirm that period with your records, legal or compliance owner before you configure anything. Remember that the three room types behave differently: direct messages often hold the most informal and sensitive exchanges, so decide them separately from channels and private groups. Retention is not an archive, so anything deleted by a policy cannot be restored from Rocket.Chat itself. Before you rely on a policy, test it on a non-production workspace with a small set of rooms, confirm the deletion timing, and check what happens to pinned messages and files, since the global options for files-only pruning and skipping pinned messages change what survives. Confirm with your own team which permissions and admin roles will be allowed to change these settings, because changing a policy is itself a control that auditors will ask about.

Retention options and when each fits

This table compares the Rocket.Chat retention settings by room type, files-only pruning, pinned message handling, per-room overrides and the advanced cron mode. Read each row for the situation it suits and the cost of choosing it, since most retention mistakes come from applying a broad rule to rooms that need a longer or shorter life. Use the global policy as a baseline and reserve overrides for the rooms that genuinely differ.

OptionWhen it fitsMain trade-off
Separate toggles and maximum ages for channelsPublic or team channels where project history has a defined useful life, such as six months of discussionDeleted messages cannot be recovered, so the age must match what the business and any hold obligations require
Separate toggles and maximum ages for private groupsSensitive working groups that need a shorter or longer life than open channelsPrivate groups often hold the most sensitive content, so a short age may remove records a reviewer later needs
Separate toggles and maximum ages for direct messagesOrganizations that want informal one-to-one chat pruned on a shorter cycle than project recordsDirect messages are where personal conversations and policy-relevant exchanges can both appear, so one age rarely fits all
Only delete filesKeeping message text for context while removing uploaded files that create storage or data exposure riskMessage text stays while attachments disappear, which can leave conversations that reference missing files
Skip pinned messagesRooms where pinned items are reference material that should outlive the normal age limitPinned messages can accumulate over time, so someone must review pins or the exception becomes a permanent archive
Per-room overrideA single room with a legal, project or incident need that differs from the workspace defaultEach override is another setting to document and review, and the room must be found when policies change
Advanced Retention Policy Configuration (cron)Operators who need pruning to run at set times outside peak hours or on a defined scheduleReplaces Timer Precision, so existing settings must be reviewed and retested after the change

Setting retention globally and per room

This sequence sets a Rocket.Chat retention policy from the top down: confirm entitlement and permissions, classify rooms, set global rules, add exceptions, then prove the behavior on a test room before production. The output is a documented policy that behaves as intended for each room type.

  1. Confirm plan and admin permissions

    Confirm with your Rocket.Chat account contact or the plans documentation that your workspace includes retention, since the free Starter plan lists it. Then check that the administrator who will change the policy holds edit-privileged-setting for global settings and edit-room-retention-policy for per-room overrides. Record the role names and the accounts holding them. Done when a test admin can open the global retention page and an owner can open a room's retention settings without errors.

  2. Classify rooms and set the policy matrix

    Before touching any toggle, write a matrix that maps each room type (public channels, private groups and direct messages) and each classification your organization uses to a maximum age and an pruning mode. Include who signs off on each row, such as legal, records management or the business owner. Mark which rooms may need files-only pruning or pinned message exclusion. Done when the matrix is approved and every room category has one row, so no room falls through to an undefined default.

  3. Set global maximum ages and toggles

    In Administration, open the retention settings and enable the global policy for channels, private groups and direct messages as the matrix requires, entering the maximum age for each. Turn on Only delete files where the rule is to remove attachments but keep message text, and turn on the option to skip pinned messages where pinned content must survive. Save and capture a screenshot of the saved values. Done when the saved values match the matrix row for each room type.

  4. Configure cron timing for pruning runs

    Open Advanced Retention Policy Configuration, which replaces Timer Precision with a cron expression, and set the schedule your operations team agreed on. Choose a window with low usage and confirm the expression with a cron validator before saving. Record the expression in your change log. Done when the saved expression is shown and the next scheduled run matches the window you intended. Confirm with your Rocket.Chat documentation how the server applies the schedule in your deployment version.

  5. Apply per-room overrides for exception rooms

    For rooms that need a different rule, such as a legal hold, a compliance project or a short-lived incident room, open the room's retention settings as a user with edit-room-retention-policy and set the override. Keep the number of overrides small and list each one with its owner and reason, since the matrix should explain most rooms. Done when each exception room shows its own policy and the change is recorded in your register of overrides.

  6. Verify on a test room with old messages

    Create a test room, post messages and files, and backdate them if your test process allows it, or use an older test room that already holds messages past the chosen age. Enable the policy there, let a scheduled run or your confirmed trigger execute, and check which messages, files and pinned items remain. Compare the result against the matrix. Done when the test room matches expected behavior for text, files and pinned messages, and the evidence is saved.

  7. Enable for production and confirm what cannot be recovered

    Before enabling the policy for production rooms, tell owners and records staff that pruned content is removed by the policy and confirm with your backup owner whether any copy exists outside Rocket.Chat, such as a database backup, and for how long. Then enable the production policy in the order the matrix lists, and review the first scheduled run's results. Done when the approved change record, the test evidence and the first run review are filed together.

How cron timing and overrides change what gets deleted

The timing of a Rocket.Chat retention run and the scope of each room's policy decide what is deleted, so both need to be checked before any policy goes live. In Advanced Retention Policy Configuration, a cron expression replaces the Timer Precision setting that older configurations used to set how often the cleanup job runs. Because the schedule is now a cron expression, the administrator controls the exact run times instead of a coarse interval. Confirm in the retention policy documentation how the expression is evaluated and which time zone the server uses, then record the expression in your change log so auditors can see when deletion happens.

Global retention settings apply to channels, private groups and direct messages, each with its own toggle and maximum age. A room can override the global policy, which means a per-room setting, not the global one, governs that room's messages. Changing the global maximum age will not shorten a room that already has its own override, so review every overridden room after any global change. Per-room changes require the edit-room-retention-policy permission, while global changes require edit-privileged-setting, so the people who can change one may not be able to change the other. Record which rooms override the global policy and who approved each override.

The Only delete files option limits pruning to uploaded files, leaving message text in place. This matters for regulated teams because a deleted file and a retained message can point to the same content, and the message text may still be the record you need to keep. The option to skip pinned messages is a separate control, so a pinned message may survive a run that removes other content in the same room. Test both options in a staging workspace with a room that has text, files and pinned messages, run the cron job, and confirm exactly what remains. Use the same test to confirm what cannot be recovered after a run.

Security and operational risks of retention settings

Retention settings delete data on a schedule, so a mistake removes evidence permanently and is hard to notice. The cards below cover six failure modes, each paired with a control you can set or verify before a policy goes live.

Over-broad deletion removes investigation records

A retention window shorter than your investigation or dispute cycle deletes messages that someone later needs. Before enabling a policy, map each room type to the longest period your investigations, supervision reviews and disputes can reach back. Use Only delete files where you need to prune attachments but keep the conversation text, and test the policy on a non-production room to confirm what is removed.

Retention policy docs

Under-broad retention keeps data past policy

Leaving a room type on the global default or setting no maximum age means messages accumulate beyond what your policy allows. Compare each room type's configured maximum age against your written schedule, and check per-room overrides separately, since a room can override the global policy. Review the skip pinned messages option deliberately, because pinned content is otherwise exempt from pruning.

Security guidelines

Permission sprawl among retention administrators

Changing retention requires edit-privileged-setting for global policies and edit-room-retention-policy for individual rooms. Any role holding these permissions can shorten a schedule and trigger deletion across many conversations. Limit both permissions to a small named group, audit which roles carry them, and review the list when administrators change teams.

Retention permissions

Changes made without an approval record

Retention edits take effect without a built-in review step, so a change can go unrecorded and nobody can explain later why messages disappeared. Require a written change request for every retention edit, record the old and new values, the approver and the date, and keep those records outside the Rocket.Chat instance. Cross-check configuration against that log during periodic reviews.

Backups holding deleted messages

Retention removes messages from the live workspace, but database and file backups created before the deletion still contain them. Your retention schedule therefore governs only the live system unless backup retention is aligned with it. Confirm with your backup owner how long backups are kept, whether they are encrypted, and how a restore would reapply deletions after recovery.

Conflicts with legal holds and erasure requests

A scheduled deletion can run against messages under legal hold or destroy records needed to answer a GDPR erasure or access request in a documented way. Define the hold and erasure procedures before enabling retention, and confirm with counsel and your privacy team which messages are exempt. Rocket.Chat retention does not coordinate with those workflows by itself, so assign one owner to check holds before each policy change.

Decision path for assigning a retention rule to a room

The path starts with classifying the room as a channel, private group or direct message, since Rocket.Chat sets separate global toggles and maximum ages for each type. Next, decide whether the room needs a longer or shorter period than the global default, then choose files-only pruning or full deletion. Check whether pinned messages must be kept, and only then apply a per-room override, keeping the global policy where none is needed. Finish by testing the rule on a sample room and documenting the decision, including the permission required to change it.

Steps for deciding whether a room keeps the global retention policy or gets its own override.

Questions teams ask before setting Rocket.Chat retention

Is message retention included in the free Rocket.Chat Starter plan?

Retention is listed as a feature of the free Starter plan, but confirm it against the plan terms that apply to your deployment before you rely on it. The plan page lists Starter with up to 50 users, alongside LDAP, single sign-on, multi-factor authentication and end-to-end encryption. Cost in a self-hosted setup comes from your own hosting, storage and staff time, not from the software license. Paid plans, which are priced by quote, add capabilities such as the tamper-evident audit trail, so check which controls your policy needs before choosing a plan. Ask your Rocket.Chat contact to confirm in writing which plan covers each retention setting you intend to use.

How long does retention configuration take, and what drives the effort?

The effort depends mostly on how many room types and exceptions your policy has, not on the settings themselves. A single global rule for channels, private groups and direct messages is quick to set. Effort grows with each per-room override, each room that must keep pinned messages or files differently, and each category that legal or compliance must approve. Plan time for mapping rooms to retention categories, writing the policy, testing deletion in a non-production workspace and getting sign-off. Ask any partner for a quote built from a written room inventory and an exception list, and ask what is included in testing and documentation.

What does the team need to provide before retention work starts?

You need three things: a named policy owner who can approve retention periods, admin accounts with the right privileges, and a test workspace that mirrors production settings. The policy owner decides maximum ages for channels, private groups and direct messages, and whether files are pruned on their own. Global retention changes need the edit-privileged-setting permission, and per-room policies need edit-room-retention-policy, so confirm which admins hold each. Keep a test workspace so you can see what gets deleted before production rooms are affected. Also gather a list of rooms that carry records or legal holds.

Can our own team configure Rocket.Chat retention without a partner?

Yes, a team with a Rocket.Chat administrator can set global and per-room retention in the admin settings if it has the required permissions and a clear policy. The harder part is the policy itself: deciding which records must be kept, for how long, and what happens to pinned messages and files. Teams often choose a partner when they lack a documented retention schedule, need legal review of exceptions, or must show evidence for an audit. A reasonable split is to decide the policy internally and use outside help for testing, the cron schedule and documentation. Verify all behavior in a test workspace before changing production.

Can a retention policy be reversed after messages are deleted?

Deleted messages generally cannot be restored through the retention feature, so a retention change is effectively irreversible for content already pruned. Before enabling a shorter maximum age, confirm that you hold backups you are allowed to keep and that restoring them is tested. Changing the policy later only affects content that has not yet been removed, so a mistaken long period can be shortened, but a mistaken short period cannot be undone. Test in a non-production environment, check the effect on pinned messages and files-only pruning, and document who approved each change before it goes live.

How does retention interact with GDPR erasure requests and HIPAA recordkeeping?

Retention and erasure serve different purposes, and both can apply to the same data. GDPR erasure requests require you to remove personal data when the legal conditions apply, while HIPAA recordkeeping can require you to keep certain records for a defined period. Your policy must record which data categories fall under which rule, and which retention exceptions are justified. Retention settings delete data on a schedule, but they do not replace a process for responding to individual requests. Get legal and privacy review before finalizing periods, and see the related Rocket.Chat compliance pages for the specific steps.

When should we bring in a partner for Rocket.Chat retention?

Bring in a partner when the retention policy has many exceptions, must satisfy a regulator or auditor, or affects rooms that hold regulated records. A partner is also useful when the team needs a tested cron schedule, a verified deletion test plan and written documentation for evidence. DeployOpen plans and documents these settings in your own infrastructure and prepares the evidence your compliance team reviews, but it does not issue audit reports or certifications. Ask for a fixed-scope written proposal that lists the room inventory, test cases, deliverables and the retest you will receive.

How DeployOpen scopes Rocket.Chat retention work

DeployOpen treats Rocket.Chat message retention as a written scope before any setting changes. We map each room type to the retention rule your records obligations require, then build, test and document the policy inside infrastructure you control, so your compliance and security teams can review what was configured and why.

How we scope

  • Map each room type (channels, private groups, direct messages) to the retention period your recordkeeping rules require.
  • Decide which rooms need files-only pruning, pinned-message exclusions or per-room overrides, and record each exception.
  • Confirm which administrators need edit-privileged-setting or edit-room-retention-policy, and who approves changes.

How we build

  • Configure global retention settings and cron-based timing through the Advanced Retention Policy Configuration in a non-production instance first.
  • Test deletion behavior with sample rooms, including pinned messages, files and direct messages, before applying the policy to live data.
  • Document what can and cannot be recovered after pruning, so the policy matches what your team expects to happen.

How we hand over

  • Deliver a written retention matrix showing each room type, maximum age, file rule, pinned-message handling and override.
  • Provide the admin runbook covering permission assignments, change approval steps and how to verify a scheduled run.
  • Walk through evidence your auditors or compliance leads will ask for, such as configuration exports and test results.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and retention reviews after Rocket.Chat version changes are available as a retainer.
  • Quotes follow from the written scope, so ask for the retention matrix, test plan and handover items to be itemized.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.