This guide covers the technical setup and runtime details for building and running Endee locally or with Docker.
Before installing, ensure your system meets the following hardware and operating system requirements.
- Linux: Ubuntu(22.04, 24.04, 25.04) Debian(12, 13), Rocky(8, 9, 10), CentOS(8, 9, 10), Fedora(40, 42, 43)
- macOS: Apple Silicon (M Series) only
The following packages are required for compilation:
clang-19, cmake, build-essential, libssl-dev, libcurl4-openssl-dev
Note: The build system requires Clang 19 or a compatible recent Clang version with C++20 support.
The easiest way to build ndd is using the included install.sh script. This script handles OS detection, dependency checks, and configuration automatically.
First, ensure the script is executable:
chmod +x ./install.shRun the script from the repository root. You must provide arguments for the build mode and/or CPU optimization.
./install.sh [BUILD_MODE] [CPU_OPTIMIZATION]You can combine one build mode and one CPU optimization flag.
| Flag | Description | CMake Equivalent |
|---|---|---|
--release |
Default optimized release build | |
--debug_all |
Enable full debugging symbols | -DND_DEBUG=ON -DDEBUG=ON |
--debug_nd |
Enable NDD-specific logging and timing | -DND_DEBUG=ON |
Select the flag matching your hardware to enable SIMD optimizations.
| Flag | Description | Target Hardware |
|---|---|---|
--avx2 |
Enable AVX2 (FMA, F16C) | Modern x86_64 Intel/AMD |
--avx512 |
Enable AVX512 (F, BW, VNNI, FP16) | Server-grade x86_64 (Xeon/Epyc) |
--neon |
Enable NEON (FP16, DotProd) | Apple Silicon / ARMv8.2+ |
--sve2 |
Enable SVE2 (INT8/16, FP16) | ARMv9 / SVE2-compatible systems |
Note: The
--avx512build configuration enforces runtime checks for required instruction sets. Your CPU must supportavx512,avx512_fp16,avx512_vnni,avx512bw, andavx512_vpopcntdqor the database will exit during initialization.
Build for production on Intel/AMD with AVX2:
./install.sh --release --avx2Build for debugging on Apple Silicon:
./install.sh --debug_all --neonUse run.sh to simplify local startup. It automatically detects the built binary and uses ndd_data_dir=./data by default.
First, ensure the script is executable:
chmod +x ./run.shThen run:
./run.shndd_data_dir=DIR: set the data directorybinary_file=FILE: set the binary file to runndd_auth_token=TOKEN: set the authentication token; leave empty to run without authentication
Run with a custom data directory:
./run.sh ndd_data_dir=./my_dataRun a specific binary:
./run.sh binary_file=./build/ndd-avx2Run with authentication enabled:
./run.sh ndd_auth_token=your_tokenRun with all options:
./run.sh ndd_data_dir=./my_data binary_file=./build/ndd-avx2 ndd_auth_token=your_tokenShow help:
./run.sh --helpIf you prefer to configure the build manually or integrate it into an existing install pipeline, use cmake directly.
mkdir build && cd buildRun cmake with the appropriate flags. Define the compiler manually if it is not your system default.
Debug options:
-DDEBUG=ONto enable debug symbols andO0-DND_DEBUG=ONto enable internal logging
SIMD selectors, choose one:
-DUSE_AVX2=ON-DUSE_AVX512=ON-DUSE_NEON=ON-DUSE_SVE2=ON
Example x86_64 AVX512 release configuration:
cmake -DCMAKE_BUILD_TYPE=Release \
-DUSE_AVX512=ON \
..make -j$(nproc)After a successful build, the binary is generated in the build/ directory.
The output binary name depends on the SIMD flag used during compilation:
ndd-avx2ndd-avx512ndd-neonorndd-neon-darwinon macOSndd-sve2
A symlink named ndd points to the binary compiled for the current build.
Some environment variables ndd reads at runtime:
NDD_DATA_DIR: defines the data directoryNDD_AUTH_TOKEN: optional authentication token
Open mode with no authentication is the default when NDD_AUTH_TOKEN is not set:
./build/ndd
curl http://{{BASE_URL}}/api/v1/index/listToken mode is enabled when NDD_AUTH_TOKEN is set:
export NDD_AUTH_TOKEN=$(openssl rand -hex 32)
./build/ndd
curl -H "Authorization: $NDD_AUTH_TOKEN" http://{{BASE_URL}}/api/v1/index/listRun the database using the AVX2 binary and a local data folder:
mkdir -p ./data
export NDD_DATA_DIR=$(pwd)/data
./build/nddAlternatively:
NDD_DATA_DIR=./data ./build/nddEndee ships with a Dockerfile for containerized deployment.
You must specify the target architecture using the BUILD_ARCH build argument. Valid targets are avx2, avx512, neon, and sve2. You can optionally enable a debug build using DEBUG=true.
docker build --ulimit nofile=100000:100000 --build-arg BUILD_ARCH=avx2 -t endee-oss:latest -f ./infra/Dockerfile .docker build --ulimit nofile=100000:100000 --build-arg BUILD_ARCH=neon --build-arg DEBUG=true -t endee-oss:latest -f ./infra/Dockerfile .The container exposes port 8080 and stores data in /data inside the container. Persist that data with a Docker volume.
docker run \
-p 8080:8080 \
-v endee-data:/data \
-e NDD_AUTH_TOKEN="your_secure_token" \
--name endee-server \
endee-oss:latestLeave NDD_AUTH_TOKEN empty or remove it to run Endee without authentication.
You can also use Docker Compose:
docker-compose upYou can run Endee directly using the prebuilt image from Docker Hub without building locally.
Create a new directory:
mkdir endee && cd endeeCreate a docker-compose.yml file with:
services:
endee:
image: endeeio/endee-server:latest
container_name: endee-server
ports:
- "8080:8080"
environment:
NDD_NUM_THREADS: 0
NDD_AUTH_TOKEN: ""
volumes:
- endee-data:/data
restart: unless-stopped
volumes:
endee-data:Then run:
docker compose up -dFor more details, visit docs.endee.io.