An open API service indexing awesome lists of open source software.

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.

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.

[![Crates.io](https://img.shields.io/crates/v/ddns.svg)](https://crates.io/crates/ddns)
[![Repo Size](https://img.shields.io/github/repo-size/lvillis/ddns-rs?color=328657)](https://github.com/lvillis/ddns-rs)
[![CI](https://github.com/lvillis/ddns-rs/actions/workflows/ci.yaml/badge.svg)](https://github.com/lvillis/ddns-rs/actions)
[![Docker Pulls](https://img.shields.io/docker/pulls/lvillis/ddns-rs)](https://hub.docker.com/r/lvillis/ddns-rs)
[![Image Size](https://img.shields.io/docker/image-size/lvillis/ddns-rs/latest?style=flat-square)](https://hub.docker.com/r/lvillis/ddns-rs)
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg)](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

![Login](docs/assets/login.png)

### Dashboard

![Dashboard](docs/assets/dashboard.png)

## πŸ–Ό 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
```