Static configuration¶
Most of the settings can be modified from the /admin page.
There are other settings located in the .env file that you can configure.
Many of the external-integration settings below (SMTP, Slack, MISP, TheHive, Citadel, CyberWatch feeds, LLM providers) can also be viewed, overridden, and tested live from the Connectors page, without editing the .env file.
Production Settings [Important]¶
In production please put DJANGO_DEBUG environment variable to False in the .env file:
DJANGO_DEBUG=False
Also, the Django secret key must be a large random value and it must be kept secret.
There is one by default but consider to change it in the .env file:
DJANGO_SECRET_KEY=[large random value]
Time Zone settings in the .env file:
# Time Zone
TZ=Europe/Paris
If you have modified some of these parameters, don't forget to restart all containers:
docker compose down
docker compose up
Access Watcher remotely within your server instance¶
In case of "Bad Request" Error when accessing Watcher web interface, fill ALLOWED_HOSTS variable (in .env file) with your Watcher Server Instance IP / or your FQDN.
It is limited to a single IP address / single FQDN.
Please use this syntax:
ALLOWED_HOSTS=X.X.X.X or ALLOWED_HOSTS=mywebsite.com
Now, you can restart your instance and the parameters will be taken into account:
docker compose down
docker compose up
MISP Settings¶
If you want to use MISP export, please fill the IP of your MISP instance and an API key.
In the .env file:
# MISP Setup
MISP_URL=
MISP_VERIFY_SSL=False
MISP_KEY=
Now, you can restart your instance and the parameters will be taken into account:
docker compose down
docker compose up
LDAP Settings¶
You can configure an LDAP authentication within Watcher:
In the .env file:
# LDAP Setup
AUTH_LDAP_SERVER_URI=
AUTH_LDAP_BIND_DN=
AUTH_LDAP_BIND_PASSWORD=
AUTH_LDAP_BASE_DN=
AUTH_LDAP_FILTER=(uid=%(user)s)
Now, you can restart your instance and the parameters will be taken into account:
docker compose down
docker compose up
SSO / OpenID Connect Settings¶
Watcher supports federated login via any OpenID Connect (OIDC) provider (Keycloak, Azure AD...)
The login page behaviour is controlled by a single variable LOGIN_MODE:
| Value | Effect |
|---|---|
form_only |
Username / password form only - default |
sso_only |
SSO button only, the credential form is hidden |
both |
SSO button and the credential form are both shown |
In the .env file:
# SSO / OIDC Setup
# Controls the login page: form_only | sso_only | both
LOGIN_MODE=form_only
OIDC_COMPANY_NAME=
# Required when LOGIN_MODE is 'sso_only' or 'both'
OIDC_RP_CLIENT_ID=
OIDC_RP_CLIENT_SECRET=
OIDC_OP_AUTHORIZATION_ENDPOINT=
OIDC_OP_TOKEN_ENDPOINT=
OIDC_OP_USER_ENDPOINT=
OIDC_OP_JWKS_ENDPOINT=
OIDC_OP_ISSUER=
# Optional - set to False to only allow SSO login for pre-existing users (default: True)
OIDC_CREATE_USER=True
Set LOGIN_MODE=sso_only (or both) and fill in the OIDC credentials to activate the SSO login button and the OIDC routes.
OIDC_COMPANY_NAME is optional - when set it is displayed on the SSO button (e.g. Sign in with Acme Corp).
OIDC_CREATE_USER controls whether a new local account is automatically created the first time someone logs in via SSO. Set it to False to require an admin to create the account first - unrecognized SSO users are then redirected back to the login page instead of being auto-provisioned.
The callback URL to register with your identity provider is:
https://<your-domain>/api/auth/oidc/callback/
Now, you can restart your instance and the parameters will be taken into account:
docker compose down
docker compose up
CyberWatch Settings¶
Configure the external threat intelligence feed endpoints used by the CyberWatch module. All variables have working defaults and can be left unset.
In the .env file:
# CyberWatch Setup
CYBER_WATCH_CVE_API_URL=https://cve.circl.lu/api/last
# Suspicious (phishing analysis, read only): leave the address empty to switch it off
SUSPICIOUS_URL=
SUSPICIOUS_API_KEY=
SUSPICIOUS_VERIFY_SSL=True
# CISA KEV (vulnerabilities exploited in the wild) and FIRST EPSS (probability of exploitation): two connectors, with their
# own Test button in Connectors. Leave the address empty to switch one off.
CYBER_WATCH_KEV_URL=https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json
CYBER_WATCH_EPSS_API_URL=https://api.first.org/data/v1/epss
# Days the CVEs and the ransomware victims are kept (0 keeps everything); a nightly job removes the older ones,
# except the CVEs exploited in the wild and what a watch rule matched
CYBER_WATCH_CVE_RETENTION_DAYS=365
CYBER_WATCH_VICTIM_RETENTION_DAYS=365
CYBER_WATCH_RANSOMWARE_GROUPS_URL=
CYBER_WATCH_RANSOMWARE_VICTIMS_URL=
CYBER_WATCH_RANSOMLOOK_GROUPS_URL=
CYBER_WATCH_RANSOMLOOK_RECENT_URL=
CYBER_WATCH_RANSOMLOOK_ACTORS_URL=
Now, you can restart your instance and the parameters will be taken into account:
docker compose down
docker compose up
LLM Settings¶
The AI features (breaking news, keyword summaries and the weekly report) use the LLM selected as Default AI on the Connectors page. API keys, models and base URLs of the supported providers (OpenAI, Anthropic, Gemini, Ollama) can be set there, or in the .env file.
The model name must start with the LiteLLM provider prefix of the provider it targets: openai/, anthropic/, gemini/ or ollama/ (e.g. gemini/gemini-2.5-flash).
To use another endpoint (an internal LLM platform, for instance), fill the Generic LLM Provider variables. Prefix its model with the provider that matches the API format of the endpoint: openai/ for an OpenAI-compatible API, mistral/ for a Mistral API, and so on. Its base URL must be complete, including the version path when the API requires it (e.g. https://llm.example.com/v1).
Leave the base URL of OpenAI, Anthropic and Gemini empty to use the official API URL known by LiteLLM. Set it only to go through a proxy or a custom endpoint.
Important: Configuring a provider is not enough. Once its connector is set up, select it as Default AI on the Connectors page. As long as no Default AI is selected, every summary is written by the local AI (the
llmcontainer).
The TLS certificates of the LLM endpoints are verified by default: the API keys go to them. Set LITELLM_VERIFY_SSL=False only for an endpoint with a self-signed certificate, or point CA_PATH to the certificate of its authority.
In the .env file:
# OpenAI (optional)
OPENAI_API_KEY=
OPENAI_MODEL=
OPENAI_BASE_URL=
# Anthropic (optional)
ANTHROPIC_API_KEY=
ANTHROPIC_MODEL=
ANTHROPIC_BASE_URL=
# Gemini (optional)
GEMINI_API_KEY=
GEMINI_MODEL=
GEMINI_BASE_URL=
# Ollama (optional)
OLLAMA_API_KEY=
OLLAMA_MODEL=
OLLAMA_API_URL=
# Generic LLM Provider (optional)
GENERIC_LLM_URL=
GENERIC_LLM_KEY=
GENERIC_LLM_MODEL=
# TLS certificate verification for LLM endpoints (default: True)
LITELLM_VERIFY_SSL=True
Now, you can restart your instance and the parameters will be taken into account:
docker compose down
docker compose up
Local Models and Load¶
Threats Watcher reads the title of every article with a small entity model (dslim/bert-base-NER) every 30 minutes, and the llm container (llama.cpp with Qwen2.5-0.5B) writes the summaries when no AI connector answers. The entity model is in the Watcher image. The llm container downloads its model (about 500 MB) from Hugging Face at its first start, with nothing to set. Until it is ready, the breaking news and the weekly report use a template, and Watcher writes them again afterwards. In the .env file:
# 1: never reach Hugging Face (an instance without Internet access). Commented: a model that is not in the image is downloaded
# HF_HUB_OFFLINE=1
# Computing threads the entity model may use while it reads the titles (0: no limit, every core)
NER_TORCH_THREADS=2
- A title is given to the model once: its entities are kept in memory, so an article that stays in a feed for days is not read again at each run. Only the new ones are.
- The end line of the job says what it did:
titles(looked at),titles_analyzed(given to the model),titles_cached(already known), andner_unavailablewhen the model could not be loaded (the words of the run are then not counted). - The jobs that run every 15 or 30 minutes start on their own minute (3, 6, 9, 11, 2...) instead of all on the same second, and the model uses at most
NER_TORCH_THREADScores: the web interface stays responsive while a run is under way. - To build a smaller image that downloads the models at their first use:
docker build --build-arg PRELOAD_HF_MODELS=false . - Another model for the local AI: set
LOCAL_LLM_HF_REPO=<user>/<repository>:<quantisation>in the.envthat Compose reads (deployment/.envwithmake), thendocker compose up -d llm. It takes any GGUF model of Hugging Face; check that the quantisation exists in the Files tab of the repository. Qwen2.5-0.5B is used when it is not set. A bigger model needs more memory than the 2 GB of the container: setLOCAL_LLM_MEMORY=4gfor 1.5 billion parameters. On Kubernetes:llm.modelandllm.resources.
Configurable Help Button¶
The header help quick-link is configurable via environment variables:
# Help button
WATCHER_HELP_BUTTON_LABEL=API Docs
WATCHER_HELP_BUTTON_URL=/api/docs/
WATCHER_DOCS_URL=https://thalesgroup-cert.github.io/Watcher/
WATCHER_SUPPORT_EMAIL=
Data Retention¶
Some tables only grow if nothing removes the oldest rows. A nightly job of each module does it; 0 keeps everything. In the .env file:
# Cyber Watch (03:30): the CVEs and the ransomware victims older than this go,
# except the CVEs exploited in the wild and what a watch rule matched
CYBER_WATCH_CVE_RETENTION_DAYS=365
CYBER_WATCH_VICTIM_RETENTION_DAYS=365
# AI summaries (03:50): one is added at each Regenerate. The latest summary of each kind (weekly report,
# breaking news, each word) is always kept
SUMMARY_RETENTION_DAYS=90
# Activity journal (03:50): the lines of the Timeline and of the "History" of each object
TIMELINE_RETENTION_DAYS=365
To see what a purge would remove before it runs (for example before updating an instance that has never been cleaned), run the command with --dry-run; without it, the command does what the night job does:
docker compose exec watcher python manage.py purge_cyber_watch --dry-run
docker compose exec watcher python manage.py purge_history --dry-run
Logs and Web Server¶
Watcher is served by Gunicorn with one worker and 16 threads, on purpose: the scheduled jobs run inside the web process, so a second worker would run every job (and send every notification) twice. GUNICORN_THREADS, GUNICORN_TIMEOUT and GUNICORN_LOG_LEVEL tune it; do not raise the number of workers.
Three logs are kept apart:
- Application log (what Watcher detects, schedules and sends): console and
logs/<module>.log. Each scheduled job ends with aCRON TASK doneline and each notification with aNotification …: slack=ok, email=no recipientsline.TRACE_LEVELsets the level (INFOby default). - Access log (who did what):
logs/access.log, one line per request with the user, the address, the method, the path, the status and the duration.ACCESS_LOG_CONSOLE=1also prints it on the console. - Server log: Gunicorn's own messages, on the console, prefixed
gunicorn:.
Encryption Key of the Connectors¶
The credentials of the connectors saved in the interface are encrypted in the database with the key CONNECTORS_ENCRYPTION_KEY (a Fernet key). When it is empty, a key built into the code is used, which every installation shares: set your own before saving credentials:
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
Changing the key later makes the credentials already saved unreadable: they have to be entered again.
Corporate Proxy / Custom CA Certificates¶
If Watcher runs behind a corporate proxy that intercepts or re-signs HTTPS traffic (SSL/TLS inspection), or must trust an internal Certificate Authority for internal services, drop the CA certificate(s) in deployment/certificates/ alongside the existing rootcafile.pem.
The watcher container merges every CA mounted there with the system's public trust store at startup, via the standard update-ca-certificates tool, into /etc/ssl/certs/ca-certificates.crt — the file REQUESTS_CA_BUNDLE points to. This extends the trust store instead of replacing it, so public HTTPS endpoints (RSS feeds, CVE APIs, ransomware.live...) keep working alongside your internal ones.
See deployment/README.md for the exact compose_apps.yaml volume configuration and how to mount more than one CA file.