Sourcegraph documentation

Sourcegraph is a web-based, open-source, self-hosted code search and navigation tool for developers, used by Uber, Lyft, Yelp, and more.

Quickstart guide

It takes less than 5 minutes to install Sourcegraph using Docker. If you’ve got Docker installed, you’re ready to start the server which listens on port 7080 by default.

docker run --publish 7080:7080 --publish 2633:2633 --rm --volume ~/.sourcegraph/config:/etc/sourcegraph --volume ~/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:3.2.2

Access the server on port 7080, then the below screencast will show you how to configure Sourcegraph to search public and private repositories, and enable code intelligence on Sourcegraph and

Once Sourcegraph has been configured, head to the site administration documentation for next steps.

Upgrading Sourcegraph

All you need to do to upgrade Sourcegraph is to restart your Docker server with a new image tag.

We actively maintain the two most recent monthly releases of Sourcegraph and we support upgrading from the two previous monthly releases.

For example, if you are running Sourcegraph 3.1, then you can upgrade directly to 3.2 and 3.3. If you want to upgrade to 3.4, then you first need to upgrade to 3.3 before you can upgrade to 3.4.


Sourcegraph development is open source at Need help? Use the issue tracker.

Core documentation

Features and tutorials

Sourcegraph subscriptions

You can use Sourcegraph in 2 ways:

For self-hosted Sourcegraph instances, you run a Docker image or Kubernetes cluster on-premises or on your preferred cloud provider. There are 2 tiers: Core (free) and Enterprise. Enterprise features require a Sourcegraph subscription.