Asynchronous DNS server in PHP on ReactPHP: authoritative zones with AXFR/IXFR, NOTIFY and TSIG, a caching resolver with blocklists, a live HTTP API with web UI, and HA replication.
  • PHP 87.6%
  • Vue 6.2%
  • TypeScript 4.9%
  • Shell 0.6%
  • CSS 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Volker 91daaf8c6f docs: add web UI screenshots to README and getting started
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 15:11:35 +01:00
bin daemon: add skydnsd entry point with --check, signals and graceful shutdown 2026-11-23 19:19:14 +01:00
config config: make the example management listener reachable for the HA peer 2026-11-23 19:09:32 +01:00
deploy deploy: add systemd socket units and a notify-reload service 2026-11-23 19:45:44 +01:00
docker/php build: copy the web UI from its real vite output directory 2026-11-23 19:10:21 +01:00
docs docs: add web UI screenshots to README and getting started 2026-12-02 15:11:35 +01:00
phpstan/stubs build: add Docker dev image, gate and tooling configuration 2026-11-23 16:11:29 +01:00
scripts build: add release tarball script with production vendor and built web UI 2026-11-24 00:58:39 +01:00
src mgmt: expose a per-start run id in /healthz and status for restart detection 2026-11-24 00:58:39 +01:00
tests mgmt: expose a per-start run id in /healthz and status for restart detection 2026-11-24 00:58:39 +01:00
web web: use the SkyDNS brand mark, favicon and touch icon 2026-11-23 19:10:21 +01:00
.dockerignore build: add Docker dev image, gate and tooling configuration 2026-11-23 16:11:29 +01:00
.gitignore build: add Docker dev image, gate and tooling configuration 2026-11-23 16:11:29 +01:00
.php-cs-fixer.dist.php build: add Docker dev image, gate and tooling configuration 2026-11-23 16:11:29 +01:00
AGENTS.md docs: require topic-based commits 2026-11-23 16:11:38 +01:00
CLAUDE.md docs: add agent guide, API specification and work packages 2026-11-23 16:11:29 +01:00
composer.json build: add Docker dev image, gate and tooling configuration 2026-11-23 16:11:29 +01:00
composer.lock build: add Docker dev image, gate and tooling configuration 2026-11-23 16:11:29 +01:00
LICENSE build: add Docker dev image, gate and tooling configuration 2026-11-23 16:11:29 +01:00
phpstan.neon.dist build: add Docker dev image, gate and tooling configuration 2026-11-23 16:11:29 +01:00
phpunit.xml.dist build: add Docker dev image, gate and tooling configuration 2026-11-23 16:11:29 +01:00
README.md docs: add web UI screenshots to README and getting started 2026-12-02 15:11:35 +01:00

SkyDNS

An asynchronous DNS server in modern PHP — authoritative zones, transfers, a caching resolver, a live API and HA.


SkyDNS is a DNS server for real networks, written in PHP 8.6 on the ReactPHP event loop. It serves your zones authoritatively as primary or secondary (AXFR/IXFR, NOTIFY, TSIG — interoperable with BIND, Knot and PowerDNS), resolves everything else for your clients as a caching forwarder or a full iterative resolver with blocklists and serve-stale, and protects itself with response rate limiting. Everything can be changed while it runs — through an HTTP/JSON management API with live events, a web UI and the skydnsctl CLI — and two or more nodes replicate their zones to each other for high availability. Configuration is a single, strictly validated YAML file; state is kept in crash-safe journaled files, no database required.

The goal: a small, readable, hackable open-source alternative to BIND, PowerDNS, Knot, Unbound and dnsmasq for labs, companies, hosters and home networks — one daemon instead of an authoritative server, a resolver, a control tool, a database and a third-party admin UI.

Status: pre-release 0.1.0. Authoritative serving, zone transfers with TSIG, the resolver, HA replication, the management API, skydnsctl and the web UI all run together in bin/skydnsd; scripts/gate.sh (unit/integration) and scripts/e2e.sh (live daemon checked with dig/curl) are green. Expect rough edges until the first release.

Features

  • Authoritative DNS — primary zones from RFC 1035 zone files or fully API-managed, secondary zones via AXFR/IXFR; wildcards (RFC 4592), CNAME/DNAME, delegations with glue, negative answers per RFC 2308, minimal ANY (RFC 8482), EDNS(0), TCP pipelining.
  • Zone validation and automatic serials — CNAME exclusivity, apex NS, glue placement, RRset TTL consistency; date-based YYYYMMDDnn serials bumped on every change.
  • Zone transfers — AXFR/IXFR server and client, NOTIFY in and out, TSIG (HMAC-SHA256/384/512, SHA1), SOA refresh/retry/expire timers.
  • Resolver — forwarding with health checks, conditional forwarding per domain, or full iterative resolution from the root; LRU cache with negative caching and serve-stale (RFC 8767).
  • Blocklists — hosts files, plain lists, config entries and live API entries; NXDOMAIN, null address or REFUSED.
  • Security — ACLs for queries, recursion, transfers and the API; response rate limiting with slip; hidden version; bearer tokens stored as SHA-256 only; runs unprivileged without capabilities under systemd socket activation (zero-downtime restarts, sd_notify readiness), or with just CAP_NET_BIND_SERVICE otherwise.
  • Live management — HTTP+JSON API (TCP + Unix socket), Server-Sent Events, Prometheus /metrics, /healthz, web UI with live dashboard and query log, skydnsctl. Zone changes are live instantly; config changes need only a reload (SIGHUP or API).
  • High availability — active-standby or multi-primary replication between SkyDNS nodes over the management API, automatic or manual failover, plus classic secondaries; keepalived/VRRP and anycast recipes.
  • Non-blocking, crash-safe storage — all file I/O through react/filesystem, state as snapshot generations plus an append-only journal; documented durability limits.

How it compares

SkyDNS BIND 9 PowerDNS Auth Knot DNS Unbound dnsmasq
Authoritative primary ✓ ✓ ✓ ✓ partial¹ partial²
Secondary (AXFR/IXFR in) ✓ ✓ ✓ ✓ partial¹ —
Serves AXFR/IXFR, NOTIFY ✓ ✓ ✓ ✓ — AXFR²
TSIG ✓ ✓ ✓ ✓ — —
Forwarding resolver + cache ✓ ✓ via Recursor³ — ✓ ✓
Iterative resolver ✓ ✓ via Recursor³ — ✓ —
Serve-stale (RFC 8767) ✓ ✓ via Recursor³ — ✓ —
Blocklists ✓ RPZ via Recursor³ — ✓ ✓
Response rate limiting ✓ ✓ via dnsdist ✓ ✓ —
DNSSEC signing roadmap ✓ ✓ ✓ — —
DNSSEC validation roadmap ✓ via Recursor³ — ✓ ✓
DoT / DoH roadmap ✓ via dnsdist DoQ ✓ —
Dynamic updates (RFC 2136) roadmap ✓ ✓ ✓ — —
HTTP/JSON API ✓ stats only ✓ — — —
Built-in web UI ✓ — — — — —
Live event stream ✓ (SSE) — — — — —
Built-in multi-node replication ✓ — via DB backend — — —
Storage journaled files zone files / journals SQL, LMDB, BIND files zone files / LMDB — hosts files
Language PHP C C++ C C C

¹ local-data / auth-zone (secondary copies of zones), not a full authoritative server. ² auth-zone for simple local zones, can serve AXFR to secondaries. ³ PowerDNS Recursor and dnsdist are separate products; Knot's resolver is Knot Resolver.

Where SkyDNS fits: the established servers are excellent and battle-tested, and some do things SkyDNS does not (yet) — DNSSEC above all. SkyDNS's angle is one self-contained daemon that covers authoritative, transfers, resolver and blocklists, and is managed rather than configured: every change through an API and web UI, live, replicated across nodes, observable as events — in a language many network and web teams can read.

Quick start

Docker

git clone <repository-url> reactphp-dns-server && cd reactphp-dns-server
docker build --target runtime -t skydns:local -f docker/php/Dockerfile .
docker run -d --name skydns -p 53:53/udp -p 53:53/tcp -p 127.0.0.1:8053:8053 \
  -v "$PWD/skydns.yaml:/etc/skydns/skydns.yaml:ro" -v skydns-state:/var/lib/skydns \
  --read-only --tmpfs /tmp --cap-drop ALL --cap-add NET_BIND_SERVICE skydns:local
dig @127.0.0.1 www.example.com

A two-node HA cluster: docker compose -f deploy/compose.yaml up -d --build.

systemd

git clone <repository-url> /opt/skydns && cd /opt/skydns
composer install --no-dev --classmap-authoritative
useradd --system --home-dir /var/lib/skydns --shell /usr/sbin/nologin skydns
install -d -m 0750 -o root -g skydns /etc/skydns
install -m 0640 -o root -g skydns config/skydns.example.yaml /etc/skydns/skydns.yaml
install -m 0644 deploy/systemd/skydns.service deploy/systemd/skydns.socket \
    deploy/systemd/skydns-control.socket /etc/systemd/system/
systemctl daemon-reload && systemctl enable --now skydns.socket skydns-control.socket skydns.service

Requires PHP 8.6 with ext-uv, ext-sockets and ext-pcntl. A minimal skydns.yaml and the full walk-through are in Getting started.

Change DNS live

skydnsctl zone:create example.net
skydnsctl record:add example.net www A 192.0.2.10
skydnsctl blocklist:add ads.example
skydnsctl events            # watch it happen

Screenshots

Dashboard with live query rate, response codes, answer sources and query types

Zone editor with RRsets, SOA panel and transfer options Live query log in the dark theme
Zone editor: records grouped by RRset, SOA and transfer options Query log (dark theme), live tail with filters
Resolver cache statistics and blocklist in the dark theme High-availability view with peers and replication state
Resolver: cache hit ratio, flush, blocklist High availability: peers, roles, replication lag

Screenshots taken with the UI's built-in mock API (SKYDNS_WEB_MOCK=1 scripts/web.sh dev).

Documentation

Getting started Docker / systemd, first zone, web UI
Configuration every key, defaults, validation
Zones · Resolver · Transfers the DNS features
High availability clusters, split brain, keepalived, anycast
Security · Operations hardening, metrics, backups, upgrades
Management API · skydnsctl reference
Architecture async model, pipeline, storage and durability
FAQ & roadmap DNSSEC, DoT/DoH, RFC 2136, …

Development

Everything runs in Docker; no local PHP needed.

scripts/dev.sh composer install
scripts/gate.sh             # composer validate, php-cs-fixer, PHPStan level 10, PHPUnit

Conventions, architecture and the work process for contributors (human or agent) are in AGENTS.md.

Family

SkyDNS is a sibling of SkyDHCP, the asynchronous DHCP server on the same stack and conventions. Brand assets: docs/brand.

License

MIT — see LICENSE.