Docker deployment of the crt.sh ecosystem for Certificate Transparency (CT) certificate search and monitoring.
It includes a PostgreSQL 18 database with the libx509pq (C), libocsppq and
libzlintpq (Go via plgo) extensions and the certwatch schema, plus the
ct_monitor, crl_monitor, ocsp_monitor, cert_processor daemons and the
crtsh-web search frontend.
- Docker with Docker Compose.
- Free ports:
5432(postgres),8880/8881(crtsh-web). - Internet access during the build (clones of the upstream repos and download of the Go toolchain).
docker compose up --build -dThis brings up six containers:
| Service | Container | Purpose |
|---|---|---|
| postgres | crtsh-postgres |
PostgreSQL 18 + extensions + certwatch schema + ct_log seed |
| ct_monitor | crtsh-ct-monitor |
Ingests certificates from the CT logs (table ct_log) |
| crl_monitor | crtsh-crl-monitor |
Verifies the discovered CRLs |
| ocsp_monitor | crtsh-ocsp-monitor |
Verifies the discovered OCSP responders |
| cert_processor | crtsh-cert-processor |
Discovers CDP/OCSP/AIA URLs (feeds crl/ocsp_monitor) and maintains the CA counters |
| crtsh-web | crtsh-frontend |
Certificate search frontend |
- The database grows fast, reaching several gigabytes quickly.
ct_monitoringests every certificate from the active CT logs (each log contains millions of certificates), andcert_processorthen populates the CRL/OCSP tables and the CA counters. Plan for sufficient disk space (start with at least ~20-50 GB free) and be aware that thepostgres_datavolume keeps growing as long as the monitors run. - The data starts being built from the moment the stack first runs. This deployment only records certificates as they are ingested from the CT logs from that point onward (plus the backfill of the log ranges still active). It does not contain historical certificates issued before your first start. If you need older data, you must start the ingestion earlier or source it externally.
# Containers are up
docker ps
# Installed extensions
docker exec crtsh-postgres psql -U certwatch -d certwatch -c '\dx'
# The certificate table grows with ct_monitor ingestion
docker exec crtsh-postgres psql -U certwatch -d certwatch -c 'SELECT count(*) FROM certificate;'
# ct_monitor ingesting (batches of "Records written")
docker logs -f crtsh-ct-monitor
# cert_processor doing the backfill (batches of "Certificates Processed")
docker logs -f crtsh-cert-processor
# Web: certificate search
curl -s http://localhost:8880/ # homepage
curl -s "http://localhost:8880/?q=example.com"-
Credentials: configured via environment. The postgres password is set with
POSTGRES_PASSWORD(defaultcertwatch_pass) and propagated to the monitors andcert_processor. Example:export POSTGRES_PASSWORD=change_me docker compose up --build -d -
Monitor configs (mounted as read-only volumes):
ct_monitor/config.yamlcrl_monitor/crl_monitor.tomlocsp_monitor/ocsp_monitor.tomlcert_processor/config.yaml
ct_monitor reads the log list from the ct_log table. The initial seed is
generated and installed automatically on the first postgres start
(db/init/20_seed_ct_logs.sql). To regenerate it:
python scripts/generate_ct_log_seed.py --active-patterns "Argon2026h2,Xenon2026h2"The generated file overwrites db/init/20_seed_ct_logs.sql. Adding a new log
in the future amounts to an INSERT in that table (ct_monitor re-syncs every
getSTHFrequency).
While ct_monitor ingests at high volume, keep the statistics fresh so the
planner uses the GIN identities() indexes for full-text search:
VACUUM ANALYZE certificate;If full-text search becomes slow after heavy ingestion, run
VACUUM ANALYZE certificate;(and, if needed,REINDEXduring a low activity window) against thecertificatepartitions.
- This deployment covers monitoring and search of CT certificates, the same purpose as https://crt.sh.
ctsubmit(submitting chains to CT logs to collect SCTs) andctlint(CT compliance auditing) are out of scope: they are independent services/CLIs that do not belong to the monitoring/search loop over thecertwatchdatabase.- Full signature verification of CRLs/OCSP per issuer requires issuer
identification (the
find_issuerjob), which is out of scope here.
This repository (and the components it deploys, upstream crt.sh by Sectigo)
is distributed under the GNU General Public License v3.0. See
LICENSE.md.