Skip to main content

Managing billing for GitHub Codespaces in your organization

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

Who can use this feature

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. GitHub Codespaces is also available as a limited beta release for individual users on GitHub Free and GitHub Pro plans. For more information, see "GitHub's products."

Overview

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

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.

  • As an organization owner or a billing manager, you can manage GitHub Codespaces billing for your organization: "About billing for Codespaces"
  • As an organization owner, you can list the currently active and stopped codespaces for your organization. In addition to these codespaces, costs for the current month may include costs for codespaces that existed earlier in the current month but have since been deleted.
  • For users, there is a guide that explains how billing works: "Understanding billing for GitHub Codespaces"

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 GitHub 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 GitHub Codespaces usage in your organization. For more information, see "Managing spending limits for GitHub Codespaces."

  • Storage usage: For GitHub Codespaces billing purposes, this includes all storage used by all codespaces in your account. This includes resources 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 GitHub Codespaces, see "Viewing your GitHub Codespaces usage"."

Disabling or limiting Codespaces

You can disable all use of GitHub Codespaces that would be billed to your organization. Alternatively, you can specify which organization members or collaborators can use Codespaces at your organization's expense. For more information, see "Enabling GitHub Codespaces for your organization."

Note: If you disable billable codespaces use for your organization, anyone who can create codespaces as an individual user, and can clone a repository in your organization, will still be able to create a codespace for that repository. However, this will not incur any charge for your organization. For information about restricting access to a repository, see "Managing teams and people with access to your repository."

You can configure which repositories can be accessed from codespaces created for a particular repository. For more information, see "Managing access to other repositories within your codespace."

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

You can also restrict how long a codespace can remain unused before it is automatically deleted. This can help to reduce storage costs for Codespaces. For more information, see "Restricting the retention period for codespaces."

Deleting unused codespaces

Your users can delete their own 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.

As an organization owner, you can delete any codespace in your organization. For more information, see "Deleting a codespace."

Note: Codespaces are automatically deleted after they have been stopped and have remained inactive for a defined number of days. For more information, see "Restricting the retention period for codespaces." A codespace can only be manually deleted by the person who created the codespace.

Further reading