Legacy Knowledge Base
Published Jun. 30, 2025

How to set up antivirus scanning of files uploaded to Liferay Documents & Media in Liferay PaaS

Written By

Michael Wall

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

Issue

  • Customers who aren't familiar with Docker can't easily setup ClamAV in Liferay PaaS.
  • How to setup ClamAV in Liferay PaaS to antivirus scan files uploaded to Liferay Documents & Media.

Environment

  • Liferay PaaS

Resolution

  1. Contact your sales representative:
    • "Customers who wish to enable the use custom services on their Liferay Cloud environments must first contact their sales representative in order to enable this functionality and ensure that their environments are provisioned accordingly."
    • Ensure that sufficient resources are available (i.e. memory and CPU) for the custom service to run. Check with the sales representative if unsure of the quotas available.
  2. Add the Custom Service definition in the Liferay PaaS Liferay Workspace repository. Create a new folder called antivirus in the root of the repository (at the same level as the other service folders) and within it upload the attached LCP.json file.
  3. Add the following portal property (either in a properties file in the Liferay PaaS Liferay Workspace repository or as an Environment variable within the environments Liferay service (using the appropriate naming syntax): dl.store.antivirus.enabled=true
  4. Deploy the newly created build that contains the changes above to the target environment and verify that all of the services start as expected.
  5. Login as an Omni Administrator and go to Control Panel > System Settings > Security > Antivirus > Antivirus Clamd Scanner, enter the hostname as antivirus and Save. (This assumes the service name is antivirus and the service is using the default port of 3310.)
  6. Test that files can be uploaded successfully and review the Liferay DXP service logs etc.

NOTE: Liferay Support does not recommend or endorse specific third-party products over others. The information provided about products not created by Liferay is for reference purposes only, and any implementation of these principles will be at your team's discretion.

 

Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base