Skip to main content
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.
Looking to use the Python service? Check out our Python Quickstart Guide.

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.For quick evaluation, you can generate a temporary demo key using any of the SDKs:
import cyborgdb
print(cyborgdb.get_demo_api_key())
Then use the printed key as your CYBORGDB_API_KEY when starting the service, and as the api_key when connecting with an SDK client.Make sure to keep your API key secure and do not share it publicly.
2

Choose Your Database Backend (Optional)

For quick evaluation and testing, you can skip database setup entirely - the service will automatically use a built-in standalone instance.For production deployments or if you have existing database infrastructure, CyborgDB service supports two external database backends:
  • 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.
Standalone is for evaluation and testing only - For production use, configure an external PostgreSQL or Redis database.
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)

# Minimal configuration - uses built-in standalone
sudo docker run -it --rm --network host \
  -e CYBORGDB_API_KEY=cyborg_your_api_key_here \
  -v cyborgdb_data:/app/cyborgdb_data \
  cyborginc/cyborgdb-service:latest
Standalone is for evaluation and testing only. For production, use PostgreSQL or Redis.
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_API_KEY=${CYBORGDB_API_KEY}
    volumes:
      - cyborgdb_data:/app/cyborgdb_data
      - ./logs:/app/logs

volumes:
  cyborgdb_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/v1/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 type⚠️ Optional (defaults to standalone)standalone, postgres, redis, or memory
CYBORGDB_CONNECTION_STRINGDatabase connection details⚠️ Optional (defaults to standalone)See connection formats
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
If CYBORGDB_DB_TYPE and CYBORGDB_CONNECTION_STRING are not set, the service uses a built-in standalone database for evaluation. For production, configure an external database. For more information, refer to this guide.
  • Base Image: python:3.11-slim
  • Python Version: 3.11
  • PyTorch: CPU-optimized for maximum compatibility
  • Docker Image Size: ~1.8GB
  • Platform: linux/amd64, linux/arm64
  • Default Port: 8000
AspectPython ServiceDocker Service
Installationpip installdocker run
DependenciesManaged by pip/condaBundled in container
Resource UsageLower overheadHigher overhead
Environment IsolationPython virtualenvContainer isolation
Deployment ComplexitySimple Python deploymentContainer orchestration
ConfigurationEnvironment variables/filesEnvironment variables
Best ForDevelopment, Python-heavy workflowsProduction, cloud deployment
Both approaches provide identical CyborgDB functionality. Choose based on your deployment preferences and infrastructure requirements.