Several Firebase products require a location setting:
Google Analytics — If you enable Google Analytics in your Firebase project, you're prompted to select an Analytics reporting location. This location represents the country or region of your organization. Your Analytics location, in turn, sets the currency for revenue reporting.
Cloud Firestore and Cloud Storage — If you start using either of these products, you're prompted to select your project's default Google Cloud Platform (GCP) resource location (if it wasn't already selected when setting up another service).
Cloud Functions for Firebase (scheduled functions only) — If you run scheduled functions, Cloud Scheduler requires an App Engine app; during its setup you're prompted to select your project's default Google Cloud Platform (GCP) resource location (if it wasn't already selected when setting up another service).
To learn more about location settings for non-scheduled functions, visit Cloud Functions Locations.
Realtime Database — If you create a Realtime Database instance, you're prompted to select the location of the instance, and each instance can be in a different location. Note that the locations of your Realtime Database instances do not affect the options for your default GCP resource location.
Select a location setting for a product or group of products
For most use-cases, you select a location setting in the Firebase console, either during project creation or in the console page for a specific product.
If you enable Google Analytics in your Firebase project in the Firebase console, you're prompted to select an Analytics reporting location. Select a country or region that represents the location of your organization.
If you're a project Owner or Editor, you can edit the time zone and the currency for your Analytics reporting location; go to your Google Analytics settings, then scroll to the Reporting pane.
Cloud Firestore, Cloud Storage, and scheduled functions
Cloud Firestore, Cloud Storage, and scheduled functions all share the same location setting, called the default GCP resource location (learn the specifics about this location setting below). Note that this location might have been previously set, either during project creation or when setting up another service that uses this location setting.
If you set up Cloud Firestore or Cloud Storage, you're prompted to select your project's default GCP resource location in the Firebase console workflow.
For Cloud Storage, your default GCP resource location only applies to your default bucket. If you're on the Blaze plan, you can create multiple buckets, each with its own location.
If you run scheduled functions, Cloud Scheduler requires an App Engine app. During its setup, you're prompted to select your project's default GCP resource location.
You can programmatically set your default GCP resource location by calling the
defaultLocation.finalizeendpoint for your Firebase project.
Realtime Database locations
If you create a new Realtime Database instance, you need to specify the location for that instance. Each Realtime Database instance in your project can be located in a different location. The currently supported locations for Realtime Database instances are listed below along with their associated database URL schemes.
Note that the locations of your Realtime Database instances do not affect the options for your default GCP resource location.
|Region name||Region description||Database URL scheme|
View location settings
For Analytics — In the Firebase console, go to your Google Analytics settings, then scroll to the Reporting pane.
For Cloud Firestore, Cloud Storage, and scheduled functions — In the Firebase console, go to your Project settings.
For Realtime Database — In the Firebase console, view the list of your database instances in the Realtime Database data viewer.
Learn about the default GCP resource location
Several services available for your app require a location setting that's called your project's default Google Cloud Platform (GCP) resource location. This location is where your data is stored for GCP services that require a location setting.
The following products share the same default GCP resource location:
App Engine app (for example, for scheduled functions)
If you set up an App Engine app, its location shares your default GCP resource location. Note that if you use Cloud Scheduler (for example, to run scheduled functions), you're required to have an App Engine app in your project.
You can select either a multi-region location or a
regional location as your default GCP resource location. Note
that if you already have an App Engine app with a location of either
europe-west, any GCP service that uses this location setting
will be considered multi-regional.
Select a multi-region location to maximize the availability and durability of your database.
A multi-region location consists of a defined set of regions where multiple replicas of the database are stored. Each replica is either a read-write replica which contains all of the data in the database or a witness replica which does not maintain a full set of data but participates in replication.
By replicating the data between multiple regions, data can continue to be served even with the loss of an entire region. Within a region, data is replicated across zones so that data can continue to be served within that region even with the loss of a zone.Firebase supports the following multi-region GCP resource locations:
|Multi-Region Name||Multi-Region Description||Read-Write Regions||Witness Region|
A regional location is a specific geographic place, such as South Carolina. Data in a regional location is replicated in multiple zones within a region. All regional locations are separated from other regional locations by at least 100 miles.
Select a regional location for lower costs, for lower write latency if your application is sensitive to latency, or for co-location with other GCP resources.Firebase supports the following regional GCP resource locations:
|Region Name||Region Description|
|Salt Lake City|
This location does not support Cloud Storage for Firebase. If you plan to use Cloud Storage for Firebase, you should choose a different location.
To create a Cloud Firestore database in a specific location, visit Get started with Cloud Firestore.
To create a Cloud Storage bucket, visit the Get Started page for your platform.
To run scheduled functions with Cloud Functions for Firebase, visit the setup guide.
For more information about building applications to meet your latency, availability, and durability requirements, refer to Geography and Regions.