Lightweight zero-config SSL/TLS certificate expiry checker with automated email alerts.
201
A lightweight, standalone Docker tool to monitor SSL/TLS certificate expiration dates for target domains and automatically send email alerts when certificates are nearing expiration or expired.
Docker Hub Image: memanes688/cert-exp-checker:latest
DOMAINS environment variable or volume-mount a domains.txt file.Cloud instances have public PTR/DNS records. The container uses its internal Postfix MTA to send alerts directly:
docker run --rm \
-e EMAIL_TO="[email protected]" \
-e DOMAINS="example.com, google.com, github.com" \
-e ONESHOT=true \
memanes688/cert-exp-checker:latest
For local workstations or home IP networks, pass SMTP credentials to bypass ISP Port 25 blocking:
docker run --rm \
-e EMAIL_TO="[email protected]" \
-e DOMAINS="example.com, google.com" \
-e SMTP_HOST="smtp.gmail.com" \
-e SMTP_PORT=587 \
-e SMTP_USER="[email protected]" \
-e SMTP_PASS="YOUR_16_CHAR_APP_PASSWORD" \
-e ONESHOT=true \
memanes688/cert-exp-checker:latest
version: '3.8'
services:
cert-exp-checker:
image: memanes688/cert-exp-checker:latest
container_name: cert_exp_checker
restart: unless-stopped
environment:
- [email protected]
- DOMAINS=example.com, google.com, github.com
- ALERT_THRESHOLD_DAYS=30
- CHECK_INTERVAL_HOURS=24
volumes:
- ./config/domains.txt:/app/config/domains.txt:ro
Run in background:
docker compose up -d
| Variable | Required | Default | Description |
|---|---|---|---|
EMAIL_TO | Yes | None | Recipient email address for expiration alerts |
DOMAINS | No | None | Comma-separated list of target domains (e.g. example.com, api.site.org:8443) |
DOMAINS_FILE | No | config/domains.txt | Path to file containing target domains (one per line) |
ALERT_THRESHOLD_DAYS | No | 30 | Trigger email alerts if cert expires in $\le N$ days |
CHECK_INTERVAL_HOURS | No | 24 | Hours between automated checks in daemon mode |
ONESHOT | No | false | Set to true to execute check once and exit immediately |
EMAIL_FROM | No | cert-alerts@<host> | Sender email header |
SMTP_HOST | No | Internal Postfix | Custom SMTP server hostname (e.g., smtp.gmail.com) |
SMTP_PORT | No | 25 (587 if host set) | Custom SMTP server port |
SMTP_USER | No | Empty | Custom SMTP username |
SMTP_PASS | No | Empty | Custom SMTP password |
SMTP_USE_TLS | No | true | Enable TLS for custom SMTP |
config/domains.txt)You can create a config/domains.txt file and mount it to /app/config/domains.txt:
# Monitored Domains List
example.com
google.com
github.com
mywebsite.org:8443
Content type
Image
Digest
sha256:f80515998…
Size
86.6 MB
Last updated
about 2 months ago
docker pull memanes688/cert-exp-checker