How To Install ClamAV On An Ubuntu Server As A Standalone ClamAV Server

ClamAV

Anyone who has ever had to work with an antivirus will agree to the fact that they eat up a lot of resources (read that as CPU)

Same is the case with ClamAV

But we can however increase the size of our boxes (EC2 instances in case of AWS) to compensate for the CPU utilization.

But what if the spikes in CPU causes the functionality of the main app to suffer?

This is a common issue that you will face while setting up a NextCloud installation with ClamAV integrated.

Though there is a feature for having external servers, there is not much documentation about it.

Here are the steps that I did to set it up and running. I would be assuming here that you are using an AWS EC2 instance for the purpose of your client and server side. But the steps can be done on whatever platform you wish to use.

Server Side Configurations

2. You can then check the status of clamav by replacing enable with status in the last command

3. You’ll then need to add the following to /etc/clamav/clamd.conf

TCPSocket 3310 //you can use whatever port you want to use

4. Whitelist the port from the IP range (VPC in case of AWS) of your client machines

Client Side Configurations

2. You then need to add the following to /etc/clamav/clamd.conf

TCPSocket 3310 //your clamAV port
TCPAddr <private ip of the server>

DevOps | Creator | Learner