Overview
Your organization is billed according to its compute and storage usage for GitHub Codespaces. This article explains the ways in which you, as an organization owner, can manage these costs.
To learn about pricing for GitHub Codespaces, see "About billing for GitHub Codespaces."
Spending limits
You can set a spending limit for GitHub Codespaces for your organization. This limit is applied to the total compute and storage cost for GitHub Codespaces. For more information, see "Managing the spending limit for GitHub Codespaces."
-
Compute usage: This is the total time during which all GitHub Codespaces instances ("codespaces") were active in a billing month.
-
Storage usage: For GitHub Codespaces billing purposes, this includes all files used by all codespaces and prebuilds in your account. This includes resources such as cloned repositories, configuration files, and extensions, among others.
You can check the compute and storage usage for GitHub Codespaces for the current billing month. For information, see "Viewing your GitHub Codespaces usage."
Note: Prebuilds for GitHub Codespaces are created and updated using GitHub Actions. This may incur billable costs for GitHub Actions. You can set a spending limit for GitHub Actions. For more information, see "About billing for GitHub Codespaces" and "Managing your spending limit for GitHub Actions." Storage of the generated prebuilds is charged at the same rate as your codespaces, and is included in your GitHub Codespaces spending limit.
Disabling or limiting billing for Codespaces
You can choose for all usage of Codespaces in your organization to be billed to the user who creates the codespace. Alternatively, you can specify which organization members or collaborators can use Codespaces at your organization's expense. For more information, see "Choosing who owns and pays for codespaces in your organization."
You can limit the number of codespaces that people can create, where the organization will be billed for the codespace. This can help to reduce codespace storage charges for your organization. For more information, see "Restricting the number of organization-billed codespaces a user can create."
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 set a maximum idle timeout constraint to limit the maximum timeout that people can set for codespaces that are billable to your organization. This can reduce the compute usage charges generated by codespaces that are left running in an idle state, by stopping active codespace after a shorter timeout period. For more information, see "Restricting the idle timeout period."
You can also restrict how long stopped codespaces can remain unused before they are automatically deleted. This can help to reduce storage costs for Codespaces. For more information, see "Restricting the retention period for codespaces."
Repository owners who set up prebuilds for their repository can reduce the storage costs of prebuilds by configuring these to be created only in selected regions. For more information, see "Configuring prebuilds."
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 user-definable number of days. For more information, see "Configuring automatic deletion of your codespaces." As an organization owner, you can set the maximum retention period for codespaces owned by your organization. This will override a user's personal retention setting. For more information, see "Restricting the retention period for codespaces."