Install Sourcegraph with Docker


Docker is required.

Step 1: Run Sourcegraph

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

When Sourcegraph is ready, continue at http://localhost:7080.

Step 2: Add repositories

After creating an account, go to the Configuration page in the site admin area.

Click Add repositories to add all repositories associated with your account, or see how to add repositories from other code hosts.

Step 3: Start searching your code

Done! You’re ready to search your code.

Next steps

File system performance on Docker for Mac

There is a known issue in Docker for Mac that causes slower than expected file system performance on volume mounts, which impacts the performace of search and cloning.

To achieve better performance, you can do any of the following: