diff --git a/content/2.getting-started/2.installation.md b/content/2.getting-started/2.installation.md index 1adc920..d99f588 100644 --- a/content/2.getting-started/2.installation.md +++ b/content/2.getting-started/2.installation.md @@ -38,6 +38,19 @@ postal initialize postal make-user ``` +### Non-interactive admin user creation + +`postal make-user` is interactive by default. For automated or unattended setups (e.g. CI, docker-compose init scripts), you can run it non-interactively by setting all four of these environment variables before invoking the command: + +```bash +POSTAL_INITIAL_USER_EMAIL=admin@example.com +POSTAL_INITIAL_USER_FIRST_NAME=Admin +POSTAL_INITIAL_USER_LAST_NAME=User +POSTAL_INITIAL_USER_PASSWORD=... +``` + +In this mode, `make-user` upserts by e-mail address: it creates a new user if no record with that e-mail exists, or updates the first name, last name, and password of the existing record otherwise. The command is safe to re-run on subsequent boots. + ## Running postal You're now ready to actually run Postal itself. You can go ahead and do this by running: