Announcing Sourcegraph 2.4: free, powerful search for your private code

Quinn Slack

Sourcegraph 2.4 is here. It is now free for unlimited users and repositories, can be installed in minutes with a single docker run command, and is easily configurable in the new web-based site admin. This release also includes many performance and bug fixes, plus a better interface for monitoring search results.

Sourcegraph gives the power of great code search to every developer at your company, so you can ship better code faster. It runs securely in your own network, takes 5 minutes to install, and is easy to upgrade.

Ready to install or upgrade? Install Sourcegraph 2.4. Existing customers can update now.

Key highlights of Sourcegraph 2.4:

New features

Easier installation

We've made it easier than ever to start searching your code with Sourcegraph: see the one-command docker run quickstart command.

See the installation documentation for more information.

Easier configuration

The new site admin area makes it easier for administrators to configure and manage Sourcegraph. Site admins can click Admin in the upper right of any page to view the site admin area.


From here, click Configuration in the site admin menu to configure your Sourcegraph instance. The new in-app JSON site config editor makes it easy to add repositories from GitHub, GitHub Enterprise, and other sources, configure SSO, and change other settings.


See the configuration documentation for more information, and see the full configuration options.

Search interface improvements

We've introduced a cleaner, more intuitive search interface in Sourcegraph 2.4. Saved search scopes appear as buttons on the search homepage, replacing the old scope dropdown. The selected scope is reflected in the search bar as part of the search query.

Monitor saved query results

Saved queries are useful for keeping track of important code changes. Now, you can monitor changes in your saved queries on the homepage. Adding a saved query to the homepage shows the current number of results and a graph of the number of results over time. Whether it's lint violations, security vulnerabilities, or hacks, you can now easily monitor changes in your code from the homepage.


You can now search over commit diffs using the type:diff operator in search queries. This helps developers:

  • debug issues (“when was the parseDocument function last changed?”)
  • catch issues before they appear (“what open pull requests modify sensitive files?”)
  • find usage examples (“show me a self-contained commit adding a new page to our web app”)

See a sample diff search on a public repository on


But that's not all! For the intrepid, you can search within commit diffs on multiple branches by specifying them in a repo: field after the @ sign. See non-master-branch commits containing const in a public repository on, for example. After the @, separate Git refs with :, specify Git ref globs by prefixing them with *, and exclude commits reachable from a ref by prefixing it with ^. We'll improve documentation as this feature nears release.

See the documentation for more information.

Like diff search above, but use type:commit to search inside commit messages. See all commits mentioning “bug” or “fix” in a public repository on, for example.


See the documentation for more information.

New search filters: author, committer, before, after, and commit message

To go along with diff and commit search, we've added new search filters.

  • author:name or author:[email protected] to show only diffs or commits authored by that user (example)
  • committer:name or committer:[email protected] (same as above, but for the Git committer, which sometimes differs from the Git author)
  • after:"3 weeks ago", before:"june 25, 2017", before:"last thursday", etc., to filter by commit date (example)
  • message:"hello" to show only commits or diffs whose commit message (including the full message body) contains "hello" (example)

See the search documentation for all filters and query tokens


See the Sourcegraph changelog for a list of all changes in this release.

Upgrade today

Install Sourcegraph 2.4 to bring powerful code search to your developers.

About the author

Quinn Slack is the CEO and co-founder of Sourcegraph, the code intelligence platform for dev teams and making coding more accessible to more people. Prior to Sourcegraph, Quinn co-founded Blend Labs, an enterprise technology company dedicated to improving home lending and was an egineer at Palantir, where he created a technology platform to help two of the top five U.S. banks recover from the housing crisis. Quinn has a BS in Computer Science from Stanford, you can chat with him on Twitter @sqs.

Get Cody, the AI coding assistant

Cody makes it easy to write, fix, and maintain code.