CyborgDB can be deployed as a standalone microservice using Docker. This allows you to run a fully self-contained encrypted vector search service on your own infrastructure with minimal setup. The service exposes a REST API for integration with any stack.

Overview

The Docker service is ideal for teams looking to self-host CyborgDB in cloud, on-prem, or containerized environments.
1

Get an API Key

To use CyborgDB, you need an API key. You can get one from the CyborgDB Admin Dashboard.Make sure to keep your API key secure and do not share it publicly.
2

Choose Your Database Backend

CyborgDB service supports two database backends - choose based on your existing infrastructure:
  • PostgreSQL: Compatible with your existing PostgreSQL infrastructure
    • Managed services: AWS RDS, Azure Database for PostgreSQL, Google Cloud SQL, DigitalOcean Managed Databases
    • Self-hosted PostgreSQL instances
  • Redis: Compatible with your existing Redis infrastructure
    • Managed services: AWS ElastiCache, Azure Cache for Redis, Google Cloud Memorystore, Redis Cloud
    • Self-hosted Redis instances
All backends provide identical CyborgDB functionality. For more info, refer to this guide.
Make sure you have your chosen database running and accessible before proceeding.
3

Pull the Docker Image

The CyborgDB service is available as a Docker image. You can pull it from Docker Hub:
docker pull cyborginc/cyborgdb-service:latest
This image contains everything you need to run the CyborgDB service, including all dependencies and configurations.
4

Run with Docker (Quick Start)

sudo docker run -it --network host \
  -e CYBORGDB_DB_TYPE=postgres \
  -e "CYBORGDB_CONNECTION_STRING=host=localhost port=5432 dbname=postgres user=postgres password=your_password" \
  -e CYBORGDB_API_KEY=cyborg_your_api_key_here \
  cyborginc/cyborgdb-service:latest
Platform Differences:
  • Linux uses --network host because Docker runs natively and can directly access the host network
  • macOS uses -p 8000:8000 and host.docker.internal because Docker runs in a VM and needs port mapping
5

Run with Docker Compose (Recommended)

For a complete setup with database included, use Docker Compose:
Create a docker-compose.yml file:
version: '3.8'
services:
  cyborgdb:
    image: cyborginc/cyborgdb-service:latest
    ports:
      - "8000:8000"
    environment:
      - CYBORGDB_DB_TYPE=postgres
      - CYBORGDB_CONNECTION_STRING=host=postgres port=5432 dbname=cyborgdb user=cyborgdb password=secure_password
      - CYBORGDB_API_KEY=cyborg_your_api_key_here
    depends_on:
      - postgres
  
  postgres:
    image: postgres:15
    environment:
      - POSTGRES_DB=cyborgdb
      - POSTGRES_USER=cyborgdb
      - POSTGRES_PASSWORD=secure_password
    volumes:
      - postgres_data:/var/lib/postgresql/data
    ports:
      - "5432:5432"

volumes:
  postgres_data:
Then run:
docker-compose up -d
6

Verify Installation

Once the service is running, verify it’s working correctly:Health Check:
curl http://localhost:8000/v1/health
API Documentation: Navigate to http://localhost:8000/docs to explore the interactive API documentation.You should see a response indicating the service is healthy and ready to accept requests.
7

Advanced Configuration

For production deployments, consider these additional configurations:
VariableDescriptionRequiredExample
CYBORGDB_API_KEYYour CyborgDB API keycyborg_abc123...
CYBORGDB_DB_TYPEDatabase backend typepostgres or redis
CYBORGDB_CONNECTION_STRINGDatabase connection detailsSee connection formats
CYBORGDB_VERSIONService version (optional)0.11.1
PORTService port8000
SSL_CERT_PATHPath to SSL certificate file/etc/ssl/certs/server.crt
SSL_KEY_PATHPath to SSL private key file/etc/ssl/private/server.key
For more information on environment variables, refer to the this guide.
8

Next Steps

Now that your CyborgDB service is running, you can interact with it using client SDKs:Install Client SDKs:
pip install cyborgdb