Introducing Virtual MCP Servers
LogoLogo
GithubJoin SlackSignupBook a Demo
  • Documentation
  • Self Hosted
  • Integrations
  • Guides
  • Enterprise
  • Architecture Overview
  • Enterprise Licensing Options
  • Running Locally
    • ai-gateway.yaml
  • Tenant & User Provisioning
  • Deployment Options
    • Using Docker Compose
    • Deploying on AWS Cloud
    • Using Kubernetes (Beta)
    • Deploying on GCP (Beta)
  • Resources
    • Multi Tenancy
    • Configuring Data Retention
    • Clickhouse Queries
    • Working with Models
Powered by GitBook
LogoLogo

Social

  • LinkedIn
  • X
  • Youtube
  • Github

Platform

  • Pricing
  • Documentation
  • Blog

Company

  • Home
  • About

Legal

  • Privacy Policy
  • Terms of Service

2025 LangDB. All rights reserved.

On this page
  • docker-compose.yaml
  • Next Steps

Was this helpful?

Export as PDF
  1. Deployment Options

Using Docker Compose

Launch LangDB locally via Docker Compose for fast development, and explore AWS or GCP guides for scalable cloud deployments.

PreviousTenant & User ProvisioningNextDeploying on AWS Cloud

Last updated 9 days ago

Was this helpful?

This guide walks through a simple deployment using Docker Compose. For scalable cloud-native deployments, see our and guides.

docker-compose.yaml

version: '3.8'

services:
  ai-gateway:
    # We will share be a private image that contains the ai-gateway-enterprise edition.
    # For reference, checkout our free image available in our Github repo.
    # https://github.com/langdb/ai-gateway
    
    image: <private-url>/ai-gateway-enterprise:latest
    ports:
      - "8083:8083"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    volumes:
      # ai-gateway.yaml is expected in the configuration folder.
      - config:/usr/langdb/
    container_name: "langdb-ai-gateway"
    
  clickhouse:
    image: clickhouse/clickhouse-server:latest
    ports:
      - "8123:8123"
      - "9000:9000"
    ulimits:
      nofile:
        soft: 262144
        hard: 262144
    extra_hosts:
      - "host.docker.internal:host-gateway"
    container_name: "langdb-clickhouse"
    
  postgres:
    image: postgres:latest
    container_name: langdb-cloud-enterprise-pg
    environment:
      POSTGRES_USER: langdb
     # Note: Include your postgres password as specified in ai-gateway.yaml
      POSTGRES_PASSWORD: XXXXX
      POSTGRES_DB: langdb_staging
      ALLOW_IP_RANGE: 0.0.0.0/0
    ports:
      - "5438:5432"
    command: postgres -c 'max_connections=1000'
    volumes:
      - postgres_data:/var/lib/postgresql/data
      
  redis:
    image: redis:latest
    restart: always
    ports:
      - "6379:6379"
    volumes:
      - redis_data:/root/redis
    environment:
      # Note: Include your redis password as specified in ai-gateway.yaml
      - REDIS_PASSWORD=XXXXX
      - REDIS_PORT=6379
      - REDIS_DATABASES=16
      
volumes:
  config:
  postgres_data:
  redis_data:
  

Refer to ai-gateway.yaml for configuring ai-gateway.

Next Steps

  • For full observability and ClickHouse tracing, refer to the Clickhouse Queries.

For cloud-scale deployment, see and.

AWS
GCP
AWS guide
GCP guide