Skip to main content
This guide will teach you how to deploy Sourcebot using Docker Compose. This is the simplest way to get started with Sourcebot, and should only take a couple minutes. If you are looking to deploy onto Kubernetes, see the Kubernetes (Helm) guide.

System requirements

  • RAM: Ensure your environment has at least 4GB of RAM. Insufficient memory may cause your Sourcebot deployment to be unstable.
  • Docker & Docker Compose: Make sure both are installed and up-to-date.
  • Node.js 18+: Required for the setup CLI
For a more detailed requirements breakdown, please check out our sizing guide.

Option 1: Setup CLI

The setup CLI will guide you through deploying Sourcebot and connecting it to your code hosts and LLM providers. This will create a new directory and generate a configuration file and Docker Compose file for you. Run the following command to get started:
npx setup-sourcebot
npx setup-sourcebot

Option 2: Manual steps

Obtain the Docker Compose file

Download the docker-compose.yml file from the Sourcebot repository.
curl -o docker-compose.yml https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml

Create a config.json

In the same directory as the docker-compose.yml file, create a configuration file. The configuration file is a JSON file that configures Sourcebot’s behaviour, including which repos to index, what language models to use, and more.
Create example config
touch config.json
echo '{
    "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
    // Comments are supported.
    // This config creates a single connection to GitHub.com that
    // indexes the Sourcebot repository
    "connections": {
        "starter-connection": {
            "type": "github",
            "repos": [
                "sourcebot-dev/sourcebot"
            ]
        }
    }
}' > config.json

Launch your instance

Update the secrets in the docker-compose.yml and then run Sourcebot using:
docker compose up
Navigate to http://localhost:3000 to access your Sourcebot instance.

Next steps

Congrats, you’ve deployed Sourcebot! Check out the following guides to learn more.

Configuration

Index your code

Connect Sourcebot to your code hosts and configure which repos to index.

Language model providers

Configure the LLM providers that power Ask Sourcebot.

Authentication

Set up SSO and configure how users sign in to your instance.

Sizing guide

Right-size your deployment based on the number of repos you’re indexing.

Features

Code search

Search and navigate across all your repos and branches.

Ask Sourcebot

Ask questions across all your repos and branches.

MCP

Code context layer for all your agents.