Sourcebot is a self-hosted tool that helps you understand your codebase.
Find a file
Paulo Gomes 2e3feca05f security: run Docker container as non-root user
Running containers as a non-root user is a long standing security practice.
The changes ensure that the sourcebot user is created and has the correct
level of permissions to run all its dependencies (postgres, redis and node).

Please note that as a side effect, existing mounted volumes would need to
have their ownership reviewed or it may not be able to access the files.
This is specially the case for previous versions that would create said
files as 0:0.

To fix that, users can run chown -R 1500:1500 /path/.sourcebot. The chmod
may also need to be a bit more strict in such cases, so changing that is
advised: chown -R 0750 /path/.sourcebot.

Signed-off-by: Paulo Gomes <pjbgf@linux.com>
2025-11-05 11:03:14 -08:00
.cursor/rules V4 (#311) 2025-05-28 16:08:42 -07:00
.github alter roadmap release update trigger 2025-11-01 15:17:51 -07:00
.vscode chore: Move helm chart to seperate repo (#549) 2025-10-03 15:45:36 -07:00
.yarn/releases v3 effort (#158) 2025-03-31 22:34:42 -07:00
configs update example configs to use v3 schema 2025-04-01 10:26:46 -07:00
docs feat(web,worker): Environment overrides (#597) 2025-11-04 21:22:31 -08:00
ee Search contexts (#273) 2025-04-24 22:28:13 -07:00
packages typo in linked account settings 2025-11-04 21:26:19 -08:00
schemas feat(web,worker): Environment overrides (#597) 2025-11-04 21:22:31 -08:00
vendor feat(connections): Add Azure Devops Support (#514) 2025-09-17 22:18:56 -07:00
.dockerignore v3 effort (#158) 2025-03-31 22:34:42 -07:00
.env.development feat(web,worker): Environment overrides (#597) 2025-11-04 21:22:31 -08:00
.gitignore v3 effort (#158) 2025-03-31 22:34:42 -07:00
.gitmodules update zoekt version 2025-04-01 10:38:50 -07:00
.yarnrc.yml v3 effort (#158) 2025-03-31 22:34:42 -07:00
_typos.toml chore: Misc typos (UI, docs, code...), Makefile PATH with spaces (#369) 2025-07-16 11:59:01 -07:00
CHANGELOG.md sourcebot v4.9.0 2025-11-04 21:29:33 -08:00
CONTRIBUTING.md chore: Misc typos (UI, docs, code...), Makefile PATH with spaces (#369) 2025-07-16 11:59:01 -07:00
docker-compose-dev.yml [dev + copy button] add / update local dev w/docker compose; add copy button to the right of filenames (#328) 2025-06-03 08:52:59 -07:00
Dockerfile security: run Docker container as non-root user 2025-11-05 11:03:14 -08:00
entrypoint.sh security: run Docker container as non-root user 2025-11-05 11:03:14 -08:00
fly.toml Use main for demo site 2024-10-30 09:35:06 -07:00
grafana.alloy v3 effort (#158) 2025-03-31 22:34:42 -07:00
LICENSE.md feat(ee): Add REST API to get users and delete a user (#578) 2025-10-28 17:05:47 -07:00
Makefile feat(web,worker): Environment overrides (#597) 2025-11-04 21:22:31 -08:00
package.json feat(web,worker): Environment overrides (#597) 2025-11-04 21:22:31 -08:00
prefix-output.sh fix(structured_logs): Remove prefix (#443) 2025-08-07 11:03:29 -07:00
public.pem Adds support for encrypted license keys (#335) 2025-06-05 22:18:52 -07:00
README.md Update README.md 2025-10-03 21:38:49 -07:00
supervisord.conf feat(web,worker): Environment overrides (#597) 2025-11-04 21:22:31 -08:00
yarn.lock feat(web,worker): Environment overrides (#597) 2025-11-04 21:22:31 -08:00

Sourcebot is a self-hosted tool that helps you understand your codebase.

  • Ask Sourcebot: Ask questions about your codebase and have Sourcebot provide detailed answers grounded with inline citations.
  • Code search: Search and navigate across all your repos and branches, no matter where theyre hosted.

Try it out in our public demo!

https://github.com/user-attachments/assets/ed66a622-e38f-4947-a531-86df1e1e0218

Features

Sourcebot Features

Ask Sourcebot

Ask Sourcebot gives you the ability to ask complex questions about your codebase in natural language.

It uses Sourcebot's existing code search and navigation tools to allow reasoning models to search your code, follow code nav references, and provide an answer that's rich with inline citations and navigable code snippets.

https://github.com/user-attachments/assets/8212cd16-683f-468f-8ea5-67455c0931e2

Search across all your repos/branches across any code host platform. Blazingly fast, and supports regular expressions, repo/language search filters, boolean logic, and more.

https://github.com/user-attachments/assets/3b381452-d329-4949-b6f2-2fc38952e481

Code Navigation

IDE-level code navigation (goto definition and find references) across all your repos.

https://github.com/user-attachments/assets/e2da2829-71cc-40af-98b4-7ba52e945530

Built-in File Explorer

Explore every file across all of your repos. Modern UI with syntax highlighting, file tree, code navigation, etc.

https://github.com/user-attachments/assets/31ec0669-707d-4e03-b511-1bc33d44197a

Deploy Sourcebot

Sourcebot can be deployed in seconds using our official docker image. Visit our docs for more information.

  1. Create a config
touch config.json
echo '{
    "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
    "connections": {
        // Comments are supported
        "starter-connection": {
            "type": "github",
            "repos": [
                "sourcebot-dev/sourcebot"
            ]
        }
    }
}' > config.json
  1. Run the docker container
docker run \
  -p 3000:3000 \
  --pull=always \
  --rm \
  -v $(pwd):/data \
  -e CONFIG_PATH=/data/config.json \
  --name sourcebot \
  ghcr.io/sourcebot-dev/sourcebot:latest
What does this command do?
  • Pull and run the Sourcebot docker image from ghcr.io/sourcebot-dev/sourcebot:latest.
  • Mount the current directory (-v $(pwd):/data) to allow Sourcebot to persist the .sourcebot cache.
  • Clones sourcebot at HEAD into .sourcebot/github/sourcebot-dev/sourcebot.
  • Indexes sourcebot into a .zoekt index file in .sourcebot/index/.
  • Map port 3000 between your machine and the docker image.
  • Starts the web server on port 3000.

  1. Visit http://localhost:3000 to start using Sourcebot

To configure Sourcebot (index your own repos, connect your LLMs, etc), check out our docs.

Note

Sourcebot collects anonymous usage data by default to help us improve the product. No sensitive data is collected, but if you'd like to disable this you can do so by setting the SOURCEBOT_TELEMETRY_DISABLED environment variable to true. Please refer to our telemetry docs for more information.

Build from source

Note

Building from source is only required if you'd like to contribute. If you'd just like to use Sourcebot, we recommend checking out our self-hosting docs.

If you'd like to build from source, please checkout the CONTRIBUTING.md file for more information.