Need help with sourcegraph?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

5.2K Stars 634 Forks Other 16.1K Commits 2.8K Opened issues


Universal code search (self-hosted)

Services available


Need anything else?

Contributors list



Sourcegraph is a fast and featureful code search and navigation engine.

sourcegraph com_github com_golang_go_-_blob_src_net_http_request go_L855_6


Try it now

Sourcegraph has three editions:

  • Sourcegraph Cloud lets you search over the open-source ecosystem plus your private code. Search strings, search patterns, search symbols and find references across your entire codebase and the open-source world.
  • Sourcegraph Enterprise lets you run your own Sourcegraph instance in your own environment.
  • Sourcegraph OSS is an open-source version of Sourcegraph that provides the core functionality of Sourcegraph (code search, code browsing, basic code navigation), but lacks more advanced features (enterprise authentication, repository permissions, admin controls, advanced code navigation, etc.)

Source code for all three editions is contained in this repository. See the License section for more details.


  • Install the open-source browser extension to add Sourcegraph-like powers to your code review and code host.
  • File feature requests and bug reports in our issue tracker.
  • Visit for more information about features, use cases, and organizations that use Sourcegraph.

Self-hosted installation

Sourcegraph Enterprise (free up to 10 users)

The fastest way to run Sourcegraph self-hosted is with the Docker container. See the quickstart installation guide. There are also several additional ways of running a production instance.

Sourcegraph OSS

  1. Install dependencies
  2. Clone this repository
  3. Install
  4. Ensure Docker is running
  5. Initialize the PostgreSQL database
  6. Configure the HTTPS reverse proxy
  7. Start the development server
    sg start oss

Sourcegraph should now be running at https://sourcegraph.test:3443.

For detailed instructions and troubleshooting, see the local development documentation.


Refer to the Developing Sourcegraph guide to get started.



directory has additional documentation for developing and understanding Sourcegraph:


This repository contains both OSS-licensed and non-OSS-licensed files. We maintain one repository rather than two separate repositories mainly for development convenience.

All files in the

fall under LICENSE.enterprise.

The remaining files fall under the Apache 2 license. Sourcegraph OSS is built only from the Apache-licensed files in this repository.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.