(/docs/projects/learn-more)
  * [ Supported platforms & frameworks  ](/docs/libraries)
  * [ Use Emulator Suite  ](/docs/emulator-suite)
  * [ AI assistance with Gemini in Firebase  ](/docs/gemini-in-firebase)

  * [ Emulator Suite  ](/docs/emulator-suite)
  * [ Authentication  ](/docs/auth)
  * [ Realtime Database  ](/docs/database)
  * [ Firestore  ](/docs/firestore)
  * [ Storage  ](/docs/storage)
  * [ ML  ](/docs/ml)
  * [ Hosting  ](/docs/hosting)
  * [ Cloud Functions  ](/docs/functions)
  * [ Security Rules  ](/docs/rules)
  * [ App Check  ](/docs/app-check)
  * [ Extensions  ](/docs/extensions)

  * [ Crashlytics  ](/docs/crashlytics)
  * [ Performance Monitoring  ](/docs/perf-mon)
  * [ Test Lab  ](/docs/test-lab)
  * [ App Distribution  ](/docs/app-distribution)

  * [ Analytics  ](/docs/analytics)
  * [ Remote Config  ](/docs/remote-config)
  * [ A/B Testing  ](/docs/ab-testing)
  * [ Cloud Messaging  ](/docs/cloud-messaging)
  * [ In-App Messaging  ](/docs/in-app-messaging)
  * [ Dynamic Links  ](/docs/dynamic-links)
  * [ Google AdMob  ](/docs/admob)
  * [ Google Ads  ](/docs/ads)
  * [ App Indexing  ](/docs/app-indexing)

Firebase is back at Google I/O on May 14! [ Register now.
](https://io.google/2024/?utm_source=firebase&utm_medium=embedded_marketing&utm_campaign=&utm_content=)

  * [ Firebase ](https://firebase.google.com/)
  * [ Documentation ](https://firebase.google.com/docs)
  * [ Firestore ](https://firebase.google.com/docs/firestore)
  * [ Build ](https://firebase.google.com/docs/build)

Send feedback

#  Get started with Cloud Firestore

Stay organized with collections  Save and categorize content based on your
preferences.

This quickstart shows you how to set up Cloud Firestore, add data, then view
the data you just added in the Firebase console.

##  Create a Cloud Firestore database

  1. If you haven't already, create a Firebase project: In the [ Firebase console ](//console.firebase.google.com) , click **Add project** , then follow the on-screen instructions to create a Firebase project or to add Firebase services to an existing GCP project. 

  2. Navigate to the **Cloud Firestore** section of the [ Firebase console ](https://console.firebase.google.com/project/_/firestore) . You'll be prompted to select an existing Firebase project. Follow the database creation workflow. 

  3. Select a starting mode for your Cloud Firestore Security Rules: 

Test mode

    

Good for getting started with the mobile and web client libraries, but allows
anyone to read and overwrite your data. After testing, **make sure to review
the Secure your data  section. **

    

To get started with the web, Apple platforms, or Android SDK, select test
mode.

Locked mode

    

Denies all reads and writes from mobile and web clients. Your authenticated
application servers (C#, Go, Java, Node.js, PHP, Python, or Ruby) can still
access your database.

    

To get started with the C#, Go, Java, Node.js, PHP, Python, or Ruby server
client library, select locked mode.

Your initial set of Cloud Firestore Security Rules will apply to your default
Cloud Firestore database. If you create multiple databases for your project,
you can deploy Cloud Firestore Security Rules for each database.

  4. Select a [ location ](/docs/firestore/locations#types) for your database. 

     * This location setting is your project's [ _default Google Cloud Platform (GCP) resource location_ ](/docs/firestore/locations#default-cloud-location) . Note that this location will be used for GCP services in your project that require a location setting, specifically, your default [ Cloud Storage ](/docs/storage) bucket and your [ App Engine ](https://cloud.google.com/appengine/docs/) app (which is required if you use Cloud Scheduler). 

     * If you aren't able to select a location, then your project already has a default GCP resource location. It was set either during project creation or when setting up another service that requires a location setting.