Skip to content

Hackpig1974/domain-expiry-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 Domain Expiration Monitor - Web UI

A standalone web dashboard for monitoring domain renewals. This project extends the Domain Expiry API with a modern web interface featuring:

  • 🎨 Light/Dark/System Themes - Automatic theme switching that follows your OS
  • πŸ“Š Color-Coded Status - Red (≀3 months), Yellow (3-6 months), Green (>6 months)
  • ⏱️ Live Countdown - Shows time until next refresh
  • πŸ”„ Auto-Refresh - Configurable interval (default 1 hour)
  • πŸ“± Responsive Design - Works on desktop, tablet, and mobile
  • 🌍 Locale-Aware Date Formatting - Auto-detects browser locale or choose from 5 manual formats
  • βš™οΈ Configurable Thresholds - Set your own Red/Yellow day values directly in the UI
  • ⚑ Zero Dependencies - Pure HTML/CSS/JavaScript + nginx

πŸš€ Quick Start

Prerequisites

  • Docker & Docker Compose installed
  • Available ports: 80 (web UI) and 8088 (API)

Installation

Step 1: Create a project directory

mkdir domain-expiry-web
cd domain-expiry-web

Step 2: Download the required files

wget https://raw.githubusercontent.com/Hackpig1974/domain-expiry-web/main/compose.yml
wget https://raw.githubusercontent.com/Hackpig1974/domain-expiry-web/main/.env.example -O .env

Step 3: Configure your domains

nano .env

Add your domains:

DOMAINS=example.com,mysite.com,portfolio.io
RDAP_BASE=https://rdap.org/domain
ALERT_DAYS=183
TZ=America/Denver

Step 4: Start Services

docker compose up -d

Docker will pull both images automatically on first run. No local web files needed.

Step 5: Access Web UI

Open your browser to:


πŸ”„ Updating

Both containers are published to Docker Hub. Updates to the web UI and API are delivered via new image versions:

docker compose pull
docker compose up -d

That's it β€” no git, no local file management.


βš™οΈ Configuration

Environment Variables (.env)

Variable Required Default Description
DOMAINS βœ… Yes - Comma-separated list of domains
RDAP_BASE βœ… Yes - RDAP server (use https://rdap.org/domain)
ALERT_DAYS βœ… Yes - Show alert when days ≀ this value
REFRESH_MINUTES No 360 API cache duration (6 hours)
TZ No UTC Timezone (e.g., America/Denver)
WHOIS_FALLBACK_ENABLED No false Enable WHOIS fallback for .uk/.ca/.fr
WHOISXML_API_KEY No - API key for ALL TLDs (500 free/month)

Port Configuration

Edit compose.yml to change ports:

ports:
  - "8089:80"   # Web UI on port 8089
  - "8090:8000" # API on port 8090

🎨 Features

Theme System

  • Light Theme: Clean white/gray design
  • Dark Theme: Blue-green slate accents
  • System Theme: Follows OS preference automatically
  • Persistent: Theme choice saved in browser

Color-Coded Status

  • πŸ”΄ Red: ≀90 days remaining (3 months)
  • 🟑 Yellow: 91-184 days (3-6 months)
  • 🟒 Green: >184 days (over 6 months)
  • βšͺ Gray: Status unknown

Date Format & Thresholds

  • βš™οΈ Settings gear (top right) opens the settings panel with two sections:
  • Date Format β€” Auto (Browser Locale) default, or choose from DD/MM/YYYY, DD-MM-YYYY, MM/DD/YYYY, MM-DD-YYYY, YYYY-MM-DD
  • Status Thresholds β€” Set your own Red alert and Yellow warning day values. Defaults to 90 and 184 days if not customized
  • Persistent: All settings saved in browser localStorage

Live Countdown

Footer displays time until next auto-refresh: Next refresh: 59m 30s

Manual Refresh

Click "πŸ”„ Refresh Now" to update immediately and reset countdown.


πŸ”§ Troubleshooting

Web UI Not Loading

Check containers are running:

docker ps

Should see both domain-expiry and domain-expiry-webserver.

Check logs:

docker logs domain-expiry
docker logs domain-expiry-webserver

Domains Showing N/A

API may not be able to fetch domain data. Options:

  1. Enable WHOIS fallback (for .uk, .ca, .fr):

    WHOIS_FALLBACK_ENABLED=true
  2. Add WhoisXML API key (for ALL TLDs):

    WHOISXML_API_KEY=your-key-here

    Get free key: https://whoisxmlapi.com (500 requests/month)

Restart after config changes:

docker compose restart

Port Already in Use

If port 80 is occupied, edit compose.yml:

ports:
  - "8089:80"

Then access via: http://localhost:8089


πŸ“Š How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Browser       β”‚
β”‚  (port 80)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ HTTP
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  domain-expiry  β”‚  Serves static HTML/CSS/JS
β”‚  -webserver     β”‚  Proxies /api/* to backend
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ HTTP
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  domain-expiry  β”‚  Domain expiry data
β”‚  (API)          β”‚  RDAP/WHOIS queries
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow:

  1. Browser loads static files from the webserver container
  2. JavaScript fetches /api/status (proxied to API container)
  3. API queries RDAP/WHOIS for domain data
  4. JavaScript updates table with color-coded results
  5. Auto-refresh repeats every hour

πŸ’‘ Tips & Best Practices

Performance

  • Keep refresh interval at 1+ hour (API caches for 6 hours)
  • Monitor 10-20 domains max per instance
  • Web UI adds minimal overhead (~15MB RAM)

Security

  • Don't expose to internet without authentication
  • Run behind reverse proxy (nginx/Traefik) with auth
  • No sensitive data stored (public WHOIS info only)

πŸ†š vs Homepage Integration

Use domain-expiry-web when:

  • βœ… You want a standalone dashboard
  • βœ… You don't use Homepage
  • βœ… You want theme customization
  • βœ… You prefer a dedicated interface

Use domain-expiry (original) when:

  • βœ… You already use Homepage dashboard
  • βœ… You want all services in one place
  • βœ… You need Homepage's widget features

Both can run simultaneously on different ports.

🎨 Color Coding Difference

Original domain-expiry (Homepage):

  • Shows πŸ”΄ red emoji when domain expires in ≀183 days (configurable via ALERT_DAYS)
  • No visual indicator for domains with >183 days remaining
  • Single threshold based on ALERT_DAYS setting

domain-expiry-web:

  • Three-tier color system: Red (≀90d) / Yellow (91-184d) / Green (>184d)
  • Visual status for ALL domains at a glance
  • Independent thresholds (configurable via Settings panel in UI)
  • Themed colors adapt to Light/Dark mode

🀝 Contributing

Found a bug? Open an issue. Have a feature request or question? Start a Discussion. Want to contribute code? Submit a PR with improvements and share screenshots of your setup!


πŸ› οΈ Development

Want to modify the web UI or build your own image:

git clone https://github.com/Hackpig1974/domain-expiry-web.git
cd domain-expiry-web

Edit files in webserver/, then build locally:

docker build -t domain-expiry-webserver:dev .

πŸ“š Related Projects


πŸ“„ License

GPL-3.0 License - see LICENSE file


πŸ™ Acknowledgments

Built on the Domain Expiry API by @Hackpig1974


Made with ❀️ for the homelab community

About

Standalone web dashboard for domain expiration monitoring with light/dark themes

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors