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.
Option 1: the setup token
Section titled “Option 1: the setup token”When the container starts with no admin, it prints a one-time token to its logs:
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.
Choose your own token
Section titled “Choose your own token”Set SETUP_TOKEN (16 characters or more) to use a value you already know instead of reading the logs. It isn’t printed.
Option 2: environment variables
Section titled “Option 2: environment variables”Set these before the first start and the setup page is skipped:
ADMIN_EMAIL=you@example.comADMIN_PASSWORD=change-me-pleaseOr keep the password in a file, such as a Docker secret. One trailing newline is removed.
ADMIN_EMAIL=you@example.comADMIN_PASSWORD_FILE=/run/secrets/admin_passwordThe 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.
After setup
Section titled “After setup”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.
See also
Section titled “See also”- Setup token invalid: if the token is refused
- Users and sign-up: add more people after setup
- Admin commands: recover a locked-out admin