{"id":20200377,"url":"https://github.com/nickjer/namecheap-ddns","last_synced_at":"2025-04-10T11:21:00.344Z","repository":{"id":41497627,"uuid":"227950949","full_name":"nickjer/namecheap-ddns","owner":"nickjer","description":"A CLI used to update the A + Dynamic DNS records for Namecheap","archived":false,"fork":false,"pushed_at":"2025-02-23T13:27:30.000Z","size":3445,"stargazers_count":15,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T10:06:42.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickjer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-14T01:47:34.000Z","updated_at":"2025-02-23T13:27:31.000Z","dependencies_parsed_at":"2024-11-14T04:43:36.992Z","dependency_job_id":"cc0368aa-c900-40a1-b3a1-ee670621e2cf","html_url":"https://github.com/nickjer/namecheap-ddns","commit_stats":{"total_commits":39,"total_committers":1,"mean_commits":39.0,"dds":0.0,"last_synced_commit":"c48e23ce2832e45b1e652e8e6b2850cb962c19b4"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjer%2Fnamecheap-ddns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjer%2Fnamecheap-ddns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjer%2Fnamecheap-ddns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjer%2Fnamecheap-ddns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickjer","download_url":"https://codeload.github.com/nickjer/namecheap-ddns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208603,"owners_count":21065203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T04:43:26.490Z","updated_at":"2025-04-10T11:21:00.328Z","avatar_url":"https://github.com/nickjer.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Namecheap DDNS\n\n[![Latest Version](https://img.shields.io/crates/v/namecheap-ddns.svg)](https://crates.io/crates/namecheap-ddns)\n[![Downloads](https://img.shields.io/github/downloads/nickjer/namecheap-ddns/total.svg)](https://github.com/nickjer/namecheap-ddns/releases)\n[![License](https://img.shields.io/github/license/nickjer/namecheap-ddns.svg)](https://github.com/nickjer/namecheap-ddns)\n[![Continuous Integration Status](https://github.com/nickjer/namecheap-ddns/workflows/Continuous%20integration/badge.svg)](https://github.com/nickjer/namecheap-ddns/actions)\n\nA command line interface (CLI) used to update the A + Dynamic DNS records for\nNamecheap.\n\n## Pre-compiled Binaries\n\nYou can download and run the [pre-compiled binaries] to get up and running\nimmediately.\n\n## Installation\n\nAn alternative is to install using [cargo]:\n\n```shell\ncargo install namecheap-ddns\n```\n\n## Usage\n\nCheck the help (`--help`) for details on using this tool:\n\n```shell\nUpdates the A + Dynamic DNS records for Namecheap\n\nUsage: namecheap-ddns [OPTIONS] --domain \u003cDOMAIN\u003e --subdomain \u003cSUBDOMAIN\u003e --token \u003cTOKEN\u003e\n\nOptions:\n  -d, --domain \u003cDOMAIN\u003e        The domain with subdomains [env: NAMECHEAP_DDNS_DOMAIN=]\n  -s, --subdomain \u003cSUBDOMAIN\u003e  The subdomain to update [env: NAMECHEAP_DDNS_SUBDOMAIN=]\n  -i, --ip \u003cIP\u003e                The ip address to set on the subdomains (if\n                               blank the ip used to make this request will be\n                               used) [env: NAMECHEAP_DDNS_IP=]\n  -t, --token \u003cTOKEN\u003e          The secret token [env: NAMECHEAP_DDNS_TOKEN=]\n  -h, --help                   Print help\n  -V, --version                Print version\n```\n\nYou will need to specify Namecheap's Dynamic DNS Password provided to you in\ntheir Advanced DNS control panel as the environment variable\n`NAMECHEAP_DDNS_TOKEN`.\n\n\u003e *Tip:* This is not your Namecheap login password.\n\n### Examples\n\nI want to update the host `host1.example.com` with my current public facing ip\naddress:\n\n```console\n$ NAMECHEAP_DDNS_TOKEN=... namecheap-ddns -d example.com -s host1\nhost1.example.com IP address updated to: 123.123.123.123\n```\n\nI want to update multiple subdomains (`host1`, `host2`, and `host3`) with a\ngiven ip address:\n\n```console\n$ NAMECHEAP_DDNS_TOKEN=... namecheap-ddns \\\n\u003e     -d example.com \\\n\u003e     -s host1 -s host2 -s host3\n\u003e     -i 123.123.123.123\nhost1.example.com IP address updated to: 123.123.123.123\nhost2.example.com IP address updated to: 123.123.123.123\nhost3.example.com IP address updated to: 123.123.123.123\n```\n\nI want to use an environment variable file:\n\n```console\n$ cat .env\nexport NAMECHEAP_DDNS_TOKEN=...\nexport NAMECHEAP_DDNS_DOMAIN=example.com\nexport NAMECHEAP_DDNS_SUBDOMAIN=host1,host2\nexport NAMECHEAP_DDNS_IP=321.321.321.321\n$ source .env\n$ namecheap-ddns\nhost1.example.com IP address updated to: 321.321.321.321\n```\n\n## Linux - systemd\n\nIf you want to set this up as a service you will need to create a service file\nand corresponding timer.\n\n1. Create the service itself that updates your subdomains:\n\n   ```desktop\n   # /etc/systemd/system/ddns-update.service\n\n   [Unit]\n   Description=Update DDNS records for Namecheap\n   After=network-online.target\n\n   [Service]\n   Type=simple\n   Environment=NAMECHEAP_DDNS_TOKEN=\u003cTOKEN\u003e\n   Environment=NAMECHEAP_DDNS_DOMAIN=\u003cDOMAIN\u003e\n   Environment=NAMECHEAP_DDNS_SUBDOMAIN=\u003cSUBDOMAIN\u003e\n   ExecStart=/path/to/namecheap-ddns\n   User=\u003cUSER\u003e\n\n   [Install]\n   WantedBy=default.target\n   ```\n\n   Be sure to fill in the correct path to your binary as well as the\n   environment variables.\n\n2. Note that the super secret token is in this file, so we should set\n   restrictive permissions:\n\n   ```shell\n   sudo chmod 600 /etc/systemd/system/ddns-update.service\n   ```\n\n3. Create the timer that runs this service:\n\n   ```desktop\n   # /etc/systemd/system/ddns-update.timer\n\n   [Unit]\n   Description=Run DDNS update every 15 minutes\n   Requires=ddns-update.service\n\n   [Timer]\n   Unit=ddns-update.service\n   OnUnitInactiveSec=15m\n   AccuracySec=1s\n\n   [Install]\n   WantedBy=timers.target\n   ```\n\n4. Now we reload the daemon with the new services and start them:\n\n   ```shell\n   sudo systemctl daemon-reload\n   sudo systemctl start ddns-update.service ddns-update.timer\n   ```\n\nYou can view the logs from the service with the following command:\n\n```shell\nsudo journalctl -u ddns-update.service\n```\n\n[cargo]: https://doc.rust-lang.org/cargo/\n[pre-compiled binaries]: https://github.com/nickjer/namecheap-ddns/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickjer%2Fnamecheap-ddns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickjer%2Fnamecheap-ddns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickjer%2Fnamecheap-ddns/lists"}