Get an alert before your SSL certificate expires
A daily OpenSSL check can warn your phone through PushPiper 14 days before an SSL certificate expires, free for 10,000 messages a month. Uptime monitors can do the same: StatusCake's free plan includes 1 SSL test. Priority 1 alerts ignore PushPiper's quiet hours.
Check certificate expiry with OpenSSL and cron
A short shell script is the most direct way to check a remote certificate without installing extra monitoring stacks. The script below connects to your domain over port 443 with openssl s_client, extracts the validity timestamp with openssl x509 -enddate, and calculates how many days remain using the Linux date utility.
If the certificate expires in fewer than 14 days, the script issues a POST request to PushPiper. It also handles edge cases: if network failure, bad DNS, or an invalid handshake prevents OpenSSL from reading the certificate, the script immediately alerts you that the domain could not be checked.
#!/usr/bin/env bash
host="$1"
warn_days="${2:-14}"
end=$(echo | openssl s_client -servername "$host" -connect "$host:443" 2>/dev/null |
openssl x509 -noout -enddate 2>/dev/null | cut -d= -f2)
if [ -z "$end" ]; then
message="Could not read the certificate for $host"
else
days_left=$(( ($(date -d "$end" +%s) - $(date +%s)) / 86400 ))
[ "$days_left" -ge "$warn_days" ] && exit 0
message="$host expires in $days_left days ($end)"
fi
curl -s -o /dev/null https://api.pushpiper.com/1/messages.json \
--form-string "token=APP_TOKEN" \
--form-string "user=USER_KEY" \
--form-string "title=Certificate check: $host" \
--form-string "message=$message" \
--form-string "priority=1"Before using the script, save it to /usr/local/bin/ssl-expiry.sh and make it executable with chmod +x /usr/local/bin/ssl-expiry.sh. You will need to replace two placeholders in the curl command with your credentials from your PushPiper account:
- Replace
APP_TOKENwith your 30-character application token, which begins with the lettera. - Replace
USER_KEYwith your 30-character user key, which begins with the letteru.
The script sets priority=1, which PushPiper treats as high urgency. Priority 1 notifications produce sound and bypass PushPiper quiet hours on your devices so you do not sleep through a pending expiration.
To run the check automatically, schedule it as a daily cron job. Running it once every morning gives you daily warnings until the certificate is renewed.
0 9 * * * /usr/local/bin/ssl-expiry.sh example.com 14In the cron line, example.com is passed as the first parameter and 14 specifies the warning threshold in days. If you manage multiple domains, add one cron line per host. You can also explore our guide on shell and cron push notifications for other server automation patterns.
Monitor certificate expiration in Gatus
If you already run Gatus for health checks, you can monitor certificate health alongside your HTTP endpoints without running external cron scripts. Gatus includes native certificate tracking that checks the remote expiration timestamp on every poll.
- Open your Gatus YAML configuration file.
- Under your endpoint definition, add a condition that checks
[CERTIFICATE_EXPIRATION]. - Set the condition to require more than 48 hours remaining:
[CERTIFICATE_EXPIRATION] > 48h. - Configure an alerting provider using
alerting.custompointing tohttps://api.pushpiper.com/1/messages.json.
Because the built-in Pushover provider inside Gatus is hardcoded to api.pushover.net, you must configure Gatus using its custom alerting provider to target PushPiper. The custom provider gives you complete control over headers, request payload formatting, and placeholder values like [ENDPOINT_NAME] or [ALERT_DESCRIPTION]. For step-by-step endpoint snippets, view our complete Gatus push notifications guide.
Configure expiry alerts in Uptime Kuma
Uptime Kuma is a self-hosted monitoring tool that includes built-in certificate tracking on all HTTPS monitors. Instead of configuring separate calculation formulas, you enable tracking directly from the web interface.
- Create or edit an HTTPS monitor in Uptime Kuma.
- Tick the certificate expiry notification option on the monitor.
- Configure Uptime Kuma to send notifications through PushPiper.
PushPiper uses Pushover-compatible API parameters, so you can point Uptime Kuma notification integrations directly at https://api.pushpiper.com/1/messages.json. For detailed webhook and token setup instructions, read our Uptime Kuma integration guide.
Use StatusCake for hosted certificate checks
If you prefer not to host your own monitoring tools or maintain cron scripts on a server, external monitoring platforms offer hosted checks. StatusCake includes SSL monitoring directly within its free tier.
The StatusCake Free plan includes:
- 1 SSL test
- 10 uptime tests at 5-minute intervals
- 1 page-speed test
- 1 domain test
Because the free tier includes only 1 SSL test, StatusCake works well if you have a single primary domain to watch. When monitoring dozens of distinct hostnames or internal microservices, self-hosting Uptime Kuma or deploying our OpenSSL cron script across your fleet lets you check unlimited hosts at no extra cost. If you need external ping checks to watch your servers from the outside, you can also review free uptime monitoring tools compared.
Comparing SSL monitoring methods
The table below compares the setup complexity and ongoing costs of each SSL certificate monitoring method alongside PushPiper notification delivery.
| Method | Setup | Cost |
|---|---|---|
| openssl script and cron | Copy the script, add a cron line | Free |
| Gatus | One condition per endpoint | Free, self-hosted |
| Uptime Kuma | Tick certificate expiry on HTTPS monitors | Free, self-hosted |
| StatusCake | 1 SSL test on free | Free |
| PushPiper delivery | App token and user key | Free for 10,000 messages a month |
All of these monitoring approaches can deliver warnings to your phone through PushPiper. You can sign up using Google on the PushPiper app without a credit card. PushPiper installs straight from the browser on Android, Windows, macOS, and Linux. On an iPhone or iPad running iOS 16.4 or later, open the web app in Safari, tap Share, and tap Add to Home Screen.
Sources
Questions and answers
Does PushPiper offer a native mobile app in the App Store or Google Play?
PushPiper does not offer native App Store or Google Play apps yet. It installs as a Web Push application directly from your browser on desktop and mobile devices, including Safari on iOS 16.4 or newer.
Can PushPiper emergency alerts wake me up during iOS Do Not Disturb?
PushPiper priority 1 messages bypass PushPiper's own quiet hours setting, but no PushPiper notification priority can break through iOS Do Not Disturb or Focus modes. Emergency priority 2 alerts repeat every retry seconds (at least 30 seconds) until someone acknowledges them, they expire (at most 10,800 seconds, or 3 hours), or they reach 50 repeats, and they still follow device-level Focus restrictions.
What happens when my PushPiper account reaches its monthly message quota?
When you exhaust your monthly message allocation, the PushPiper API rejects subsequent incoming requests with an HTTP 429 status code. Monthly quotas reset automatically on the 1st day of each month at 00:00 UTC, or you can purchase optional message packs priced at EUR 20 per 10,000 extra messages.
Can I monitor internal certificates that are not accessible from the public internet?
The OpenSSL bash script, Gatus, and Uptime Kuma run locally inside your network or server environment, so they can verify internal certificates on private hostnames and IP addresses. StatusCake requires public internet access to reach the target domain.
Free for 10,000 messages a month
Sign in with Google and send your first ping in a minute.