Skip to content

Self-hosted domain expiration monitoring

Supadomain keeps a ledger of your domains and the day each one runs out. It reads every expiry date over RDAP and checks the ledger once an hour. When a domain crosses its alert threshold, your Slack channel gets a message. It is open source and runs on your own server with your own MongoDB.

Ledger for04 Jan 2027
+0d
  • example.net
    16 Jan 2027Warning
    12d leftnotify days: 7, 1
  • example.org
    07 Feb 2027Healthy
    34d leftnotify days: 30, 7, 1
  • my-shop.example
    21 Feb 2027Healthy
    48d leftnotifications disabled
  • example.com
    04 Aug 2027Healthy
    212d leftnotify days: 30, 7, 1
  • legacy.example
    N/AUnknown
    no expiration event in the RDAP reply
    N/Anotify days: 30, 7, 1

The dark notch is the threshold that sends the alert. Lighter notches are the other thresholds set on that domain.

Illustration with made-up domains. The check is the one in server/plugins/cron.ts, run once per ledger day here and once an hour in the app. The message text and the orange bar are what slack.ts sends. Each domain alerts once, at its largest threshold. How alerts fire.

From a registry date to a Slack message

Four things happen between adding a domain and hearing about it. Nothing here leaves your server except the RDAP lookup and the Slack webhook call.

  1. When you add a domain

    One RDAP lookup

    The server requests https://rdap.org/domain/example.org. rdap.org redirects to the RDAP server of the domain's registry, which answers in JSON. If the lookup fails, the domain is not added. There is no WHOIS fallback.

  2. Stored in MongoDB

    Four dates and the nameservers

    Supadomain keeps these RDAP events, plus each nameserver's ldhName.

    RDAP eventActionStored field
    expirationexpireTime
    registrationregistrationDate
    last changedlastUpdate
    last update of RDAP databaselastUpdatedInRdap
  3. Every hour, at minute 0

    The stored date meets the thresholds

    The hourly job reads from the database only. It does not call RDAP again, so press Refresh on a domain after you renew it. This is the check, from server/plugins/cron.ts:

    const diffMs = new Date(domain.expireTime as Date).getTime() - now.getTime();
    const diffDays = diffMs / (1000 * 60 * 60 * 24);
    
    const thresholds = (domain.notifyDaysBefore ?? [30, 7, 1]).slice().sort((a, b) => b - a);
    const triggeredThreshold = thresholds.find(t => diffDays <= t);
    
    if (triggeredThreshold !== undefined && domain.lastNotifiedDays !== triggeredThreshold) {
        const daysLeft = Math.floor(diffDays);
        const label = daysLeft < 0
            ? `${Math.abs(daysLeft)} days since expiration`
            : `${daysLeft} days until expiration`;
    
        await sendSlackNotification(domain.url, label);
  4. At the threshold

    One message to your webhook

    Slack receives the domain name and a line such as 29 days until expiration. The dashboard's activity list records that the alert went out. Set up Slack alerts.

How the dashboard reads a date

Every domain gets one of five statuses. The limits are fixed in the app and match the colours in the ledger above.

  • HealthyMore than 30 days left
  • Warning30 days or fewer
  • Critical7 days or fewer
  • ExpiredThe date has passed
  • UnknownNo expiry date stored
Supadomain dashboard with status counts, the domains expiring soonest and recent activity
The dashboard, as shown in the repository's README.

Run it on your own server

You need Node.js 18 or later and a MongoDB instance. The first start against an empty database creates the admin account from ADMIN_EMAIL and ADMIN_PASSWORD. Leave the password out and a random one is printed to the server log.

shell
git clone https://github.com/halitsever/supadomain.git
cd supadomain
npm install
cp .env.example .env

npm run build
node .output/server/index.mjs
.env
MONGODB_URI="mongodb://localhost:27017/supadomain"
NUXT_SESSION_PASSWORD="a-long-random-secret-min-32-chars"
ADMIN_EMAIL="admin@example.com"
ADMIN_PASSWORD="your-secure-password"

What it leaves out

Supadomain is small on purpose. Knowing its limits up front saves you from finding them on the day a domain lapses.

No WHOIS fallback
A domain whose registry has no RDAP service cannot be added. RDAP vs WHOIS explains why and how to test a domain first.
No automatic re-lookup
The stored expiry date changes only when you press Refresh on the domain's page. Do that after each renewal.
Slack only
Alerts go to one Slack incoming webhook. There is no email or SMS channel.
One admin account
The app seeds a single login from your environment. It has no sign-up page and no user management.

New to this? Read how to monitor domain expiration for the manual options and where a self-hosted monitor fits.

Released under the MIT License.