Method 1: Quick installation
- The easiest way to start using Databunker is to deploy it as a standard Docker container with minimal parameters.
- In this setup, it uses an internal SQLite database to store encrypted records.
- You can use
DEMOas a root token when making API requests
- Utilizes a local SQLite database for storing encrypted records
- Lack of security; using
DEMOas a root access token - Not recommended for production use
Note:
- If the databunker container stops, you can restart the service by running
docker start databunker. - For production environments, we recommend using a MySQL or PostgreSQL backend instead.
Method 2: Start Databunker and backend db with docker compose
We prepared a number of scripts and configuration files you can use with Docker Compose. All these files are available in the project’s github repository. Before starting Docker Compose, you need to generate several secret variables used by the containers. These variables include:- Passwords for MySQL or PostgreSQL databases
- A self-signed SSL certificate
- Databunker root token, and more
.env/databunker-root.env file. This value is used as the root token when making Databunker API requests.
The required secret files will be saved in the .env directory. Use one of the following scripts from the project’s GitHub repository to generate configuration secrets:
- ./generate-mysql-env-files.sh
- ./generate-mysql-demo-env-files.sh
- ./generate-pgsql-env-files.sh
- ./generate-pgsql-demo-env-files.sh
Method 3: Automatic deployment in AWS cloud
We have built Terraform configuration files and Helm charts to deploy Databunker with all required components in AWS. Detailed instructions can be found here:- https://github.com/securitybunker/databunker/tree/master/terraform/aws
- https://github.com/securitybunker/databunker/tree/master/charts/databunker
Method 4: Step-by-step production installation
Start with backend database For production installation, you can use MySQL or PostgreSQL backend databases. This databse will be used to store encrypted user records. For example, you can spin MySQL or PostgreSQL as a container or use a cloud RDS version provided by Google Cloud and AWS, etc… For example, use the following command to start MySQL server. It will create adatabunkerdb database for Databunker and create bunkeruser for Databunker access to MySQL.
Note: make sure to change the passwords above.
First Databunker initialization step
Before Databunker can serve user requests it needs to create all tables; generate a master encryption key if not provided; generate root access token if not provided. This process is called Databunker initialization. You will need to do it just for the first time.
Run the following command to initialize Databunker:
Master key and API Root token values.
Start the Databunker service
After extracting DATABUNKER_MASTERKEY you can start the Databunker service using the following command:
Advanced configuration
Databunker uses thedatabunker.yaml configuration file. You can modify this file to set custom email gateway, SMS gateway, service logo, and more.
There are several ways to load a new configuration file in Databunker:
- Build a new Docker container based on Databunker’s Dockerfile and include your custom configuration file inside it
- Create a new configuration file and mount it to the Databunker container
./conf directory and download the default configuration file in it:
SSL certificates
You can generate SSL certificates and place them in the/databunker/certs directory in the running container.
Use the following command to generate self-signed certificate:
/databunker/certs directory inside container to the ~/certs/ directory as: