Server settings
Uploads
Upload size limits and allowed formats for message attachments, avatars, logos and custom emojis.
Every kind of file users can send has its own policy. Message attachments are the broad one — avatars, logos and emojis are narrow image pipelines with per-type dimensions.
Message attachments
maxAttachmentSizeMb integerMaximum size of a single attachment; oversized uploads are rejected before transfer.
maxAttachmentsPerMessage integerHow many files one message can carry.
attachmentAllowedMimes listAllowed MIME types — checked server-side on the real content type, not the extension.
defaultAttachmentRetentionDays days empty = keep foreverUploaded files are deleted this many days after their message was posted, by the same scheduled purge that handles message and notification retention. Attachments run on their own clock: the message body stays intact and readable, only the files and their database rows go. Useful when files are the bulk of what you store but the conversation is worth keeping.
Shrinking size limits never deletes existing files — it only gates new uploads.
Disk-pressure purge
An emergency valve, separate from the age-based retention above: when free disk space drops below a trigger percentage, the oldest eligible attachments are deleted until a target percentage is restored. Off by default.
diskPurgeTriggerPercent 0–90 default 0 = offRun the purge once free disk space falls below this percentage. 0 disables the feature entirely — nothing runs.
diskPurgeTargetPercent 1–95 default 15Purge oldest-first until free space reaches this percentage. Must be greater than the trigger.
diskPurgeMinAgeDays days default 14Attachments younger than this are never purged, even if the target can’t be reached.
diskPurgeIncludeDms boolean default falseOff means direct-message attachments are never purged by this feature, regardless of age or pressure.
Pinned messages’ attachments are protected, and attachments on deleted messages go first — the purge empties those before working through the rest of the oldest-first queue. It runs daily alongside the other retention jobs (see Operations); every run — whether or not it reached its target — writes an audit-log entry and notifies every admin with how many files were removed and how much space was freed. A run that exhausts every eligible attachment without reaching the target asks admins to consider adding storage, and stops without touching protected files. A purged attachment’s message keeps its text; the attachment itself is replaced with an “Attachment removed” placeholder chip.
This purge is irreversible, like the retention purges above — there’s no undo once a file is gone.
Image pipelines
avatarMaxSizeMb / avatarMaxWidth / avatarMaxHeightUser avatars.
logoMaxSizeMb / logoMaxWidth / logoMaxHeightCommunity logos.
communityEmojiMaxSizeMb / communityEmojiAllowedMimesCustom emojis — animated GIFs pass through unflattened.
communityEmojiMaxWidth / communityEmojiMaxHeight not in admin UIEnforced on every emoji upload, but they live only in the settings registry — absent from this tab and from the admin config API, so changing them means writing to the settings store directly.
Signed-URL lifetimes for these files (mediaTokenTtlSeconds, communityEmojiTokenTtlSeconds) are set on the Advanced tab.