Keywords: clamdoc

Next: Closest mirrors Up: Configuration Previous: Testing Contents

## Setting up auto-updating

`freshclam` is the automatic database update tool for Clam AntiVirus. It can work in two modes:

- interactive - on demand from command line
- daemon - silently in the background

`freshclam` is advanced tool: it supports scripted updates (instead of transferring the whole CVD file at each update it only transfers the differences between the latest and the current database via a special script), database version checks through DNS, proxy servers (with authentication), digital signatures and various error scenarios. Quick test: run freshclam (as superuser) with no parameters and check the output. If everything is OK you may create the log file in /var/log (owned by clamav or another user `freshclam` will be running as):

    	# touch /var/log/freshclam.log
    	# chmod 600 /var/log/freshclam.log
    	# chown clamav /var/log/freshclam.log

Now you should edit the configuration file `freshclam.conf` and point the UpdateLogFile directive to the log file. Finally, to run `freshclam` in the daemon mode, execute:

    	# freshclam -d

The other way is to use the cron daemon. You have to add the following line to the crontab of root or clamav user:

    N * * * *	/usr/local/bin/freshclam --quiet

to check for a new database every hour. N should be a number between 3 and 57 of your choice. Please don't choose any multiple of 10, because there are already too many clients using those time slots. Proxy settings are only configurable via the configuration file and `freshclam` will require strict permission settings for the config file when `HTTPProxyPassword` is turned on.

    	HTTPProxyServer myproxyserver.com
    	HTTPProxyPort 1234
    	HTTPProxyUsername myusername
    	HTTPProxyPassword mypass

Subsections

- Closest mirrors

Next: Closest mirrors Up: Configuration Previous: Testing Contents