Databunker: Getting started guide (5 minutes)

Step 1: Starting the Databunker container

The easiest way to start using Databunker is by running it as a Docker container. Once the container is running, Databunker opens port 3000 and listens for incoming requests.

To launch Databunker with a DEMO root access key, ideal for local testing and development, use the following command:

docker run -p 3000:3000 -d --rm --name databunker securitybunker/databunker demo

For detailed installation instructions, please refer to the full installation guide.

Step 2: Creating a User Record

Databunker’s most popular API request is to store user records. For each new user record, Databunker generates and returns a user token in UUID format.

GDPR Relevance:

  • Under GDPR, this user token is referred to as a pseudonymized identity. This token can be safely stored in your regular database or logs, as long as no additional personal information is stored with it.
  • Pseudonymization reduces the risk of directly associating personal data with an individual, reinforcing data protection and privacy principles.
  • For instance, when you receive a Right to be forgotten (RTBF) request, you can remove the personal data from Databunker without affecting other systems.

Use this command to create the user record:

curl -s http://localhost:3000/v1/user \
  -X POST -H "X-Bunker-Token: DEMO" \
  -H "Content-Type: application/json" \
  -d '{"first":"John","last":"Doe","login":"john","phone":"4444","email":"user@gmail.com"}'

Output:

{"status":"ok","token":"eeb04dd7-ecb2-c957-2875-5b98897b21a6"}

Step 3: Retrieving user record

You can retrieve user records using indexed fields, such as email address, login name, user token, or custom index.

To fetch customer records by user token, use this command:

curl -s -H "X-Bunker-Token: DEMO" -X GET http://localhost:3000/v1/user/token/eeb04dd7-ecb2-c957-2875-5b98897b21a6

You can integrate Databunker into your application’s sign-in logic and search for customer records using an email address or login name:

curl -s -H "X-Bunker-Token: DEMO" -X GET http://localhost:3000/v1/user/email/user@gmail.com
curl -s -H "X-Bunker-Token: DEMO" -X GET http://localhost:3000/v1/user/login/john

Full lists of API requests:

For a full list of available requests, please check the API documentation.

Step 4: Accessing the Web UI

Databunker includes a built-in web UI. For quick access, we’ve pre-installed Databunker, which you can access at: demo.databunker.org. Use the DEMO root token to access the admin panel.

If you deploy Databunker using Docker, this interface is available by default at: localhost:3000. In the demo version, the root token is set to DEMO by default.

The admin or Data Protection Officer (DPO) can use the web interface to:

  1. Delete user records to comply with GDPR RTBF “forget me” requests
  2. Generate personal data reports and review audit logs
  3. Manage personal data processing activities

End-User Access:

Databunker’s optional customer portal lets users securely access, manage, and update their personal data, supporting GDPR compliance. Key features include secure login, data review, and audit log access. If you created a sample user with the phone number 4444, as shown in the Creating a User Record section, you can use 4444 as both the phone number and password to access the customer portal.

Step 5: View Node.js code examples

  1. Passwordless Login with Databunker: GitHub Repository

  2. Node.js Example with Passport.js, Magic.Link, and Databunker: GitHub Repository

  3. Secure Session Storage for Node.js Apps: Detailed Guide

Node.js modules

  1. @databunker/store from https://github.com/securitybunker/databunker-store

  2. @databunker/session-store from https://github.com/securitybunker/databunker-session-store