mirror of
https://github.com/Dodelidoo-Labs/sonobarr.git
synced 2026-04-17 20:58:02 -04:00
1.5 KiB
1.5 KiB
Super-admin Bootstrap Behavior
Scope
This document defines the startup bootstrap contract for the super-admin account.
Environment Variables
Sonobarr reads these variables from environment values:
sonobarr_superadmin_usernamesonobarr_superadmin_passwordsonobarr_superadmin_display_namesonobarr_superadmin_reset
If username or password is missing or blank, Sonobarr falls back to:
- Username:
admin - Password:
change-me
Startup Behavior
On startup, Sonobarr runs super-admin bootstrap once per process launch:
- If no admin exists yet, it creates the bootstrap user and sets admin privileges.
- If at least one admin exists and
sonobarr_superadmin_resetis not truthy, bootstrap exits without changes. - If
sonobarr_superadmin_resetis truthy and the configured bootstrap username already exists, Sonobarr updates its password, display name, and admin flag. - If
sonobarr_superadmin_resetis truthy and the configured bootstrap username does not exist, Sonobarr creates that user as admin.
Accepted truthy values for sonobarr_superadmin_reset are: 1, true, yes (case-insensitive).
Operational Notes
sonobarr_superadmin_resetis evaluated only at startup, so a restart is required.- Leave
sonobarr_superadmin_reset=falseduring normal operation. - For one-time recovery, set
sonobarr_superadmin_reset=true, restart once, then switch it back tofalse. - Reset targets only the configured bootstrap username; other admin users are not rewritten.