Skip to content

First-run setup

A new Day Planner has no accounts. Until the first admin exists, every page redirects to /setup. This guide explains the two ways to create that admin.

When the container starts with no admin, it prints a one-time token to its logs:

Terminal window
docker compose logs app | grep setup_token=
admin bootstrap: no admin yet. Open /setup and enter this token:
setup_token=Wq3v…

Open your Day Planner URL, enter the token, then fill in:

  • your name, email and password (8 to 128 characters)
  • your timezone, working hours and working days, saved as your Working schedule preference
  • which default spaces to create (Personal, Work)
  • who can sign up: only accounts you create, invite-only, or anyone
  • optionally, an API key for agents, shown once

Finish setup creates everything at once and signs you in. After that, /setup returns 404 and the token no longer works.

The token proves you can see the server’s logs, so a stranger who finds your new URL first can’t make themselves admin.

Set SETUP_TOKEN (16 characters or more) to use a value you already know instead of reading the logs. It isn’t printed.

Set these before the first start and the setup page is skipped:

Terminal window
ADMIN_EMAIL=you@example.com
ADMIN_PASSWORD=change-me-please

Or keep the password in a file, such as a Docker secret. One trailing newline is removed.

Terminal window
ADMIN_EMAIL=you@example.com
ADMIN_PASSWORD_FILE=/run/secrets/admin_password

The container refuses to start if both password settings are set, if the file is missing or empty, or if the password is shorter than 8 characters.

Timezone and working hours then use defaults. Change the timezone with the user API and the hours with the schedule preferences API.

Once any admin exists, these settings are ignored on every later start, so leaving them in .env is safe. To reset a forgotten password, use the admin commands.