Skip to main content
Version: 0.16

Bootstrap mode

The first time Stalwart is started without a config.json, it enters bootstrap mode. No mail services are started. The server listens on HTTP port 8080 (configurable with STALWART_RECOVERY_MODE_PORT) and serves only the WebUI and the management API, with the JMAP API restricted to a single object type: Bootstrap.

To enable the initial sign-in, Stalwart generates a temporary administrator account and prints the credentials to standard output:

════════════════════════════════════════════════════════════
🔑 Stalwart bootstrap mode - temporary administrator account

username: admin
password: iX8pG2uYq3vR7kNc

Use these credentials to complete the initial setup at the
/admin web UI. Once setup is done, Stalwart will provision a
permanent administrator and this temporary account will no
longer apply.

This password is shown only once. To pin a credential
instead, set STALWART_RECOVERY_ADMIN=admin:<password> in the
env file.
════════════════════════════════════════════════════════════
warning

The password is regenerated on every bootstrap start and is only printed once. It must be captured from the console before it scrolls out of view, or a credential can be pinned in advance through the STALWART_RECOVERY_ADMIN environment variable. When STALWART_RECOVERY_ADMIN is set, no temporary password is generated and the provided value is used instead.

With those credentials, http://<host>:8080/admin can be opened in a browser. The WebUI presents a setup wizard backed by the Bootstrap object, which collects the server hostname, the default domain, the storage backends, the directory used to authenticate users, and a handful of related settings. On completion of the wizard, Stalwart writes config.json, creates the permanent administrator account, provisions the remainder of the configuration, and restarts into normal operation. The temporary bootstrap account no longer applies after that point.

The setup wizard is the recommended path for new deployments because it validates every choice interactively and supplies sensible defaults. For deployments that must avoid the wizard, for example when installation is automated across many hosts, config.json can be written manually with the required datastore settings, and Stalwart can then be started in recovery mode to provision the remaining configuration through the CLI. The declarative deployments page describes this workflow in more detail.