Skip to main content

Namecheap Dynamic DNS smart home integration, free and open source

Namecheap Dynamic DNS integration for Gladys Assistant

Keeps the hosts of your Namecheap domain pointed at the public IPv4 address of your home.

Keep the hosts of a domain registered at Namecheap pointed at the public IPv4 address of your home: example.com, www, *, nas… Gladys reads the public address regularly and tells Namecheap as soon as it changes. This integration is for Namecheap only: for another dynamic DNS provider, look for its own integration in the store.

Developed without the hardware: feedback welcome. This integration was tested against the real Namecheap service (refused password, unknown domain) but without a Namecheap domain nor a real Gladys installation: the successful update was tested against a simulated service built from Namecheap's documented answer. If something does not work as described, please say so on the Gladys forum or in the issues.

What you need​

  • Gladys Assistant 5.1.0 or later, with Internet access.
  • A domain at Namecheap that uses the Namecheap DNS (BasicDNS, PremiumDNS or FreeDNS of Namecheap).
  • Dynamic DNS turned on for the domain, and for each host an A + Dynamic DNS Record. IPv4 only: Namecheap Dynamic DNS does not update AAAA records.

Set up​

  1. In the Namecheap dashboard, open Domain List, then Manage next to the domain, then the Advanced DNS tab.
  2. Under Dynamic DNS, turn the switch on and copy the Dynamic DNS Password shown. It is not the password of your Namecheap account.
  3. Under Host Records, add an A + Dynamic DNS Record for each host: @ for the domain itself, www, * for every subdomain, or a name of your choice. The value can be anything (127.0.0.1): Gladys replaces it.
  4. In Gladys, open Integrations, then this integration, then Configuration, and fill in:
    • Domain: the domain, like example.com (without www).
    • Dynamic DNS password: the password copied at step 2.
    • Hosts: the hosts created at step 3, separated by commas, like @, www. @ by default. A host written in full (www.example.com) is accepted.
    • Check of the public address: how often the public address is read, 5 minutes by default. Namecheap itself is only called when a host must change.
    • Language of the integration texts: the language of the feature names and of the results.
  5. Save. The connection status says what is missing or what Namecheap refused.
  6. In the Discover tab, add the devices you want to follow.

Devices​

  • One device per host ("www.example.com (Namecheap)"), with three texts:
    • Last address sent: the last address Namecheap accepted.
    • Last result: Up to date, Waiting, or the last error (password refused, domain not found, no such Dynamic DNS record, Namecheap unreachable…).
    • Last update: when Namecheap last accepted an update.
  • Public address (Namecheap): the Public IPv4 of the home.

The update is sent only when the public address differs from the one Namecheap last accepted, when a host or the password changes, or on demand. What Namecheap accepted is kept, so a restart of Gladys sends nothing. A failed update is retried after 2, 4, 8… minutes (one hour at most); a refused password, an unknown domain or a missing record waits for a new address or a new configuration.

Dashboard​

The Namecheap Dynamic DNS widget shows the public address, one row per host (its address when up to date, the error otherwise), the time of the last check and an Update now button. Its settings hide the public address (Show the public address) and the button (Show the Update button).

Scenes​

Triggers​

  • Namecheap: public address changed: the public IPv4 address of the home changed. Variables: New address, Previous address.
  • Namecheap: host updated: Namecheap pointed a host at a new address. Filter: Host. Variables: Host, New address.
  • Namecheap: update failed: a host could not be updated, once per error and not at every retry. Filters: Host, Reason. Variables: Host, Reason, Namecheap answer.

Actions​

  • Namecheap: update now: sends every host to Namecheap, even unchanged. Fails when a host could not be updated. Outputs: Hosts up to date, Public IPv4.

The Update now action of the Configuration screen does the same, at most once a minute.

Scene ideas​

  • Receive a message when the public address of the home changes.
  • Receive a message when an update fails with the reason Password refused.

Troubleshooting​

  • "Namecheap refuses the password": copy the Dynamic DNS password of the domain again (Advanced DNS). Turning Dynamic DNS off and on again gives a new password.
  • "Namecheap does not find the domain": check the spelling, and that the domain uses the Namecheap DNS.
  • "A host has no A + Dynamic DNS record": create the record in Advanced DNS. An ordinary A record is not enough.
  • Once the problem is fixed at Namecheap, save the configuration again or use Update now: a refused host is not retried before.
  • "The public address cannot be read": Gladys has no Internet access, or the three address services (ipify, icanhazip, ident.me) are unreachable.
  • For details, start the integration with the LOG_LEVEL=debug environment variable. The password never appears in the logs.

Limits​

  • Namecheap only, one domain per installation, 9 hosts at most.
  • IPv4 only: Namecheap Dynamic DNS has no AAAA update.
  • The public address is read from three Internet services; two must agree before a host is moved, so one wrong answer never changes your DNS.
  • Behind a CGNAT (some 4G and fibre boxes), the public address is shared and dynamic DNS cannot reach your home.
  • Not affiliated with Namecheap, Inc.

Configuration settings​

These are the settings Namecheap Dynamic DNS asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Namecheap Dynamic DNSsectionNoIn the Namecheap dashboard, open Domain List → Manage → Advanced DNS: turn on Dynamic DNS, copy its password, and create an A + Dynamic DNS record for each host. Namecheap is only called when the public address changes. IPv4 only. Not affiliated with Namecheap.
DomainstringNoThe domain registered at Namecheap, without www.
Dynamic DNS passwordsecretNoShown under Dynamic DNS in Advanced DNS. It is not your account password.
HostsstringNoSeparated by commas: @ for the domain itself, www, * for the wildcard, or a subdomain. Each needs an A + Dynamic DNS record.
Check of the public addressselectNoHow often the public address is read. Namecheap itself is only called when a host must change.
Language of the integration textsselectNoUsed for the feature names (set when a device is added) and the results of the hosts.

How to install Namecheap Dynamic DNS in Gladys​

  1. In Gladys, open Integrations: Namecheap Dynamic DNS appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-namecheap-dns:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-namecheap-dns.

Namecheap Dynamic DNS requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Namecheap Dynamic DNS is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂