Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Cloud Run 具有「地區性」,這表示執行 Cloud Run 服務的基礎架構位於特定地區,並由 Google 代管,可為該地區內所有區域提供備援功能。
選擇 Cloud Run 服務的執行地區時,請將延遲時間、可用性或耐用性需求做為主要考量。一般而言,您可以選擇最靠近使用者的地區,但您應考量 Cloud Run 服務所使用的其他 Google Cloud
產品位置。使用分散在不同位置的 Google Cloud 產品,可能會影響服務的延遲時間和費用。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Setting up your environment\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n1. [Enable the Cloud Run Admin API](http://console.cloud.google.com/apis/library/run.googleapis.com)\n2. [Install and initialize](https://cloud.google.com/sdk/docs/) the gcloud CLI.\n3. Update components: \n\n ```bash\n gcloud components update\n ```\n4. Optionally, set your platform and default Cloud Run region with the gcloud properties to avoid prompts from the command line: \n\n ```\n gcloud config set run/region REGION\n ```\n replacing \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e with the default [region](#before-you-begin) you want to use.\n5. Optionally, [install Docker](https://docs.docker.com/install/) to build [Docker containers locally](/run/docs/building/containers#building_using_a_dockerfile). You can configure Docker to get access to Artifact Registry using the [gcloud CLI credential helper](/artifact-registry/docs/docker/authentication#gcloud-helper): \n\n ```bash\n gcloud auth configure-docker LOCATION-docker.pkg.dev\n ```\n Replace \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e with the region name of your container repository, for example, `us-west2`.\n\n### Cloud Run regions\n\n\u003cbr /\u003e\n\nCloud Run is regional, which means the infrastructure that\nruns your Cloud Run services is located in a specific region and is\nmanaged by Google to be redundantly available across\n[all the zones within that region](/docs/geography-and-regions).\n\n\u003cbr /\u003e\n\nMeeting your latency, availability, or durability requirements are primary\nfactors for selecting the region where your Cloud Run services are run.\nYou can generally select the region nearest to your users but you should consider\nthe location of the [other Google Cloud\nproducts](/about/locations#locations) that are used by your Cloud Run service.\nUsing Google Cloud products together across multiple locations can affect\nyour service's latency as well as cost. \n\nCloud Run is available in the following regions:\n\n#### Subject to [Tier 1 pricing](/run/pricing#tables)\n\n- `asia-east1` (Taiwan)\n- `asia-northeast1` (Tokyo)\n- `asia-northeast2` (Osaka)\n- `asia-south1` (Mumbai, India)\n- `europe-north1` (Finland) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `europe-north2` (Stockholm) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `europe-southwest1` (Madrid) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `europe-west1` (Belgium) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `europe-west4` (Netherlands) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `europe-west8` (Milan)\n- `europe-west9` (Paris) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `me-west1` (Tel Aviv)\n- `northamerica-south1` (Mexico)\n- `us-central1` (Iowa) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `us-east1` (South Carolina)\n- `us-east4` (Northern Virginia)\n- `us-east5` (Columbus)\n- `us-south1` (Dallas) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `us-west1` (Oregon) [Low CO~2~](/sustainability/region-carbon#region-picker)\n\n#### Subject to [Tier 2 pricing](/run/pricing#tables)\n\n- `africa-south1` (Johannesburg)\n- `asia-east2` (Hong Kong)\n- `asia-northeast3` (Seoul, South Korea)\n- `asia-southeast1` (Singapore)\n- `asia-southeast2 ` (Jakarta)\n- `asia-south2` (Delhi, India)\n- `australia-southeast1` (Sydney)\n- `australia-southeast2` (Melbourne)\n- `europe-central2` (Warsaw, Poland)\n- `europe-west10` (Berlin) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `europe-west12` (Turin)\n- `europe-west2` (London, UK) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `europe-west3` (Frankfurt, Germany)\n- `europe-west6` (Zurich, Switzerland) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `me-central1` (Doha)\n- `me-central2` (Dammam)\n- `northamerica-northeast1` (Montreal) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `northamerica-northeast2` (Toronto) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `southamerica-east1` (Sao Paulo, Brazil) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `southamerica-west1` (Santiago, Chile) [Low CO~2~](/sustainability/region-carbon#region-picker)\n- `us-west2` (Los Angeles)\n- `us-west3` (Salt Lake City)\n- `us-west4` (Las Vegas)\n\nIf you already created a Cloud Run service, you can view the\nregion in the Cloud Run dashboard in the\n[Google Cloud console](https://console.cloud.google.com/run). \nOK\n\nOptional: Develop a new service using Cloud Code tools\n------------------------------------------------------\n\nInstead of using the Google Cloud console or the Google Cloud CLI to create a new\nservice, you can use the following Cloud Code tools:\n\n- [Intellij](/code/docs/intellij/creating-a-cloud-run-app)\n- [VSCode](/code/docs/vscode/creating-a-cloud-run-app)\n- [Cloud Shell](/code/docs/shell/creating-a-cloud-run-app)\n\nWhat's next\n-----------\n\nTo learn how to build a container from code source, push to Artifact Registry,\nand deploy, see:\n\n- [Quickstart: Build and Deploy](/run/docs/quickstarts#build-and-deploy-a-web-service)\n- [Developing your service](/run/docs/developing)\n- [Building containers](/run/docs/building/containers)"]]