Skip to main content

About billing for GitHub Codespaces

View pricing and see how to manage GitHub Codespaces billing for your organization.

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."

GitHub Codespaces pricing

GitHub Codespaces usage is billed for all organization and enterprise accounts on GitHub Team and GitHub Enterprise, which do not include any free minutes or storage. Personal accounts are not currently billed for Codespaces usage.

Codespaces usage is billed according to the units of measure in the following table:

ProductSKUUnit of measurePrice
Codespaces Compute2 core1 hour$0.18
4 core1 hour$0.36
8 core1 hour$0.72
16 core1 hour$1.44
32 core1 hour$2.88
Codespaces StorageStorage1 GB-month$0.07

About billing for 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.

Your GitHub Codespaces usage shares your account's existing billing date, payment method, and receipt. To view all the subscriptions for your account on GitHub.com, see "Viewing your subscriptions and billing date."

If you purchased GitHub Enterprise through a Microsoft Enterprise Agreement, you can connect your Azure Subscription ID to your enterprise account to enable and pay for Codespaces usage. For more information, see "Connecting an Azure subscription to your enterprise."

To estimate the costs for consumptive services, you can use the GitHub pricing calculator.

Billing for Codespaces prebuilds

By default, a GitHub Actions workflow is triggered every time you create or update a prebuild, or push to a prebuild-enabled branch. As with other workflows, while prebuild workflows are running they will either consume some of the Actions minutes included with your account, if you have any, or they will incur charges for Actions minutes. For more information about pricing for Actions minutes, see "About billing for GitHub Actions."

Alongside GitHub Actions minutes, you will also be billed for the storage of prebuilds associated with each prebuild configuration for a given repository and region. Storage of prebuilds is billed at the same rate as storage of codespaces.

To reduce consumption of Actions minutes, you can set a prebuild to be updated only when you make a change to your dev container configuration files, or only on a custom schedule. You can also manage your storage usage by adjusting the number of template versions to be retained for your prebuild configurations. For more information, see "Configuring prebuilds."

If you are an organization owner, you can track usage of prebuild workflows and storage by downloading a GitHub Actions usage report for your organization. You can identify workflow runs for prebuilds by filtering the CSV output to only include the workflow called "Create Codespaces Prebuilds." For more information, see "Viewing your GitHub Actions usage."

Setting a spending limit

Note: You must set a spending limit before you can use Codespaces.

By default, your organization or enterprise will have a GitHub Codespaces spending limit of $0, which prevents new codespaces from being created or existing codespaces from being opened. To allow your users to create codespaces in your organization, set the limit to a value higher than $0.

Overages are always billed monthly regardless of your billing term (even if your account is otherwise billed annually).

For information on managing and changing your account's spending limit, see "Managing your spending limit for Codespaces."

If you hit a spending limit, you will no longer be able to create or resume your codespaces. You can still export any work in progress changes to a new branch.

Limiting the choice of machine types

By default the machine type with the lowest valid resources is used when a codespace is created. However, users may be able to choose a machine type with more resources. They can do this either when they create a codespace, or they can change the machine type of an existing codespace. For more information, see "Creating a codespace"" and "Changing the machine type for your codespace."

If a machine type that has more resources is chosen, this will affect the per-minute charge for that codespace, as shown above.

Organization owners can create a policy to restrict the machine types that are available to users. For more information, see "Restricting access to machine types."

How billing is handled for forked repositories

Codespaces can only be used in organizations where a billable owner has been defined. To incur charges to the organization, the user must be a member or collaborator, otherwise they cannot create a codespace.

For example, a user in a private organization can fork a repository within that organization, and can subsequently use a codespace billed to the organization; this is because the organization is the owner of the parent repository, which can remove the user's access, the forked repository, and the codespace.

How billing is handled when a repository is transferred

Usage is billed and reported on every hour. As such, you pay for any usage when a repository is within your organization. When a repository is transferred out of your organization, any codespaces in that repository are removed as part of the transfer process.

What happens when users are removed

If a user is removed from an organization or repository, their codespaces are automatically deleted.