# Requirements

Code Insights has requirements for the Sourcegraph server version, its deployment type, and its connected code hosts.

## Sourcegraph server

While the latest version of Sourcegraph server is always recommended:

-   Version 3.28 is the minimum version required to use Code Insights over individual repositories
-   Version 3.31.1 is the minimum version required to use Code Insights over all repositories

## Sourcegraph deployment

You can only use Code Insights on a [Docker Compose](/self-hosted/deploy/docker-compose/) or [Kubernetes](/self-hosted/deploy/kubernetes/) Sourcegraph deployment.

## Code hosts

Sourcegraph Code Insights is compatible with any [Sourcegraph-compatible code host](/admin/repo/).

If the repo has [sub-repo permissions](/admin/permissions/api#Setting-sub-repository-permissions-for-users) configured, an admin will need to set `experimentalSettings.subRepoPermissions.allowCodeInsights` to `true` in site config to allow Code Insights to query that repo.
