- Python 80.1%
- Shell 19.9%
|
|
||
|---|---|---|
| bin | ||
| docs | ||
| lib | ||
| scripts | ||
| systemd | ||
| .gitignore | ||
| namecheap-dns.env.example | ||
| README.md | ||
namecheap-dns
Point Coolify apps at Namecheap BasicDNS programmatically. Coolify has no native Namecheap DNS provider; Traefik’s Namecheap integration only covers ACME DNS-01 TXT records (wildcard SSL), not A/CNAME for new apps.
CLI / systemd timer
→ nc-dns (getHosts → merge → setHosts)
→ Namecheap BasicDNS
Commands
| Command | Purpose |
|---|---|
nc-dns list example.com |
Dump current hosts |
nc-dns upsert example.com A www 1.2.3.4 --ttl 300 |
Add/replace one record (dry-run) |
nc-dns upsert … --apply |
Actually write |
nc-dns delete example.com A www |
Remove one record |
nc-dns point-coolify example.com --www --wildcard |
Apex + www + * → COOLIFY_PUBLIC_IP |
nc-dns sync-coolify |
Upsert A records for Coolify server FQDNs |
Dry-run is the default. Pass --apply to mutate.
Namecheap setHosts replaces the entire zone. Every write path merges so
MX, TXT, mail, and unrelated hosts are preserved.
Install on Coolify host
./scripts/install-on-coolify.sh
# optional auto-sync every 5 minutes:
./scripts/install-on-coolify.sh --install-timer
Defaults: SSH root@100.65.246.37, install under /usr/local/lib/namecheap-dns,
env file /etc/namecheap-dns.env.
One-time Namecheap setup
See docs/NAMECHEAP_SETUP.md. Whitelist public IPv4
89.167.16.76 (not the Tailscale address).
New domain workflow
nc-dns point-coolify otherdomain.com --www --wildcard --apply- Wait until
dig +short otherdomain.comreturns the Coolify IP - Attach the domain in Coolify and deploy (HTTP-01 can succeed)
Keep *.preview.natelubeck.com as a wildcard so PR previews do not need
per-host Namecheap writes.
Verify
Offline (no Namecheap credentials):
./scripts/test-nc-dns.py
Live (after filling /etc/namecheap-dns.env):
./scripts/verify-live.sh # dry-run list + upsert
./scripts/verify-live.sh --apply # create dns-test, dig, confirm MX/TXT, delete
Layout
bin/nc-dns # thin CLI entrypoint
lib/nc_dns.py # Python 3 stdlib implementation
scripts/install-on-coolify.sh # rsync + symlink + optional timer
scripts/test-nc-dns.py # offline merge/parser tests
scripts/verify-live.sh # live Namecheap dry-run / apply / dig / cleanup
systemd/nc-dns-sync.{service,timer}
namecheap-dns.env.example
docs/NAMECHEAP_SETUP.md