Skip to content

Deploying Onyx Community Edition

Introduction

Onyx Community Edition (formerly Danswer) is an open-source AI-powered enterprise search and chat assistant that connects to your organization’s documents and knowledge bases. It enables teams to ask questions in natural language and receive accurate answers sourced from internal documentation, Slack conversations, Confluence pages, GitHub repositories, and many other data sources.

Built with Python, TypeScript, and leveraging modern LLM technology, Onyx provides a ChatGPT-like experience tailored to your organization’s specific knowledge. The platform includes built-in connectors for popular enterprise tools and supports custom connector development.

Key features of Onyx include:

  • Natural Language Search: Ask questions in plain English and get contextual answers
  • Multi-Source Connectors: Connect to Slack, Confluence, Google Drive, GitHub, Notion, and 30+ other sources
  • Citation and Sources: Every answer includes citations to original source documents
  • Permission Aware: Respects existing document permissions from connected sources
  • Chat Interface: Conversational AI assistant for follow-up questions
  • Custom Personas: Create specialized assistants for different teams or topics
  • Self-Hosted LLM Support: Use OpenAI, Anthropic, or self-hosted models
  • Enterprise Ready: SSO, audit logs, and team management features

This guide walks through deploying Onyx Community Edition on Klutch.sh using Docker.

Why Deploy Onyx on Klutch.sh

Deploying Onyx on Klutch.sh provides organizations with a private AI assistant:

Data Privacy: Keep your organization’s documents and search queries on infrastructure you control rather than sending them to third-party services.

Persistent Storage: Store vector embeddings and indexed documents with persistent volumes that survive updates.

Scalable Resources: Allocate CPU and memory based on document volume and query load.

HTTPS by Default: Secure access to your AI assistant with automatic SSL certificates.

Custom Domains: Provide a memorable URL for your team to access the search assistant.

Prerequisites

Before deploying Onyx on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your deployment
  • An LLM API key (OpenAI, Anthropic, or compatible provider)
  • A PostgreSQL database instance
  • Basic familiarity with Docker and Python applications

Deploying Onyx on Klutch.sh

    Set Up Required Services

    Onyx requires PostgreSQL and a vector database (Vespa or Qdrant). Deploy these services on Klutch.sh or use external instances.

    Create Your Dockerfile

    Create a Dockerfile in your repository:

    FROM python:3.11-slim
    # Install system dependencies
    RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*
    # Clone Onyx repository
    WORKDIR /app
    RUN git clone https://github.com/onyx-dot-app/onyx.git .
    # Install Python dependencies
    WORKDIR /app/backend
    RUN pip install --no-cache-dir -r requirements.txt
    # Build frontend
    WORKDIR /app/web
    RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
    && apt-get install -y nodejs \
    && npm install && npm run build
    WORKDIR /app
    EXPOSE 3000 8080
    COPY start.sh /start.sh
    RUN chmod +x /start.sh
    CMD ["/start.sh"]

    Create Startup Script

    Create start.sh to start both backend and frontend:

    #!/bin/bash
    cd /app/backend
    python -m uvicorn danswer.main:app --host 0.0.0.0 --port 8080 &
    cd /app/web
    npm start

    Push to GitHub

    Commit and push your Dockerfile and scripts to your GitHub repository.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project.

    Create and Configure the App

    Create a new app and connect it to your GitHub repository.

    Configure HTTP Traffic

    Set the traffic type to HTTP with an internal port of 3000 for the web interface.

    Set Environment Variables

    Configure required environment variables:

    VariableDescription
    POSTGRES_HOSTPostgreSQL host address
    POSTGRES_USERDatabase username
    POSTGRES_PASSWORDDatabase password
    OPENAI_API_KEYOpenAI API key (or alternative LLM key)
    SECRET_KEYApplication secret key

    Attach Persistent Volumes

    Add persistent storage:

    Mount PathRecommended SizePurpose
    /app/data50+ GBDocument index and embeddings
    /app/storage10 GBFile storage

    Deploy Your Application

    Click Deploy to build and launch your Onyx instance.

    Configure Connectors

    Access your deployment and configure connectors to your organization’s data sources through the admin interface.

Additional Resources