Files uploaded to AmazonS3/MinIO get expiresAt and disappear despite URL expiry & retention disabled

I’m running Rocket.Chat version 8.0.1 in a Docker container and minIO also in a docker container for file uploads.
Files uploaded via Rocket.Chat (store: AmazonS3:Uploads) are automatically assigned an expiresAt timestamp and become unavailable after ~1 day, even though:

  • URL expiration is set to 0

  • File retention policies are disabled

Environment:

  • Rocket.Chat version: x.y.z

  • Deployment: Docker

  • Storage: AmazonS3 (MinIO backend)

  • MongoDB: 7.0

Observed Behavior:

  • Uploaded files work immediately.

  • After ~1 day, files stop being downloadable/previewable.

  • In MongoDB, rocketchat_uploads documents always have expiresAt = uploadedAt + ~1 day.

  • expiresAt persists for new uploads even after disabling URL expiry & retention policies.

What I’ve Checked / Tried:

  • FileUpload_S3_URLExpiryTimeSpan = 0 in admin settings

  • Disabled all retention policies

  • Verified Mongo indexes; expiresAt index is not TTL

  • Only one Rocket.Chat + Mongo instance running

Questions:

  1. Should Rocket.Chat continue setting expiresAt when URL expiry and retention are disabled?

  2. How can uploads remain accessible indefinitely with AmazonS3/MinIO?

  3. Are there server-side jobs or TTL configs outside Mongo that delete files based on expiresAt?

  4. If this is a bug, which part of the code controls setting expiresAt for S3 uploads?

This issue is fixed!
rooms.media uploads the files as unconfirmed by default. You need to confirm them by sending a message that references it with mediaConfirm endpoint.

By default, unconfirmed files are removed after 1 day. Confirmed files are not removed automatically (except with retention policy enabled)

1 Like