My App
DNS Panel

Installation & configuration

Requirements, install steps, the full environment-variable reference, first-admin setup, and the npm scripts for DNS Panel.

This page gets DNS Panel running: install dependencies, configure the environment, apply the database schema, and create the first admin user.

Requirements

  • Node.js 20.9+ (required by Next.js 16)
  • PostgreSQL — stores users, passkeys, passwords, zone permissions, and the audit log
  • Technitium DNS Server with the web API enabled (default port 5380)
  • A Technitium API token — create one under Administration → create API token

Install

Install dependencies from the project root:

npm install

Derive your environment file from the example, then fill in the values described below:

cp .env.example .env

Apply the database schema:

npm run db:migrate   # apply existing migrations
# or, for a quick local setup:
npm run db:push      # push the schema directly to the DB

Start the development server:

npm run dev

The panel is then available at http://localhost:3000.

Environment variables

VariableRequiredDescription
TECHNITIUM_URLyesBase URL of the Technitium server, e.g. http://localhost:5380/
TECHNITIUM_TOKENyesTechnitium API token
DATABASE_URLyesPostgreSQL connection string
SETUP_SECRETyesSecret that /setup requires to create the first admin
AUTH_SECRETyes*HMAC secret for session and passkey-challenge cookies (openssl rand -base64 48). Identical across all replicas.
RP_IDyesWebAuthn relying-party ID = the exact domain (no scheme, no port)
NEXTAUTH_URLyesFull origin URL of the domain
RP_NAMEnoDisplay name shown during passkey registration (default: DNS-Panel)
DEFAULT_CATALOGnoCatalog that new zones are added to (otherwise the first existing one)
SKIP_MIGRATIONSnotrue to skip running migrations on container start

* AUTH_SECRET is mandatory in production and whenever you run multiple replicas, otherwise cookies won't validate across instances. Generate a value with:

openssl rand -base64 48

RP_ID must equal the exact domain the panel is served on (no scheme, no port), and NEXTAUTH_URL must be the full origin of that domain. In production this origin must use https; http is only valid for localhost, because WebAuthn (passkeys) requires a secure context and will otherwise silently fail. For local development the defaults are RP_ID=localhost and NEXTAUTH_URL=http://localhost:3000.

Create the first admin

The panel has no seeded account. Create the first admin through the /setup route:

  1. Open /setup in the browser.
  2. Enter SETUP_SECRET, plus the admin email and name.
  3. Log in, then under Settings register a passkey and/or set a password.

See Authentication & permissions for how passkeys, passwords, and roles work after this point.

npm scripts

ScriptPurpose
npm run devDev server (Turbopack), port 3000
npm run buildProduction build
npm run startProduction server, port 3010
npm run lintESLint over app and lib
npm testUnit tests (node test runner)
npm run db:generateGenerate a migration from the schema
npm run db:migrateApply migrations
npm run db:pushPush the schema directly to the DB (local)
npm run db:studioDrizzle Studio (DB UI)

On this page