- PHP 87.6%
- Vue 6.2%
- TypeScript 4.9%
- Shell 0.6%
- CSS 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| bin | ||
| config | ||
| deploy | ||
| docker/php | ||
| docs | ||
| phpstan/stubs | ||
| scripts | ||
| src | ||
| tests | ||
| web | ||
| .dockerignore | ||
| .gitignore | ||
| .php-cs-fixer.dist.php | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| composer.json | ||
| composer.lock | ||
| LICENSE | ||
| phpstan.neon.dist | ||
| phpunit.xml.dist | ||
| README.md | ||
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,
skydnsctland the web UI all run together inbin/skydnsd;scripts/gate.sh(unit/integration) andscripts/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
YYYYMMDDnnserials 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_SERVICEotherwise. - 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 (SIGHUPor 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
![]() |
![]() |
| Zone editor: records grouped by RRset, SOA and transfer options | Query log (dark theme), live tail with filters |
![]() |
![]() |
| 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.




