diff --git a/README.md b/README.md index 71b23c2..3fabf96 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ OpenCloud Compose offers a modular approach to deploying OpenCloud with several - **Full text search** with Apache Tika for content extraction and metadata analysis - **Monitoring** with metrics endpoints for observability and performance monitoring - **Radicale** integration for Calendar and Contacts +- **ClamAV** antivirus scanning with ClamAV ## Quick Start Guide @@ -240,6 +241,25 @@ This exposes the necessary ports: If you're using **Nginx Proxy Manager (NPM)**, you **should NOT** activate **"Block Common Exploits"** for the Proxy Host. Otherwise, the desktop app authentication will return **error 403 Forbidden**. +### ClamAV anti-virus + +Enable anti-virus scans for uploaded files. + +Using `-f` flags: +```bash +docker compose -f docker-compose.yml -f antivirus/clamav.yml -f traefik/opencloud.yml up -d +``` + +Or by setting in `.env`: +``` +COMPOSE_FILE=docker-compose.yml:antivirus/clamav.yml:traefik/opencloud.yml +``` + +**Important:** adjust the variable in `.env` to start the antivirus service. Add additional services separated by comma, e.g. `notifications,antivirus`: +``` +START_ADDITIONAL_SERVICES="antivirus" +``` + ## SSL Certificate Support diff --git a/antivirus/clamav.yml b/antivirus/clamav.yml new file mode 100644 index 0000000..5ed756a --- /dev/null +++ b/antivirus/clamav.yml @@ -0,0 +1,43 @@ +--- +services: + opencloud: + environment: + POSTPROCESSING_STEPS: "virusscan" + STORAGE_USERS_DATA_GATEWAY_URL: "http://opencloud:9200/data" + ANTIVIRUS_MAX_SCAN_SIZE: ${ANTIVIRUS_MAX_SCAN_SIZE:-100MB} + ANTIVIRUS_INFECTED_FILE_HANDLING: abort + ANTIVIRUS_MAX_SCAN_SIZE_MODE: ${ANTIVIRUS_MAX_SCAN_SIZE_MODE:-partial} + ANTIVIRUS_WORKERS: 1 + ANTIVIRUS_CLAMAV_SOCKET: /var/run/clamav/clamd.sock + ANTIVIRUS_SCANNER_TYPE: clamav + volumes: + - clamav-socket:/var/run/clamav + clamav: + image: clamav/clamav:${CLAMAV_DOCKER_TAG:-latest} + networks: + opencloud-net: + volumes: + - clamav-socket:/tmp + - clamav-db:/var/lib/clamav + logging: + driver: ${LOG_DRIVER:-local} + restart: always +volumes: + clamav-db: + clamav-socket: + + + + + + + + + + + + + + + +