Deploy SourceBot

Sourcebot 5.1 fast code search across your repositories, with MCP.

Deploy SourceBot

/data

/var/lib/postgresql/data

Just deployed

/data

Deploy and Host Sourcebot on Railway

Sourcebot is a self-hosted code search and navigation tool. It indexes repositories from GitHub, GitLab, Bitbucket, Gitea and plain Git with Zoekt, then offers fast regex and symbol search, cross-repository navigation, a code browser, an API and an MCP server so AI agents can search your codebase.

About Hosting Sourcebot

This template deploys Sourcebot v5.1.14 from a public wrapper repository, with Railway Postgres, Railway Redis and a volume for clones and search indexes. On first start the wrapper signs in once with the configured admin credentials, which makes that account the owner before anyone else can. Later sign-ups need owner approval. Set SOURCEBOT_REPOS to a list of GitHub repositories to index, and add a GITHUB_TOKEN for private ones, or configure connections in the UI. Indexing uses memory, so plan for at least 2 GB with larger repositories. Search results link straight into the built-in code browser.

Common Use Cases

  • Searching code across many repositories in one place
  • Giving AI coding agents code search over MCP
  • Onboarding engineers onto large or unfamiliar codebases

Dependencies for Sourcebot Hosting

  • aalfath/sourcebot-railway-template (wrapper around ghcr.io/sourcebot-dev/sourcebot:v5.1.14)
  • Railway Postgres (ghcr.io/railwayapp-templates/postgres-ssl:18) with a volume
  • Railway Redis with a volume
  • A Railway volume at /data

Deployment Dependencies

Implementation Details

ServiceSourceNetworkingStorage
sourcebotaalfath/sourcebot-railway-templatepublic domain on 3000volume at /data
PostgresRailway Postgres 18private onlyvolume
RedisRailway Redisprivate onlyvolume
SOURCEBOT_REPOS=your-org/api,your-org/web
GITHUB_TOKEN=ghp_...   # only for private repositories
VariableDefaultPurpose
SOURCEBOT_ADMIN_EMAIL / SOURCEBOT_ADMIN_PASSWORDadmin@example.com / generatedOwner account, claimed on first start
SOURCEBOT_REPOSrailwayapp/cliGitHub repositories to index
AUTH_SECRET / SOURCEBOT_ENCRYPTION_KEYgeneratedSession signing and secret encryption
REDIS_URLRedis reference with ?family=0Queue; the suffix enables IPv6 lookups

Notes:

  • Setting CONFIG_PATH to your own declarative config file takes precedence over SOURCEBOT_REPOS.
  • The web UI and API need a signed-in user; create API keys in settings for scripts and MCP clients.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by the Sourcebot project or its maintainers.

Why Deploy Sourcebot on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Sourcebot on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
47
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51