Skip to main content

Managing billing for GitHub Codespaces in your organization

You can check your GitHub Codespaces usage and set usage limits.

To manage billing for GitHub Codespaces for an organization, you must be an organization owner or a billing manager.

GitHub Codespaces is available for organizations using GitHub Team or GitHub Enterprise Cloud. For more information, see "GitHub's products."

Overview

To learn about pricing for GitHub Codespaces, see "Codespaces pricing."

Codespaces are billed in US dollars (USD) according to their compute and storage usage.

Calculating compute usage

Compute usage is defined as the total number of uptime minutes for which a GitHub Codespaces instance is active. Compute usage is calculated by summing the actual number of minutes used by all codespaces. These totals are reported to the billing service daily, and are billed monthly.

Uptime is controlled by stopping your codespace, which can be done manually or automatically after a developer specified period of inactivity. For more information, see "Closing or stopping your codespace".

Calculating storage usage

For GitHub Codespaces billing purposes, this includes all storage used by all codespaces in your account. This includes any files used by the codespaces, such as cloned repositories, configuration files, and extensions, among others. These totals are reported to the billing service daily, and are billed monthly. At the end of the month, GitHub rounds your storage to the nearest MB.

Usage limits

You can set a usage limit for the codespaces in your organization or repository. This limit is applied to the compute and storage usage for GitHub Codespaces:

  • Compute minutes: Compute usage is calculated by the actual number of minutes used by all Codespaces instances while they are active. These totals are reported to the billing service daily, and is billed monthly. You can set a spending limit for Codespaces usage in your organization. For more information, see "Managing spending limits for GitHub Codespaces."

  • Storage usage: For Codespaces billing purposes, this includes all storage used by all codespaces in your account. This includes all used by the codespaces, such as cloned repositories, configuration files, and extensions, among others. These totals are reported to the billing service daily, and is billed monthly. At the end of the month, GitHub rounds your storage to the nearest MB. To check how many compute minutes and storage GB have been used by Codespaces, see "Viewing your GitHub Codespaces usage"."

Disabling or limiting Codespaces

You can disable the use of Codespaces in your organization or repository. For more information, see "Managing repository access for your organization's codespaces."

You can also limit the individual users who can use Codespaces. For more information, see "Managing user permissions for your organization."

You can limit the choice of machine types that are available for repositories owned by your organization. This allows you to prevent people using overly resourced machines for their codespaces. For more information, see "Restricting access to machine types."

Deleting unused codespaces

Your users can delete their codespaces in https://github.com/codespaces and from within Visual Studio Code. To reduce the size of a codespace, users can manually delete files using the terminal or from within VS Code.

Note: Only the person who created a codespace can delete it. There is currently no way for organization owners to delete codespaces created within their organization.