Skip to main content
Site administrators control how Sourcegraph is configured, who can access it, and which code hosts and repositories are connected. This page describes the main areas of responsibility and links to detailed configuration guides.
Site administration features are available on Enterprise plans. If you are on a Cloud instance managed by Sourcegraph, most infrastructure-level tasks are handled for you — you still control user management, code host connections, auth, and licensing through the admin UI.

What site admins do

When you are granted site admin status, you gain access to the Site admin panel at /site-admin. From there you can:
  • Create, deactivate, and delete user accounts
  • Connect Sourcegraph to code hosts (GitHub, GitLab, Bitbucket, Gerrit, and others)
  • Configure authentication providers (SAML, OIDC, OAuth, builtin)
  • Manage repository permissions and access control
  • Apply and update your Sourcegraph license key
  • Configure email (SMTP) settings for notifications and password resets
  • Review audit logs, pings, and telemetry
  • Manage Batch Changes settings and executor access

Key admin areas

Authentication

Configure how users sign in: SAML, OpenID Connect, GitHub OAuth, GitLab OAuth, or builtin username/password. Set up SCIM for automated user provisioning.

Site configuration

Set externalURL, connect code hosts, configure email/SMTP, control repository permissions, manage your license key, and tune search settings.

Self-hosted deployment

Run Sourcegraph on your own infrastructure with Docker Compose or Kubernetes. Your code never leaves your network.

Cloud instance

Get a Sourcegraph-managed single-tenant instance. Sourcegraph handles infrastructure, upgrades, and monitoring.

User management

Users need an account on your Sourcegraph instance to sign in. You can create accounts manually through Site admin > Users, or allow users to self-register depending on your auth provider configuration. Key controls:
  • allowSignup on each auth provider controls whether new users can create their own accounts.
  • Account access requests — when self-signup is disabled, users can request access and admins approve or reject requests from the navbar notification.
  • SCIM provisioning (beta) automates user creation and deactivation from your identity provider. See the authentication documentation for setup details.
  • Organizations — group users into organizations to share settings and saved searches.
If you are using repository permissions, configure auth providers that can prove user identity on the code host (for example, a GitHub OAuth provider in addition to your SSO provider). This lets Sourcegraph sync repository access correctly.

Code host connections

Go to Site admin > Manage code hosts to add connections to:
  • GitHub (github.com or GitHub Enterprise)
  • GitLab (gitlab.com or self-managed GitLab)
  • Bitbucket Cloud and Bitbucket Server/Data Center
  • Gerrit
  • Azure DevOps
  • Other hosts via generic Git clone URLs
Each connection defines which repositories to sync, at what rate, and whether to enforce repository-level permissions. See Site configuration for example JSON config for each code host type.

Licensing

Your Sourcegraph Enterprise license key activates features beyond the 10-user free tier. To apply a license:
  1. Go to Site admin > Configuration.
  2. Add "licenseKey": "your-license-key" to the site config JSON.
  3. Save. The license is validated immediately.
Contact [email protected] to obtain or renew a license.

Additional resources

API reference

Use the Sourcegraph GraphQL API to automate user management, search, and repository operations.

Deployment guide

Step-by-step instructions for deploying Sourcegraph with Docker Compose or Kubernetes/Helm.

Build docs developers (and LLMs) love