These docs are for v5.0. Click to read the latest docs for v2023.

Codecov Self-Hosted Install Guide

๐Ÿšง

Legacy guide for existing self-hosted customers only

New Self-hosted installations are not being offered at this time.

Please contact us if you'd like hear more about our Enterprise Cloud offerings.

Prerequisites to Installing Codecov Self-Hosted

PrerequisiteDescription
Basic Ingredients List1. Git-based code host (GitHub.com, Github Enterprise, Gitlab Community Edition, Gitlab Enterprise Edition, Bitbucket, Bitbucket Server)
2. Coverage reports generation
3. A CI provider
Installation Lead Installing Codecov requires deep knowledge of your organizationโ€™s infrastructure and how it is implemented, including your CI and Security Configurations. Oftentimes these stakeholders reside on the Operations or SRE team.
Access Controls In order to complete the Codecov install your team will need an account key (provided by Codecov), access to object storage, your Kubernetes Cluster (if applicable) / Compute, Source Control Provider, your Database, and Redis.
Orchestration Managed Kubernetes
Deployment Management Terraform, or, for testing an install, Docker Compose
Software Distribution Access to DockerHub from within your network
Hardware Managed virtual private cloud (AWS, GCP, Azure) with min. 1 machine for installation testing
Database a.) Postgres version 14 or later via managed cloud (e.g., RDS, CloudSQL, or Azure PostgreSQL)

b.) TimescaleDB (optional but highly recommended to use all of Codecov's features)
Cache Redis via managed services (e.g., ElastiCache)
Storage S3 compatible storage (S3, GCS, Azure Blob Storage, Ceph, Minio)

๐Ÿšง

S3 Compatibility Requirements

Please note, to be able to use any S3 / minio compatible storage, you must be able to grant at least the following policies. The application will not work if any of these cannot be granted.

"s3:GetObject",
"s3:PutObject",
"s3:AbortMultipartUpload",
"s3:ListMultipartUploadParts",
"s3:GetBucketLocation",
"s3:HeadBucket",
"s3:ListBucket",
"s3:ListBucketVersions"

Sizing guide for Codecov infrastructure

SmallMediumLargeX-Large
Approximate peak uploads per hour< 100< 1,000< 2,5005,000+
Approximate peak report size< 50 MB< 100 MB< 300 MB< 1 GB
Web (minimum)2 instances, RAM optimized - 2vCPU / 8 GB RAM3 instances, RAM optimized - 2vCPU / 8 GB RAM6 instances, RAM optimized - 2vCPU / 8 GB RAM9 instances, RAM optimized - 2vCPU / 8 GB RAM
API (minimum) currently using about 30-40% of Web capacity. API will handle more responsibilities in the future. Resource usage might increase.2 instances, RAM optimized - 2vCPU / 8 GB RAM2 instances, RAM optimized - 2vCPU / 8 GB RAM4 instances, RAM optimized - 2vCPU / 8 GB RAM6 instances, RAM optimized - 2vCPU / 8 GB RAM
Worker (minimum)3, compute optimized - 4vCPU / 8 GB RAM9, compute optimized - 4vCPU / 8 GB RAM15 instances, RAM optimized - 4vCPU / 8 GB RAM23, compute optimized - 4vCPU / 8 GB RAM
Redis (non clustered only!)1 cpu / 1.5 GB2 cpu / 3 GB2 cpu / 6 GB4 cpu / 14 GB
Database (PostgreSQL)2 cpu / 5GB RAM6 cpu / 16 GB RAM8 cpu / 26 GB RAM16 cpu / 40 GB RAM

Bare Minimum Steps to a Working Implementation of Self-Hosted Codecov

1. Setup External Services

  • Create an OAuth level integration in your repo service provider and have the Client ID and Client Secret ready to use.
    • This is not required for GitHub, since you will create a GitHub App Integration instead.
  • If using GitHub or Github Enterprise, you will have created a GitHub App Integration as well.
  • Create an external, managed, postgres database (e.g., AWS RDS, Google Cloud SQL, etc) and have the url with username and credentials in your codecov.yml
  • Create an object storage mechanism (e.g., an AWS S3 bucket, a Google Cloud Storage Bucket, etc) and have the bucket name on hand, plus credentials to supply to the codecov.yml
  • Caveat: If youโ€™re using S3, you can instead ensure codecov runs on a VM with a StorageAdmin S3 role, or using a suitably permissioned* S3 role.
  • Create a separate, managed Redis database (e.g., AWS Elasticache, etc) and have the credentials to supply to the codecov.yml.

3. Edit Configuration

  • Supply the needed configuration derived from the above steps into the codecov.yml

4. Setup Codecov Application Infrastructure

5. Test Codecov

Integrate Codecov into your CI and upload a coverage report
Ensure that Codecov comments and status checks appear on Pull Requests


Whatโ€™s Next