gcloud beta emulators firestore start Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta emulators firestore start - start a local Firestore emulator
- SYNOPSIS
gcloud beta emulators firestore start[--database-mode=DATABASE_MODE][--export-on-exit=EXPORT_ON_EXIT][--host-port=HOST_PORT][--import-data=IMPORT_DATA][--licenses][--rules=RULES][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(BETA)This command starts a local Firestore emulator.- EXAMPLES
- To start the local Firestore emulator, run:
gcloudbetaemulatorsfirestorestartTo bind to a specific host and port, run:
gcloudbetaemulatorsfirestorestart--host-port=0.0.0.0:8080To run the local Firestore emulator with a Firebase Rules set, run:
gcloudbetaemulatorsfirestorestart--rules=firestore.rulesTo run the local Firestore emulator in Datastore Mode, run:
gcloudbetaemulatorsfirestorestart--database-mode=datastore-modeTo import data at the start of the Firestore emulator, run:
gcloudbetaemulatorsfirestorestart--import-data=<path/to/file>To export emulator data upon emulator shutdown, run:
gcloudbetaemulatorsfirestorestart--export-on-exit=<path/to/directory> - FLAGS
--database-mode=DATABASE_MODE- The database mode to start the Firestore Emulator in. The valid options are:
`firestore-native`(default):starttheemulatorinFirestoreNative`datastore-mode`:starttheemulatorinDatastoreMode
--export-on-exit=EXPORT_ON_EXIT- Directory path in which emulator data will be saved upon shutdown.Example:
/home/user/myexports/2024-03-26/ --host-port=HOST_PORT- The host:port to which the emulator should be bound. Can take the form of asingle address (hostname, IPv4, or IPv6) and/or port:
[ADDRESS][:PORT]
In this format you must enclose IPv6 addresses in square brackets: e.g.
[2001:db8:0:0:0:ff00:42:8329]:8080
The default value is localhost:8080.
--import-data=IMPORT_DATA- File path to the data to be loaded into the emulator upon start up.Example:
/home/user/myexports/sampleExport/sampleExport.overall_export_metadata. --licenses- If set, the emulator will print open-source dependencies and licenses, thenexit.
--rules=RULES- If set, all projects will use the security rules in this file. More informationon Firebase Rules and the syntax for this file is available athttps://firebase.google.com/docs/rules.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudemulatorsfirestorestartgcloudalphaemulatorsfirestorestart
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-22 UTC.