BranchDB

Menu
Docs

Welcome to the official documentation for BranchDB

Gold

Getting Started

Before you start using Branch DB, you need to install it for your own operating system.

We provide a Docker image for easy deployment or you can build it from source.

Installation & Setup

Our recommended approach is to use the official Docker image. This handles all C++ build steps and dependencies for you.

Option A: Docker (Recommended)

You can pull the pre-built image from Docker Hub and run it directly.

1. Pull the Image:

> docker pull chandankhamitkar/branchdb

2. Run the Container:

> docker run -p 1981:1981 chandankhamitkar/branchdb

Option B: Build from Source

If you prefer to build the database from source, you will need a C++ toolchain and CMake installed.

Clone the Repository:

git clone https://github.com/ChandanKhamitkar/BranchDB.git

cd BranchDB

Quickstart

Build and Run:

mkdir build

cd build

cmake ..

cmake --build .

cd Debug

./BranchDB.exe

OR

If you are on BASH/UNIX terminal, directly run

./branchdb-run.sh

By default, Branch DB starts on port 1981.

Once the server is running on localhost:1981, you can connect using any TCP client or directly run commands via CLI.

Example session with telnet:

$ telnet localhost 1981

> AUTH RadheKrishn

OK AUTH

> SET mykey value

[OK] SET

> GET mykey

[OK] GET: key mykey -> value