Skip to content

awkto/dnsinabox

Repository files navigation

DNS in a Box

A simple web GUI for managing DNS servers.

Features

  • Manage DNS zones and records (A, AAAA, CNAME, MX, TXT, NS, PTR, SRV)
  • Configure forwarders (global and conditional)
  • Bundled BIND9 or connect to external DNS servers
  • Dark/light theme

Quick Start

docker run -d \
  -p 53:53/udp -p 53:53/tcp \
  -p 8080:80 \
  -v dnsinabox-data:/data \
  dnsinabox

Access the UI at http://localhost:8080

Default login: admin / admin

Architecture

Single container with:

  • nginx - serves React frontend
  • FastAPI - REST API backend
  • SQLite - configuration database
  • BIND9 - DNS server (bundled mode)
┌─────────────────────────────────┐
│  dnsinabox container            │
│  ┌───────────┐ ┌─────────────┐  │
│  │  nginx    │ │  BIND9      │  │
│  │ (React UI)│ │  (DNS)      │  │
│  └─────┬─────┘ └──────▲──────┘  │
│        │              │         │
│  ┌─────▼──────────────┴──────┐  │
│  │  FastAPI + SQLite         │  │
│  └───────────────────────────┘  │
└─────────────────────────────────┘

Volumes

Path Purpose
/data SQLite database, zone files, config

Environment Variables

Variable Default Description
ADMIN_USERNAME admin Admin username
ADMIN_PASSWORD admin Admin password
SECRET_KEY (random) JWT signing key

Build from Source

# Clone the repository
git clone https://github.com/youruser/dnsinabox.git
cd dnsinabox

# Build the container
docker build -t dnsinabox .

# Run it
docker run -d \
  -p 53:53/udp -p 53:53/tcp \
  -p 8080:80 \
  -v dnsinabox-data:/data \
  dnsinabox

Or use docker-compose:

docker-compose up --build

Development

For development with hot reload, use the dev compose file:

docker-compose -f docker-compose.dev.yml up --build

This starts separate containers for backend, frontend, database, and BIND with hot reload enabled.

Roadmap

See TASKS.md for current progress and planned features.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published