> ## Documentation Index
> Fetch the complete documentation index at: https://dnzwithazee.com/llms.txt
> Use this file to discover all available pages before exploring further.

# First run

> Create the first admin with the setup page, the dnz setup command, or environment variables.

A new DNZ has no users. There are three ways to create the first one, a **superadmin** who can do
everything, including managing other users, divisions and roles.

**Setup page**

While the database is empty, every page of the dashboard redirects to **/setup**:

**1. Admin account**

Username, name, e-mail and password. Passwords need at least 10 characters.

**2. First division**

Every zone belongs to a division, so name the first one (for example *IT*). You can add the
first zone here too.

**3. Forward DNS**

Pick a resolver preset (Cloudflare, Google, Quad9) or enter your own upstreams, then a
[forwarding strategy](/dns/forwarding#strategies).

You're signed in when it's done.

**dnz setup**

Without the web UI, run this on the server. It asks the same questions in the terminal:

```bash theme={null}
dnz setup
```

Or pass the answers, with the password in `DNZ_PASSWORD`:

```bash theme={null}
DNZ_PASSWORD='…' dnz setup --username admin --division IT \
  --upstream 1.1.1.1,9.9.9.9 --zone example.com
```

You're signed in to the CLI when it's done. See [CLI overview](/cli/overview).

**Environment (Docker)**

For automated installs, set the admin's password in the environment. When there are no users
yet, DNZ creates the admin at startup and skips the setup page.

```yaml docker-compose.yml theme={null}
environment:
  DNZ_ADMIN_USERNAME: admin        # optional, default "admin"
  DNZ_ADMIN_PASSWORD: change-me-please
```

This admin must choose a new password at the first sign-in.

## After the first sign-in

* Add the people who work with DNS and give them a role in a division. See
  [Users, divisions and roles](/admin/access).
* Check the server's time zone under **Settings → General**. Times in the UI and in notifications
  use it.
* Set up [notifications](/integrations/notifications) so you hear when an upstream goes down.
* Point your network at DNZ. See [Pointing clients at DNZ](/deploy/clients).

> [!TIP]
>
> To start over, **Settings → General → Factory reset** (or `dnz --reset --all`) erases everything
> and brings the setup page back. See [Settings](/admin/settings#factory-reset).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.