Sourcegraph Server

Build Better Software with Code Intelligence and Code Search

Sourcegraph is a free, self-hosted code search and intelligence server that helps developers find, review, understand, and debug code. Use it with any Git code host for teams from 1 to 10,000.  Get started quickly: install the Sourcegraph docker image on your private code. Upgraded features start at $4/user/month.

Quickstart: Run this command, wait for the server to be ready, then visit http://localhost:7080.

docker run --publish 7080:7080 --rm -v ~/.sourcegraph/config:/etc/sourcegraph -v ~/.sourcegraph/data:/var/opt/sourcegraph -v /var/run/docker.sock:/var/run/docker.sock sourcegraph/server:2.12.0

Powerful, Flexible Queries

Use regular expressions and exact queries to perform full-text searches. Our robust query syntax helps you easily narrow your search.

Highly Scalable

Search across 1-10,000+ repositories (at large scale, the Data Center deployment becomes necessary).

No Indexing Required

Your search results are always up-to-date. Search any branch or commit with no indexing delay.

Symbol and Commit Search

Search over symbols, commit diffs, and commit messages.

Enhanced Code Browsing and Intelligence

Hovers, Definitions, and References

Code intelligence makes browsing code easier, with IDE-like hovers, go-to-definition, and find-references on your code, powered by language servers based on the open-source Language Server Protocol.

It even works in code review diffs on GitHub and Phabricator with our browser extensions.

Starts at $4/user/month.

Code Files and Diffs

See how your codebase changes over time in functions, classes, or areas of the codebase when debugging.

Speed Through Reviews

Use integrations to help review code faster and makes it easier to drill down into the implementation.

Custom Tools and Integrations

Extend Sourcegraph in your environment by creating your own tools with the Sourcegraph API.

Code intelligence is powered by language servers based on the open-standard Language Server Protocol (published by Microsoft, with participation from Facebook, Google, Sourcegraph, GitHub, RedHat, Twitter, Salesforce, Eclipse, and others). Visit to learn more about the Language Server Protocol, find the latest support for your favorite language, and get involved.


Connect your Sourcegraph instance with your existing tools. Get code intelligence while browsing code on the web, and code search from your editor.

Browser Extensions:

Sourcegraph Data Center

Upgrade Your Deployment to Scale Endlessly

As you grow to hundreds or thousands of users and repositories, upgrade from the single-server deployment to a highly scalable cluster with Sourcegraph Data Center.

Sourcegraph Data Center

  • Cluster deployment using Kubernetes
  • Scales to Thousands of Repositories and Users
  • High Availability
  • Cluster Monitoring

Starts at $4/user/month.