gitmyhub

DDNS

Python ★ 4.7k updated 1d ago

🌐自动更新域名解析到本机IP(支持dnspod,阿里DNS,CloudFlare,华为云,DNSCOM...)

A background tool that automatically updates your domain's DNS records whenever your home or server IP address changes, so your website or service stays reachable under the same address.

PythonDockersetup: moderatecomplexity 2/5

This repository is a tool that automatically keeps your domain name pointing to your current internet address, even when that address changes. Many home internet connections and some small hosting setups receive a different IP address each time they reconnect. This tool, called DDNS (Dynamic DNS), runs in the background and updates your domain's records whenever it detects a change, so people can always find your server under the same web address.

The tool supports more than fifteen DNS service providers, including Cloudflare, Alibaba DNS, Tencent Cloud DNS, Huawei Cloud DNS, DNSPOD, No-IP, NameSilo, and several others. It handles both the older IPv4 address format and the newer IPv6 format, and can detect whether your machine is using a local network address or a public one, updating the correct record automatically.

You can run it in several ways: as a Docker container (the recommended method), as a standalone binary file that does not require Python, via the Python package manager using pip, or directly from the source code. Configuration is flexible, accepting command-line arguments, a JSON settings file, or environment variables, with command-line arguments taking the highest priority when multiple sources conflict.

The project is primarily documented in Chinese, which reflects its main user base, though the configuration table headers and provider list are readable in English. Setup involves obtaining an API token from your DNS provider, specifying which domain names to update, and then running the tool on a schedule. It includes a local cache to avoid unnecessary API calls when the IP has not changed, and supports HTTP proxies for networks that require them.

This is a utility for people who run their own servers or services at home and want a stable web address without paying for a fixed IP from their internet provider.

Where it fits