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:
DATABUNKER_SETUPKEY is only needed to run the unattended install — once the vault is installed you can remove it, and the setup endpoint stays disabled. DATABUNKER_WRAPPINGKEY, on the other hand, must persist for the life of the vault: it is the wrapping key that unlocks the encrypted database on every start, so the container cannot open the vault without it. The PGSQL_* and REDIS_* keys point the container at your backing stores.
Then reference that file from the Databunker Pro service in docker-compose.yml:
DATABUNKER_WRAPPINGKEY and DATABUNKER_SETUPKEY are loaded from .env/databunker.env, so the /autoinstall endpoint is enabled as soon as the container comes up.
Run the unattended install
1
Wait until Databunker Pro is ready
Poll
GET /status until it returns 200 OK:2
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.3
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.4
Save the generated credentials
On success the response contains the vault credentials:Store all of these in your secrets manager immediately.
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.
- Learn how to issue scoped credentials in the Authentication reference.