Skip to content

mrjones-plip/GEA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GEA

Gotify (Domain) Expiration Alerter (GEA) is a docker service that checks if a domain's registration expires in less than N days. If yes, an alert is sent to your Gotify instance.

Additionally, it exposes a web server that serves JSON statuses of any domain being monitored. This is handy for:

  • Uptime Kuma: monitor and alert via existing means when your domain(s) expire
  • Home Assistant: show days until your domain(s) expire

Here's what it looks like to get alerts acknowledging GEA is started in Gotify (top) and showing the logs in Docker (bottom):

gea.png

Wait! Is this a terrible idea for me to deploy?

Maybe!

There's number of existing projects that might meet your needs. Check there first.

Continue on if you want to run a small docker service, only have a few domains to monitor and use Gotify for alerts (and possibly Home Assistant and/or Uptime Kuma).

Install

Prerequisites

  • Domain you want to monitor the expiration of
  • (optional) Gotify instance
  • Docker installed

Install

With a Gotify Instance:

  1. Check out this repo: git clone https://github.com/mrjones-pliop/GEA.git
  2. Copy the exmple.env to .env
  3. Log into your Gotify instance and create a token
  4. Edit .env to have your Gotify URL, Gotify token and domain(s) you want to monitor. Be sure that you update GOTIFY_URL be your Gotify URL and that it is accessible from your docker instance. :
    GOTIFY_URL="http://172.17.0.1:8000"
    GOTIFY_TOKEN="A.T9cF1UxmSU6J9"
    SEND_ALERTS=Yes-please! # delete this line to not send alerts
    MONITOR_DOMAINS="github.com, plip.com"
    WARN_DAYS=10
    PORT=9080
  5. Start docker to begin domain monitoring: docker compose up -d
  6. You should get a confirmation alert that monitoring is set up and when the domain(s) will expire so you know everything is working. As well, on port 9080 of your docker host, there is now a web server running.

Without a Gofity Instance

  1. Check out this repo: git clone https://github.com/mrjones-pliop/GEA.git
  2. Copy the exmple.env to .env
  3. Edit .env to have your domain(s) you want to monitor. Be sure to delete the SEND_ALERTS line so that no Gotify calls are made. You can leave GOTIFY_URL, GOTIFY_TOKEN and WARN_DAYS as is - they will be unused:
    GOTIFY_URL="http://172.17.0.1:8000"
    GOTIFY_TOKEN="A.T9cF1UxmSU6J9"
    MONITOR_DOMAINS="github.com, plip.com"
    WARN_DAYS=10
    PORT=9080
  4. Start docker to begin domain monitoring: docker compose up -d
  5. On port 9080 of your docker host, there is now a web server running.

Web server

After you've called docker compose up -d, a web server starts on port 9080. There's a file per domain in MONITOR_DOMAINS. If you were monitoring github.com you would add on .json to see the results. Here's a call of curl piped to jq to show the results:

curl -qs http://172.17.0.1:9080/github.1485827954.workers.dev.json | jq

The output is:

{
  "date": "2026-10-09 18:20:50",
  "days": 434,
  "domain": "github.com",
  "cached_date": "2025-08-01 16:18:56.393527"
}

Home Assistant

If you run Home Assistant you can have a list of domain expirations that looks like this:

home.assistant.png

I'm not the most savvy HA user, but by referencing their RESTful API docs I was able to cobble together this config which I could then use to add to a dashboard (as shown above):

rest:
  - scan_interval: 3600
    resource: http://172.17.0.1:9080/plip.com.json
    sensor:
      - name: "Plip"
        value_template: "{{ value_json['days'] }}"
        state_class: measurement
        unit_of_measurement: 'days'
  - scan_interval: 3600
    resource: http://172.17.0.1:9080/github.1485827954.workers.dev.json
    sensor:
      - name: "Github"
        value_template: "{{ value_json['days'] }}"
        state_class: measurement
        unit_of_measurement: 'days'

For the resource, be sure to use the URL or IP for where your GEA is running via docker.

Uptime Kuma

If you run Uptime Kuma you can monitor and alert on your domain expirations. Here I've set it to alert to one more day than the domain is valid for (435) so the alert is triggered:

uptime.kuma.png

This done using the JSON values feature. When adding a new monitor, I used these values:

  • Monitor Type: HTTP(s) Json Query
  • URL: http://172.17.0.1:9080/github.1485827954.workers.dev.json - Be sure to use the URL or IP for where your GEA is running via docker. As well, specify the domain you want to alert on - github.com is shown here.
  • Json Query: days.$number()<10 - Set the 10 to be the days remaining in the domain before it sets an alert.
  • Expected Value: false

All other values are OK at their defaults.

Tech stack

This project is really just glue between a few existing solutions. By leveraging actively developed libraries around the whois service, hopefully it will work for a large collection of domains:

Related projects

My partner suggests, "A whole Docker app?! What about just setting a yearly Task reminder in Google - that'll only take 30 seconds to do." This may be the simplest way forward!

Otherwise, I was unable to find an existing docker based service to easily send an alert to Gotify when a domain is expiring. There's a Go based project "domain-monitor" that does 100% of everything I was looking for, but sends email alerts instead of Gotify alerts. If you want email alerts, I suspect this would be the way to go. It looks be very mature having started in 2020 and is on version 1.24 as of now (Jul 2025). I don't know Go, so not easy for me to extend :/

Another good idea might to use Nagios - a gold standard in monitoring.

A very full-featured self-hosted solution is likely DomainMOD which appears to do it all and then some, but is geared towards managing dozens, or more, of domains.

There's some SaaS offerings that appear to do it:

Then there are GH projects I saw but passed over as they're older or too broad scoped :

Existing, similar DIY solutions have you write python and, well, here I am DIYing it for you so you don't have to DIY ;)

About

Gotify (Domain) Expiration Alerter (GEA): docker service that checks for domain registration expiration and sends Gotify alert. Also exposes HTTP server with JSON status of all domains.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors