https://github.com/lvillis/ddns-rs
Rust Dynamic-DNS (DDNS) daemon that detects your public IP and automatically upserts A/AAAA records on Cloudflare, Aliyun, or custom providers, featuring a self-hosted web dashboard and zero external dependencies.
https://github.com/lvillis/ddns-rs
cloudflare ddns ddns-rs ddns-rust rust
Last synced: 4 months ago
JSON representation
Rust Dynamic-DNS (DDNS) daemon that detects your public IP and automatically upserts A/AAAA records on Cloudflare, Aliyun, or custom providers, featuring a self-hosted web dashboard and zero external dependencies.
- Host: GitHub
- URL: https://github.com/lvillis/ddns-rs
- Owner: lvillis
- License: mit
- Created: 2024-11-25T13:32:42.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-16T01:25:28.000Z (5 months ago)
- Last Synced: 2025-09-16T03:27:00.668Z (5 months ago)
- Topics: cloudflare, ddns, ddns-rs, ddns-rust, rust
- Language: Rust
- Homepage:
- Size: 396 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
πΊπΈ English Β·
π¨π³ δΈζ Β Β Β Β Β Β |Β Β Β Β Β Table of Contents βοΈ
ddns-rs
π Rust Dynamic-DNS in one binary β detects your public IP and keeps multiple DNS providers up-to-date, with a built-in dashboard and zero external dependencies.
[](https://crates.io/crates/ddns)
[](https://github.com/lvillis/ddns-rs)
[](https://github.com/lvillis/ddns-rs/actions)
[](https://hub.docker.com/r/lvillis/ddns-rs)
[](https://hub.docker.com/r/lvillis/ddns-rs)
[](LICENSE)
---
## β¨ Features
| Feature | Description |
|----------------------------|----------------------------------------------------------------------|
| **Multi-provider upsert** | Built-in Cloudflare & Aliyun drivers; add your own via feature flags |
| **Pluggable IP detectors** | HTTP Β· local interface Β· custom shell, with priority chain |
| **Cron-based scheduler** | Standard 6-field cron (second precision) + concurrency & back-off |
| **Self-hosted dashboard** | Tailwind + Alpine, dark/light auto; Cookie & Bearer auth supported |
| **Zero runtime deps** | Single static binary or multi-arch Docker image (< 10 MB) |
| **Env-override ready** | Any TOML key can be overridden via `DDNS_SECTION_KEY` |
## πΈ Screenshots
### Login

### Dashboard

## πΌ Architecture
```mermaid
graph TD
%% ββ Client Layer βββββββββββββββββββββββ
subgraph "Client"
Browser["Web Browser
Dashboard UI"]
ApiTool["REST Client / cURL"]
end
class Browser,ApiTool client;
%% ββ Core Daemon ββββββββββββββββββββββββ
subgraph "ddns-rs Daemon"
HTTP["HTTP Server
axum 0.8"]
Scheduler["Scheduler
cron + back-off"]
Detector["IP Detector
HTTP β’ NIC β’ Shell"]
Status["Shared Status
Arc<RwLock>"]
end
class HTTP,Scheduler,Detector,Status daemon;
%% ββ Provider Layer βββββββββββββββββββββ
subgraph "DNS Providers"
Cloudflare
Aliyun
Custom["Your Driver"]
end
class Cloudflare,Aliyun,Custom provider;
%% ββ Interactions βββββββββββββββββββββββ
Browser -- "SSE / REST" --> HTTP
ApiTool -- REST --> HTTP
HTTP --> Status
Scheduler --> Detector
Detector --> Scheduler
Scheduler --> Status
Scheduler --> Cloudflare
Scheduler --> Aliyun
Scheduler --> Custom
%% ββ Styling βββββββββββββββββββββββββββ
classDef client fill:#e3f2fd,stroke:#1976d2,stroke-width:1px;
classDef daemon fill:#e8f5e9,stroke:#388e3c,stroke-width:1px;
classDef provider fill:#fff8e1,stroke:#f57f17,stroke-width:1px;
```
## π Deployment
> Choose **one** of the following options. Sample manifests are in `deploy/`.
### 1. Docker
```bash
curl -fsSL -o ddns.toml https://raw.githubusercontent.com/lvillis/ddns-rs/main/ddns.example.toml
docker run -d --name=ddns-rs \
-p 8080:8080 \
-v $PWD/ddns.toml:/opt/app/ddns.toml \
-e DDNS_HTTP_JWT_SECRET="$(openssl rand -hex 32)" \
docker.io/lvillis/ddns-rs:latest
```
### 2. Docker Compose
```bash
curl -fsSL -o docker-compose.yaml https://raw.githubusercontent.com/lvillis/ddns-rs/main/deploy/compose/docker-compose.yaml
docker-compose up -d
```
### 3. Kubernetes
```bash
curl -fsSL -o docker-compose.yaml https://raw.githubusercontent.com/lvillis/ddns-rs/main/deploy/k8s/ddns-rs.yaml
kubectl apply -f ddns-rs.yaml
```