Documentation Index
Fetch the complete documentation index at: https://specterops-enable-tls-feedback.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Switch between PostgreSQL and Neo4j backends
- Run multiple BHCE instances on a single machine
Prerequisites
BloodHound CE deploys in a traditional multi-tier container architecture consisting of database, application, and UI layers. To complete installation, ensure your system meets the following requirements:| Minimum specifications | For large environments (>50K users) |
|---|---|
| 8GB of RAM | 96GB of RAM |
| 4 processor cores | 12 processor cores |
| 10GB hard disk space | 50GB hard disk space |
During startup, BloodHound CE runs initial graph analysis that may continue for about the first minute after launch. On low-memory hosts, sending API requests immediately after container startup can cause the
bloodhound container to terminate with exit code 137 (out of memory).To avoid this behavior, allocate at least 8GB of RAM or wait for startup processing to complete before running API automation tasks such as user creation.Install with Docker Compose
This installation method provides more control over each configuration file and works well for running multiple BHCE instances on a single machine.Install Docker Desktop
Follow the instructions in the Docker documentation to install Docker Desktop for your operating system.
Docker Desktop must be running to build and test BHCE. Start Docker Desktop on your machine.
Create installation directory
Create a new directory on your machine to hold the BHCE configuration files.
Download configuration files
Download the following configuration files:
Start BloodHound
Now that your files are ready, you can bring the containers up using the following command:
You only need to perform this step once. In the future, you can use the Docker Desktop application to start and turn off BloodHound. You can still use the CLI to bring the containers
up or down if you prefer.Build from source
You can also build the BHCE code from source if you plan on contributing to the project or customizing the application beyond what is possible with configuration files.Prerequisite
The following table lists the minimum requirements to build BHCE from source:These requirements are higher than the minimum specifications needed to run BHCE.
Set up your environment
The code repository contains all the necessary files to build BHCE. Follow these steps to set up your development environment:Start Docker Desktop
Docker Desktop must be running to build and test BHCE. Start Docker Desktop on your machine.
Install dependencies
Use the following command to install project dependencies and initialize the environment:
Compile BHCE
The BloodHound team maintains a Python tool called The build process generates all artifacts in the
stbernard for building and testing the project.To build locally, run the following command:dist/ directory.Customizations
This section describes common customizations you can make to your BHCE installation.Change backend database
PostgreSQL provides significant advantages over Neo4j as a backend database, particularly in terms of query performance and speed.For information on supported Cypher syntax in PostgreSQL, see Supported Cypher Syntax.
PostgreSQL
If you are currently using a Neo4j backend database and want to change to PostgreSQL, follow these steps.Add the PostgreSQL graph driver
Modify the This is an example of adding the line between
bloodhound.config.json file and add a line in the main section to use PostgreSQL as the graph driver:default_password and log_level, but it can be anywhere at the top level.Remove the Neo4j service
Modify the
docker-compose.yml file to remove the Neo4j service and its dependencies.-
Delete the
graph_dbsection: -
Delete the two lines at the end of the
bloodhoundsection: -
Delete the following line from the
volumessection:The following is the complete modifieddocker-compose.ymlfile for PostgreSQL:
Neo4j
If you are currently using a PostgreSQL backend database and want to change to Neo4j, follow these steps.Enable Transport Layer Security (TLS)
To secure BHCE with HTTPS, add your certificate information to thetls block in the bloodhound.config.json file. Then, make the certificate files available in the BloodHound container with volume mounts in the docker-compose.yml file.
After you set both
cert_file and key_file, BloodHound uses HTTPS on that port instead of HTTP.Obtain a TLS certificate and key
For a local or testing deployment, generate a self-signed certificate and key with
openssl:Self-signed certificates are appropriate for local testing only. For any shared or production deployment, use a certificate issued by a trusted certificate authority (CA).
Move the certificate and key to a mountable directory
Create a directory next to your
docker-compose.yml and bloodhound.config.json files and move the certificate and key into it. The examples on this page use a directory named cert:Configure TLS settings
In the
bloodhound.config.json file, set cert_file and key_file to the paths where the certificate and key will be available inside the container.These values must match the container-side destination of the volume mount you add in the next step, not the location of the files on your host:bloodhound.config.json
Mount the certificate directory
In the
docker-compose.yml file, mount both the bloodhound.config.json file and the cert directory into the bloodhound service as read-only volumes:docker-compose.yml
By default, the
volume mount for the bloodhound service is commented out. Make sure to uncomment it before you continue. Otherwise, the container ignores your custom configuration and continues to serve plain HTTP.Start BloodHound and verify HTTPS
Bring up (or recreate) the
bloodhound container so the new volume mounts and configuration take effect:Verify HTTPS
Browse to
https://127.0.0.1:8080 and confirm that BloodHound loads over HTTPS.The default URL is http://127.0.0.1:8080, so make sure to change the protocol to https:// in the address bar.The listening port is unchanged. TLS is negotiated on the same port that the BloodHound service binds to by default (8080).Browsers display a certificate warning when you use a self-signed certificate; this is expected and does not occur with a CA-issued certificate.
Run multiple instances simultaneously
You might want to run multiple BHCE instances to:- Test a Neo4j backend alongside a PostgreSQL backend
- Evaluate a new version of BHCE without affecting your current installation
- Isolate data for different engagements
You must bind each instance to a different port on your machine. The steps below show you which settings to edit.
Change default BHCE port
In the
docker-compose.yml file, update the BloodHound service port binding to use a different port.The following example uses port 8585 instead of the default 8080 port:Change Neo4j web console port
If you are running multiple Neo4j databases, update the Neo4j web console port binding in the You must also update the health check to use the new port:
docker-compose.yml file to use a different port.The following example uses port 7575 instead of the default 7474 port:The Neo4j database port
7687 runs only inside the Docker container, so you do not need to change it.Expose BHCE outside of localhost
You might need to access your BHCE instance from another computer than the one it is installed on. The default installation does not
expose the port outside of localhost. To do it, you will need to change the IP address that the BloodHound UI binds to.
In the docker-compose.yml file, update the BloodHound service port binding to use a different IP Address.
The following example uses IP 0.0.0.0 to bind the port 8080 to all interfaces and IP Addresses on the machine. If the machine has multiple IP Addresses, you can set that specific IP Address.