Scanning Rocket.Chat file uploads with ClamAV

Rocket.Chat can reject infected uploads through the ClamAV Integration app and a ClamAV server you run. This page covers setup, what users see, and how scanning fits with upload restrictions.

On this page

How Rocket.Chat file scanning with ClamAV works

The supported way to block infected files in Rocket.Chat is the ClamAV Integration app from the Marketplace, which sends each uploaded file to a ClamAV server that your organization runs. When the server detects a virus, the upload does not complete and the user is notified. The app does not scan files on the Rocket.Chat server itself, and it does not replace a ClamAV deployment of your own, so the scanning capacity, network path and signature updates are your responsibility. Confirm the app's current requirements on the Rocket.Chat ClamAV app page before you commit to a design, because the setup depends on the server host and port you enter in the app settings.

Plan the ClamAV server as a separate service with its own hosting, access rules and patch cycle. ClamAV is an open source anti-virus toolkit built around a multi-threaded daemon, a command-line scanner and a database updater, and it is licensed under the GNU General Public License, version 2. Decide where the server runs, which network segment can reach it, and how it keeps its signature database current. ClamAV documents a private signature mirror for organizations that cannot rely on public downloads, so ask your security team whether that mirror is required in your environment. Also check the ClamAV documentation for the platforms it supports before you choose the host operating system.

Treat this scanning as one layer, not a complete defense. A file scanner only sees what is uploaded through Rocket.Chat, and it relies on known signatures, so it will not catch every threat, and files shared outside the workspace, copied from a browser cache or synced by another tool still reach endpoints. Keep endpoint protection running on user devices and the Rocket.Chat servers, and review how the app behaves for each client you support, including web, desktop and mobile. Document this boundary in the design so that the compliance and security teams understand what the control does and does not cover.

What you need before enabling ClamAV scanning in Rocket.Chat

Scanning uploads depends on four things lining up: a Rocket.Chat workspace that can install the app, a ClamAV server your Rocket.Chat servers can reach, Marketplace access, and a decision on how ClamAV gets its signatures. Confirm each one before you touch the app settings, because a gap in any of them surfaces as uploads that fail or never get scanned.

Confirm workspace and plan eligibility

The Marketplace compatibility table lists ClamAV as available on Community workspaces, so check which workspace type you run before planning anything else. Confirm this against the current Marketplace docs, since compatibility can change between releases. Also confirm that your Rocket.Chat version is on a supported line, because end-of-life versions lose Marketplace access and may stop receiving security fixes. Check the current release notes for the exact supported line.

Marketplace docs

Run a ClamAV server you control

Setup requires your own ClamAV server, not a hosted scanning service, so Rocket.Chat sends uploads to a host you operate. Decide where it runs, who patches it, and how it is monitored. The scanning daemon must stay available whenever users upload, because an unreachable server affects how uploads are handled. Plan capacity for peak upload volume, and test with a known safe test file before go-live.

Open a network path and port

The Rocket.Chat servers must reach the ClamAV host on the port you configure. Record the host name or address and port you will enter in the app settings, then confirm that firewall rules, security groups and any network segmentation allow traffic from every Rocket.Chat node. In containerized or multi-node deployments, test from the actual container or pod network rather than from an administrator workstation, and confirm your own network path rules before opening anything.

Get Marketplace access to install the app

Installing ClamAV Integration requires an administrator account with permission to add apps from the Marketplace. Confirm that the account can install and configure apps, and that your change process allows the install. Record who approves app installs, since the app will sit in the upload path for every user. Keep the installation record with your change tickets so the scanner decision can be audited later.

Choose a ClamAV version and support window

Pick the ClamAV release line before you install, because LTS feature releases carry a defined support window. ClamAV 1.4 is the latest LTS feature release, with an expected end of life of August 15, 2027. Plan an upgrade ahead of that date and confirm the current support policy before you commit. Record the version in your asset inventory so patch work is not missed.

ClamAV end-of-life policy

Decide how signatures reach the server

ClamAV needs current virus signature databases. Decide whether the server downloads them directly or pulls from a private mirror you run with cvdupdate and points at through the DatabaseMirror setting in freshclam.conf. Official downloads are rate-limited by IP address, so a shared outbound address can cause update failures. Confirm your egress rules, and if you are in an air-gapped network, plan how signatures will be imported and refreshed.

ClamAV private mirror docs

Setting up the ClamAV Integration app step by step

This sequence takes you from a running ClamAV server to a Rocket.Chat workspace where infected uploads are rejected, with a check at each stage so you know the scanner is working before users depend on it. Run it in a non-production workspace first.

  1. Deploy and update the ClamAV server

    Your infrastructure team installs ClamAV on a Linux host or container that Rocket.Chat can reach over the network, and keeps it on a current release. ClamAV's documentation describes the daemon (clamd), the command-line scanner and the database updater as separate parts, so confirm all three are installed. Choose a version that is still within ClamAV's support window, for example the 1.4 LTS line, whose expected end of life is August 15, 2027. Done when the clamd service starts without errors and the version reported by the scanner matches what you planned to deploy.

  2. Confirm signature updates run

    Configure the database updater so virus signatures refresh on a schedule and confirm the first update completes. If your network restricts outbound downloads, ClamAV documents a private signature mirror built with cvdupdate, and clients can be pointed at it with the DatabaseMirror setting in freshclam.conf. Official downloads are rate-limited by IP address, so plan for that if many servers share one egress address. Done when the update log shows signatures loaded and the daemon reports a database version it can scan with.

  3. Confirm the daemon answers on its port

    Before involving Rocket.Chat, check that clamd accepts connections on the host and port you will enter in the app. Send a ping from a machine on the same network segment as the Rocket.Chat server, since a firewall rule that works from your admin workstation may still block the Rocket.Chat container or pod. Done when the ping returns a PONG response from the Rocket.Chat host itself, not just from your laptop.

  4. Install ClamAV Integration from the Marketplace

    A workspace administrator opens the Marketplace in the Rocket.Chat administration area and installs the ClamAV Integration app. Confirm your workspace type first, because Rocket.Chat's compatibility table lists ClamAV as available on Community workspaces, and check that the app appears as installed and enabled in the list of apps. Done when the app shows as active in the administration area with no install errors in the server logs.

  5. Enter the server host and port in app settings

    Open the ClamAV Integration app settings and enter the host name or address and the port of your clamd service, using the same values you confirmed in the previous step. Use an address the Rocket.Chat server resolves, not localhost, unless clamd runs on the same host or container network. Save the settings and check the app's status or logs for a successful connection. Done when the app reports a connection to the scanner and does not show a timeout or refused-connection error.

  6. Test with a harmless file in a non-production room

    Create a test room that only administrators can see, then upload a plain text file and confirm it posts normally. Next, upload the EICAR standard antivirus test string as a text file, which every compliant scanner must flag but which is not malware. Done when the clean file completes and the EICAR file is rejected, the upload does not appear in the room, and the uploading user sees a notification. Keep the test file out of production rooms, backups you retain for long periods and any shared drive.

  7. Check the rejection path and record the result

    Repeat the EICAR upload from a web browser, the desktop client and a mobile client, since the app is documented to notify users across these clients. Note the exact message each one shows and check the server logs for the scan event. Record the ClamAV version, signature database version, app version and test results in your change record so you can compare them after the next upgrade. Done when all three clients show the rejection and the change record is complete.

How an upload travels from the client to ClamAV and back

The path starts in the user's client, which sends the file to Rocket.Chat. Rocket.Chat hands the file to the ClamAV Integration app, which calls your ClamAV server over the host and port set in the app settings. The verdict returns along the same path: a clean file completes the upload, and an infected file is stopped and the user is notified. The trust boundary sits between the Rocket.Chat zone and the scanning server zone, so confirm that the host and port are reachable only from the app and that the scanning server is not exposed to other networks.

Upload path from the user's client through the ClamAV Integration app to your own scanning server and back.

What users see when a file is rejected

The web client is the most common place users will meet a rejected file, so it is the first behavior to verify. When the ClamAV Integration app detects a virus, the upload does not complete. The file does not appear in the room, and the user receives a notification in the interface that the upload was not accepted. Test this with a harmless test file that your ClamAV server flags, such as the EICAR test string, so you see the real flow in your own environment.

  • Upload outcome: Confirm that the file never posts to the channel or direct message, and that no link to the file is created.
  • Notification wording: Record the exact message shown to the user in a test workspace. Do not write it into user documentation from memory.
  • Message composition: Check whether any text typed with the attachment is still sent, and whether the user must re-attach a clean file.
  • Admin visibility: Look for any admin-side log entry or record of the blocked upload, and confirm where it appears.
  • Browser differences: Repeat the test in each browser your users run, since notification display can vary.

Before publishing guidance, confirm each of these points in a staging workspace on the version you run.

Where malware scanning fits with upload restrictions and hardening

Malware scanning and upload restrictions answer different questions, so plan both as separate controls. The ClamAV Integration app checks whether a file contains a known threat before the upload completes, but it does not decide whether a file type, file size or uploader should be allowed in the first place. Those decisions belong to the upload restriction settings in your Rocket.Chat workspace, which you should review alongside the scanner. Ask your team to list which file types users genuinely need in each channel, what maximum size is reasonable for your network and which roles may upload at all. A scanner that is working correctly still accepts a permitted file type from an untrusted source, and a tight file policy still lets through a malicious file that a scanner would have caught. Keep both controls in your configuration records so an auditor can see each one.

The scanner only sees what passes through Rocket.Chat's upload path. Files shared by other means, such as a link to a file stored in another system, a copy synced from an external drive or content pasted from another application, are not checked by this integration. Confirm with your team how files enter and leave the workspace, and review three areas separately: message and file retention, which determines how long infected or suspicious files remain on the server; export, which can move files outside the scanned environment; and external file links or integrations, which can serve content that never went through the ClamAV check. Each of these needs its own owner and decision. The broader hardening work for self-hosted Rocket.Chat, including rate limits, content security policy and patching, is covered in the Rocket.Chat security hardening guidance for this group, and your scanning plan should be reviewed against it before go-live.

Which settings and components map to which control

This table maps each part of the ClamAV scanning setup to the control it governs and the team that usually owns it. Read it before the build to see which settings sit in the Rocket.Chat app, which sit on the ClamAV host, and which belong to the upload policy your administrators set. Confirm exact field names in your Rocket.Chat and ClamAV versions before you change anything.

ComponentWhat it controlsWho owns it
ClamAV server host and portWhere the ClamAV Integration app sends uploaded files for scanning, entered in the app settingsRocket.Chat administrator
ClamAV daemonReceives scan requests from the app and returns whether a file is clean or infectedInfrastructure or platform team
ClamAV signature databaseHolds the virus definitions the daemon scans against, kept current by the database updaterInfrastructure or platform team
Database updates and private mirrorHow signatures reach the server, including scripted updates and an optional private mirror set with DatabaseMirror in freshclam.confInfrastructure team, with security approval for mirror sources
Rocket.Chat upload flowThe path a file takes from the user's client to the app's scan request, where the upload stops if an infection is detectedRocket.Chat administrator, confirmed in testing
User rejection messageWhat the user sees on web, desktop and mobile when an infected upload does not completeRocket.Chat administrator, verified by test uploads
Admin upload policyAllowed file types, size limits and related upload restrictions that apply alongside the scanSecurity and workspace governance owners
Ownership of ClamAV versionWhich ClamAV LTS line you run and when it reaches end of life, so the server stays supportedInfrastructure team, planned against vendor policy

Security settings for the scanning server and the app

The ClamAV server sits between user uploads and your message store, so its network position, update path, accounts and failure behavior matter as much as the scan itself. The cards below cover the decisions to make and the checks to run before the scanner goes into the upload path.

Restrict the scanner to Rocket.Chat

Place the ClamAV server on a network segment that only the Rocket.Chat servers can reach, on the port you configure for the app. Nothing else should need to query it, and there is no reason for user devices to see it. Confirm the exact host and port the ClamAV Integration app connects to, then test that other hosts are refused. Treat any reachable scanner as part of the attack surface, since it parses untrusted files.

ClamAV app docs

Schedule freshclam signature updates

A scanner with stale signatures misses recent malware, and the app gives no warning that signatures are old. Run freshclam on a schedule, check its exit status and alert when updates stop. Confirm the update interval and the database version your server reports before you rely on it. Keep the update job under configuration management so it survives a rebuild.

Use a private signature mirror

Official CVD downloads are rate-limited by IP address, so a larger fleet of scanners or frequent retries can be refused. Run a private mirror with cvdupdate and point each scanner at it using the DatabaseMirror setting in freshclam.conf. Ask who will run the mirror, how it gets its source updates, and how you will know it has fallen behind.

Private mirror guide

Limit the service account

Run the ClamAV daemon and updater under dedicated, non-login system accounts with write access only to the quarantine or temporary scan directories and the signature database. The Rocket.Chat side should use a separate credential or access path that can submit scans and nothing else. Review both accounts when staff change roles. Record who can edit the app settings in Rocket.Chat, since changing the host or port redirects all uploads.

Log scan and update events

Keep scanner logs for detections, failed scans, update runs and daemon restarts, and forward them to the log platform you already operate. Detection logs help you link a rejected upload to a user and a time, which supports incident review. Decide how long logs are kept and who can read them, since file names can reveal sensitive content. Test that a rejected upload produces a log entry.

Decide what happens when the scanner is down

Before go-live, find out whether the ClamAV Integration app blocks uploads or allows them when the scanner cannot be reached. Your answer determines whether a scanner outage is a usability problem or a security gap. Simulate an outage by stopping the daemon and uploading a test file, then record the result. If uploads are allowed on failure, document that as an accepted risk and set an alert on scanner availability.

Why scanning fails or misses files

This table pairs common symptoms with their likely causes and fixes for ClamAV scanning in Rocket.Chat. Use it when uploads go through unscanned or when every upload is rejected, and check the items marked for confirmation against your own environment before changing settings.

SymptomLikely causeFix
Every upload is rejected or hangsThe app cannot reach the ClamAV server host or port entered in the app settingsConfirm the host and port from the Rocket.Chat server network, test the connection from that host, then correct the app settings
Files are accepted that should be blockedClamAV signatures are outdated or the freshclam update job is not runningCheck the database update date on the ClamAV server and confirm scheduled updates run (verify the update method in your environment)
Signature updates fail on the ClamAV serverOfficial CVD downloads are rate-limited by IP addressRun a private signature mirror with cvdupdate and point freshclam at it using the DatabaseMirror setting (confirm mirror setup against ClamAV's documentation)
ClamAV Integration app is missing or inactiveThe app was not installed from the Marketplace, or the workspace plan or edition does not support itConfirm the app appears in the workspace Marketplace and is enabled; check the Marketplace compatibility table for your workspace type (verify with Rocket.Chat before the build)
Uploads from some clients bypass scanningScanning depends on the app's upload hook, so paths the app does not cover may not be scanned (verify per client and feature)Test each upload path in web, desktop and mobile clients and any integration that posts files, then add restrictions or controls for uncovered paths
Users see no rejection messageThe app notification path differs by client or the upload was not routed through the appRepeat a test upload with the EICAR test file on each client to confirm the user notice appears
Large or unusual files fail without a clear reasonScan timeouts or file size limits on the ClamAV side or in Rocket.Chat upload settings (confirm limits in your environment)Review ClamAV daemon logs and the Rocket.Chat upload size setting together, then adjust one at a time
Server version stops receiving updatesClamAV 1.4 is the latest LTS feature release with an expected end of life of August 15, 2027 (ClamAV end-of-life policy)Plan a ClamAV version upgrade before that date and keep signature updates running until then

Questions buyers ask about ClamAV scanning for Rocket.Chat

What drives the cost of ClamAV scanning for Rocket.Chat?

The cost comes from four parts: the server that runs ClamAV, the signature update path, the testing effort, and staff time for setup and upkeep. ClamAV itself is free to use, so the spend is in infrastructure and labor. Hosting cost depends on your virtualization or cloud platform and how many uploads you expect to scan. A private signature mirror adds a small server and an update job, and ClamAV's documentation describes the mirror setup as a supported option. Ask any partner for a quote that lists each part separately, marks which items are one-time and which recur, and states who pays for each.

How long does ClamAV setup for Rocket.Chat usually take?

Duration depends mostly on how much ClamAV experience your team already has. A team that has run ClamAV or a similar daemon will mostly need to provision the server, confirm network access, install the ClamAV Integration app from the Marketplace, and test rejected uploads across clients. Teams new to ClamAV will also need time to learn the daemon, the database updater and the scheduled update process. Ask for a written timeline that separates server build, Rocket.Chat configuration, and test passes, and confirm it against your own change windows.

What does our organization need to provide for ClamAV scanning?

You need to provide a server or virtual machine that runs ClamAV, network rules that let Rocket.Chat reach the ClamAV host and port, and an administrator account in Rocket.Chat that can install apps and change settings. The ClamAV Integration app requires a running ClamAV server, and the host and port are entered in its settings. You also need outbound access or an internal mirror so the server can receive signature updates. Confirm the server operating system and the update path with your security team before the build starts.

Can an internal team set up ClamAV scanning on its own?

Yes, a team with Linux server administration and Rocket.Chat administration skills can usually do this without an outside partner. The work is bounded: build the ClamAV host, configure the updater, install the Marketplace app, point it at the server, and test. The harder parts are sustained operations, such as watching update health, planning maintenance windows and testing after each Rocket.Chat upgrade. Decide early who owns those tasks, and whether the team has time for them alongside its normal workload.

Is ClamAV free to use and what license does it carry?

ClamAV is licensed under the GNU General Public License, version 2, and its documentation states that it is brought to you by Cisco Systems, Inc. Using it does not carry a license fee, but your legal or procurement team should review the GPL obligations that apply to how you distribute or modify it. The Rocket.Chat ClamAV Integration app is a separate component, so check its license terms in the Marketplace listing before you deploy it. Confirm your interpretation with counsel.

How long is ClamAV 1.4 supported?

ClamAV 1.4 is the latest LTS feature release, with an expected end of life of August 15, 2027. ClamAV's policy states that LTS feature releases receive support for at least three years from initial publication, with signature access for one more year. Plan an upgrade to a later supported release before that date, and check the ClamAV end-of-life policy for the current version list when you start the project, since newer releases may have been published after this page was written.

How does ClamAV scanning change after Rocket.Chat or ClamAV upgrades?

Rocket.Chat releases are supported for 6 months for standard versions and 12 months for LTS versions, and unsupported versions can lose connectivity to the official mobile and desktop clients. After each Rocket.Chat upgrade, retest that the ClamAV Integration app still loads, still connects to your server, and still rejects an infected test file in web, desktop and mobile clients. Separately, plan ClamAV server upgrades before its end-of-life date and confirm signature updates keep running throughout.

How DeployOpen scopes and delivers ClamAV scanning

DeployOpen is a Chainscore Labs company that plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure, including cloud accounts, data centers and air-gapped networks. For ClamAV scanning, that means the ClamAV server, the Rocket.Chat ClamAV Integration app configuration, the network path between Rocket.Chat and the scanner, and the upload policy all sit in your environment and under your change control. Most engagements are fixed-scope, so the boundaries are agreed in writing before work starts: which Rocket.Chat workspace and clients are covered, whether the ClamAV server is new or existing, how signature updates will reach the server, and which file types and size limits the policy must address. The written scope also names the deliverables and acceptance checks, which lets your security and compliance teams review the agreed design before anything reaches production.

Verification is where the scope becomes testable. DeployOpen uses EICAR-style test files, which are harmless strings that scanners are designed to flag, to confirm that an upload is rejected, that the user receives the notification on web, desktop and mobile, and that the event is handled the way your policy requires. The same review covers the upload policy around the scanner, including file size limits, allowed types and who may upload, so that scanning is not treated as a substitute for those controls. Because signatures and Rocket.Chat releases both change, retainers for upgrades and continuous testing are available as an optional follow-on. They cover re-running the scan tests after a ClamAV or Rocket.Chat upgrade and reviewing the signature update path. Ask any provider to state in the quote what is one-time and what recurs.

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.