Namecheap DNS CLI for Coolify
  • Python 80.1%
  • Shell 19.9%
Find a file
Nate Lubeck af91df3740 Sync scripts to Coolify host and document live verify
Install now rsyncs scripts/, and README covers offline vs live verification.
2026-08-29 09:14:03 -07:00
bin Add Namecheap DNS CLI for Coolify 2026-08-29 09:07:37 -07:00
docs Add Namecheap DNS CLI for Coolify 2026-08-29 09:07:37 -07:00
lib Add Namecheap DNS CLI for Coolify 2026-08-29 09:07:37 -07:00
scripts Sync scripts to Coolify host and document live verify 2026-08-29 09:14:03 -07:00
systemd Add Namecheap DNS CLI for Coolify 2026-08-29 09:07:37 -07:00
.gitignore Add Namecheap DNS CLI for Coolify 2026-08-29 09:07:37 -07:00
namecheap-dns.env.example Add Namecheap DNS CLI for Coolify 2026-08-29 09:07:37 -07:00
README.md Sync scripts to Coolify host and document live verify 2026-08-29 09:14:03 -07:00

namecheap-dns

Point Coolify apps at Namecheap BasicDNS programmatically. Coolify has no native Namecheap DNS provider; Traefiks 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

  1. nc-dns point-coolify otherdomain.com --www --wildcard --apply
  2. Wait until dig +short otherdomain.com returns the Coolify IP
  3. 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