A self-hostable authoritative DNS server with a web dashboard and admin panel.
apps/control is the web dashboard and admin panel, along with being the source of truth for zone info and records
apps/nameserver is the actual DNS server that responds to queries, it gets its data from control
packages/types is a package of types that are shared between control and nameserver
- Bun 1.3 or newer
- PostgreSQL
- (for production) a domain name where you can set glue records for nameservers, and a minimum of 1 server with a public IP (but ideally 2 servers)
Clone and install deps:
git clone https://github.com/cyteon/raincloud.git
cd raincloud
bun installCopy apps/control/.env.example to apps/control/.env and fill in the DATABASE_URL
Run migrations:
bun db:migrateStart the dashboard in dev:
bun dev:controlGo to http://localhost:3000 and create an account, then make yourself admin by setting is_admin to true in the database:
UPDATE users SET is_admin = true WHERE email = 'you@example.com';Go to http://localhost:3000/admin/ns and create a nameserver, copy down the token thats shown.
Copy apps/nameserver/.env.example to apps/nameserver/.env and fill out the vales
Start the nameserver:
bun dev:nsAdd a zone on the dashboard and add some records, then test it with dig:
dig @localhost -p 5354 example.com ABuild and run the dashboard (you might want to run it with pm2 or systemd), behind a reverse proxy for TLS:
cd apps/control
bun run build
bun .output/server/index.mjsNameserver:
cd apps/nameserver
PORT=53 sudo bun startFor actual production you will need to set up glue records for your nameservers (for example ns1.example.com and ns2.example.com) with your domain registrars.
- Common DNS types (A, AAAA, CNAME, NS, PTR, TXT, MX, SRV, CAA)
- Per-record TTL
- Auto generated SOA records
- DNSSEC
- Wildcard records
- ALIAS/ANAME records
- CNAME flattening
- Zone creation and deletion
- Record creation and deletion
- Record editing
- Analytics
- BIND export and import
- Record searching and filtering
- AXFR / IXFR, w/ TSIG
- Rest API for record managment
- API key creation / deletion
- API key scoping
- API docs
- Basic nameserver status display
- Improved health checks
- Continuous NS record checks for zones