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 dependenciesRUN apt-get update && apt-get install -y \ build-essential \ curl \ git \ && rm -rf /var/lib/apt/lists/*
# Clone Onyx repositoryWORKDIR /appRUN git clone https://github.com/onyx-dot-app/onyx.git .
# Install Python dependenciesWORKDIR /app/backendRUN pip install --no-cache-dir -r requirements.txt
# Build frontendWORKDIR /app/webRUN 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.shRUN chmod +x /start.sh
CMD ["/start.sh"]Create Startup Script
Create start.sh to start both backend and frontend:
#!/bin/bashcd /app/backendpython -m uvicorn danswer.main:app --host 0.0.0.0 --port 8080 &
cd /app/webnpm startPush 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:
| Variable | Description |
|---|---|
POSTGRES_HOST | PostgreSQL host address |
POSTGRES_USER | Database username |
POSTGRES_PASSWORD | Database password |
OPENAI_API_KEY | OpenAI API key (or alternative LLM key) |
SECRET_KEY | Application secret key |
Attach Persistent Volumes
Add persistent storage:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/app/data | 50+ GB | Document index and embeddings |
/app/storage | 10 GB | File 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.