Managing spending limits for Codespaces

You can set a spending limit for Codespaces usage.

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

About spending limits for Codespaces

Note: After the Codespaces trial period ends, you must set a spending limit before you can use Codespaces. By default, your organization will have a Codespaces spending limit of $0, which prevents any codespaces from being created. To allow your users to create codespaces in your organization, set the limit to a value higher than $0.

By default, your organization will have a 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.

Once you've reached your spending limit, your organization or repository will no longer be able to create new codespaces, and won't be able to start existing codespaces. Any existing codespaces that are still running will not be shutdown; if you don't change the spending limit, you will not be charged for the amount that exceeds the limit.

For more information about pricing for Codespaces usage, see "About billing for Codespaces."

Using your Azure Subscription

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

Managing the spending limit for Codespaces for your organization

Organizations owners and billing managers can manage the spending limit for Codespaces for an organization.

  1. In the upper-right corner of any page, click your profile photo, then click Settings. Settings icon in the user bar
  2. In the settings sidebar, click Organizations. Organizations settings in the sidebar
  3. Next to the organization, click Settings. The settings button
  4. If you're an organization owner, in the left sidebar, click Billing & plans. Billing & plans in the organization settings sidebar
  5. At the top of the page, under "Payment information", click Manage spending limit. Manage spending limit link
  6. Under "Monthly spending limit", scroll down to "Codespaces" and choose to limit spending or allow unlimited spending. Radio buttons to limit spending or allow unlimited spending
  7. If you chose to limit spending, under "Limit spending", type a limit, then click Update limit. Field to type spending limit and Update limit button

Managing the spending limit for Codespaces for your enterprise account

Enterprise owners and billing managers can manage the spending limit for Codespaces for an enterprise account.

  1. In the top-right corner of GitHub, click your profile photo, then click Your enterprises. "Your enterprises" in drop-down menu for profile photo on GitHub

  2. In the list of enterprises, click the enterprise you want to view. Name of an enterprise in list of your enterprises

  3. In the enterprise account sidebar, click Settings. Settings tab in the enterprise account sidebar

  4. In the left sidebar, click Billing. Billing tab in the enterprise account settings sidebar

  5. Above "Codespaces monthly usage", click Spending Limit. Spending limit tab

  6. Under "Monthly spending limit", choose to limit spending or allow unlimited spending. Radio buttons to limit spending or allow unlimited spending

  7. If you chose to limit spending, under "Limit spending", type a limit, then click Update limit. Field to type spending limit and Update limit button

Did this doc help you?Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.