POST /autoinstall endpoint that performs the same first-time setup without a browser.
This guide shows how to complete the install programmatically and capture the generated credentials.
Before you start
- Databunker Pro deployed (see Docker Compose or Kubernetes / Helm).
- The
DATABUNKER_SETUPKEYenvironment variable set on the Databunker Pro container — this enables the/autoinstallendpoint (details below). - A reachable database. If you use a dedicated / managed database (e.g. AWS RDS), create the
databunkerdbdatabase and roles first — see Using an external database. - (Optional) a Databunker Pro license key. Without one, Databunker Pro runs in Trial mode.
How it works
Unattended installation is three HTTP calls against the Databunker Pro service:GET /status— wait until the service is up.GET /dbstatus— check whether setup is still required ({"installed": false}).POST /autoinstall— perform the setup and return the credentials.
Setup endpoints are ephemeral. While the vault is not yet installed, Databunker Pro runs a small setup server that hosts
/dbstatus, /setup, and /autoinstall. As soon as setup completes, that server shuts down and the container restarts in normal operational mode — where only the regular API (/status, /v2/*) is served and /dbstatus returns 404. That 404 is expected: it means the vault is already installed. (/dbstatus only ever returns a boolean installed flag — no sensitive data.)/autoinstall only when /dbstatus explicitly returns installed: false. Treat a 404, a connection error, or any other response as “already installed — skip.”
Enable the setup endpoint
The/autoinstall endpoint is only available when a setup key is configured. Set DATABUNKER_SETUPKEY (and the persistent DATABUNKER_WRAPPINGKEY) in the container environment before starting Databunker Pro — for Docker Compose, in .env/databunker.env:
Run the unattended install
Check whether setup is required
{"status":"ok","installed":false} means setup is needed. Any other outcome — installed: true, a 404 (the setup server has already shut down), or a connection error — means the vault is already installed, so skip /autoinstall.Run autoinstall
Send the setup key (and optional license key) as form fields:
- curl
- Python
Use
--data-urlencode (not -d): license keys are base64 and may contain + or /, which -d would corrupt.Verify
The setup server restarts the container in normal mode. Confirm it is serving, then use the root token for API calls:Using an external database
The bundled Docker Compose project provisions thedatabunkerdb database and its roles automatically. When you point Databunker Pro at a dedicated / managed database (AWS RDS, Cloud SQL, Azure Database), create them yourself first — connect as the database master user and run:
PGSQL_HOST, PGSQL_USER_NAME, PGSQL_USER_PASS, and PGSQL_SSL_MODE environment variables, then run the unattended install as above.
If you run multiple Databunker Pro instances against one shared database, they must all use the same
DATABUNKER_WRAPPINGKEY (only one instance runs /autoinstall; the others start against the already-installed database). The wrapping key must persist across restarts, or the vault cannot be reopened.Next steps
- Update your license key at any time after install.
- Rotate and back up your master (wrapping) key and Shamir key shares.