GoAdmio

expire

Check every hosted domain's registration and hosting expiry dates, store them, and notify by email and WhatsApp when they're close

On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also


Overview

/go/expire checks two separate dates for every hosted account and notifies the customer and the admin channels when either is close:

This command only reports; it does not renew anything. Run it on a schedule (daily, from cron) so customers get advance notice.

The call is appended to /var/log/go/expire.log.


Quick start

/go/expire

Syntax

/go/expire

The command takes no arguments.


Options

None. expire always checks every hosted account.


Output

A line is printed for each domain or account that falls in a notification window:

example.com Domain Expires On 2026-11-28 (8 days left)
example.com Hosting Expires On 2026-11-25 (5 days left)

No summary line is printed if nothing is close to expiring.


Examples

# Run it manually
/go/expire
# Check what's currently stored for a domain
sudo sqlite3 /var/lib/sqlite/site.db \
  "select Domain, DomainExpiresOn, DomainDaysLeft, ExpiresOn, DaysLeft from Site where Domain='example.com'"
# Schedule it daily (see cron for the exact syntax GoAdmio expects)
/go/cron

Troubleshooting

Symptom Likely cause Fix
whois: command not found The whois package isn't installed. Install it with your system's package manager.
DomainExpiresOn is empty and DomainDaysLeft is -1000000 The registry's WHOIS output doesn't use the exact label Registrar Registration Expiration Date, or the domain has WHOIS privacy, or the registry rate-limited the query. Normal for some TLDs and registrars; the domain just won't get an expiry notification.
No domain-expiry notification even though it's close Notifications only go out between 1 and 13 days left (see Windows). Check the stored DomainDaysLeft; outside that window, nothing is sent.
Hosting-expiry notifications keep arriving for an account that expired long ago The hosting check has no lower bound; see Known issues. Renew the account with renew, or remove it.
The customer gets the WhatsApp message twice A known duplicate-send bug; see Known issues. Expected for now.
The email body shows odd characters near "Dear Customer" A known encoding glitch in the hosting-expiry email text; see Known issues. Cosmetic only.
The run is slow with many hosted domains A live whois lookup runs for every domain, every time, with no delay between them. Expected; some registries may rate-limit if you have many domains.

Details

Domain registration expiry

For every folder in /home with a www subfolder:

  1. Runs whois <domain> and reads the last Registrar Registration Expiration Date line in the output (there can be more than one; the last one in the raw output is used).
  2. Trims it to YYYY-MM-DD. If it doesn't look like a date, DomainDaysLeft is set to -1000000 (effectively "unknown").
  3. Saves DomainExpiresOn and DomainDaysLeft to the Site table, every run, for every domain.
  4. Sends a notification if DomainDaysLeft is 1 to 13 inclusive.

Hosting account expiry

  1. Reads every account whose ExpiresOn (the hosting expiry date set at create) is earlier than one month from today.
  2. Recomputes DaysLeft from that date and saves it.
  3. Sends a notification. Unlike the domain check, there is no lower bound — see Known issues.

Windows

Check Notified when
Domain registration DomainDaysLeft is 1–13 (just under two weeks)
Hosting account DaysLeft is less than roughly 30 — including zero or negative

There is no "already notified" flag, so a domain or account inside its window is notified again on every run — daily, if scheduled daily.

Notifications sent

For each flagged domain or account:

Channel Sent to
Email info@<domain>
WhatsApp The admin channel configured for /go/sendwhatsapp, and again to the account's saved mobile number if one is set — see Known issues

expire does not renew anything itself. Renew the hosting account with renew; domain registration renewal happens with your domain registrar or registrar integration.

Known issues


See also

Command Description
renew Update the hosting expiry date in GoAdmio
create Create a GoAdmio account from the command line
contact Manage GoAdmio account contact details
cron Set up main cron jobs in GoAdmio
checkdomain Find the best available domain names for keywords