File: //snap/google-cloud-cli/396/help/man/man1/gcloud_emulators_firestore_start.1
.TH "GCLOUD_EMULATORS_FIRESTORE_START" 1
.SH "NAME"
.HP
gcloud emulators firestore start \- start a local Firestore emulator
.SH "SYNOPSIS"
.HP
\f5gcloud emulators firestore start\fR [\fB\-\-database\-mode\fR=\fIDATABASE_MODE\fR] [\fB\-\-export\-on\-exit\fR=\fIEXPORT_ON_EXIT\fR] [\fB\-\-host\-port\fR=\fIHOST_PORT\fR] [\fB\-\-import\-data\fR=\fIIMPORT_DATA\fR] [\fB\-\-licenses\fR] [\fB\-\-rules\fR=\fIRULES\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
This command starts a local Firestore emulator.
.SH "EXAMPLES"
To start the local Firestore emulator, run:
.RS 2m
$ gcloud emulators firestore start
.RE
To bind to a specific host and port, run:
.RS 2m
$ gcloud emulators firestore start \-\-host\-port=0.0.0.0:8080
.RE
To run the local Firestore emulator with a Firebase Rules set, run:
.RS 2m
$ gcloud emulators firestore start \-\-rules=firestore.rules
.RE
To run the local Firestore emulator in Datastore Mode, run:
.RS 2m
$ gcloud emulators firestore start \-\-database\-mode=datastore\-mode
.RE
To import data at the start of the Firestore emulator, run:
.RS 2m
$ gcloud emulators firestore start \-\-import\-data=<path/to/file>
.RE
To export emulator data upon emulator shutdown, run:
.RS 2m
$ gcloud emulators firestore start \e
\-\-export\-on\-exit=<path/to/directory>
.RE
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-database\-mode\fR=\fIDATABASE_MODE\fR
The database mode to start the Firestore Emulator in. The valid options are:
.RS 2m
`firestore\-native` (default): start the emulator in Firestore Native
`datastore\-mode`: start the emulator in Datastore Mode
.RE
.TP 2m
\fB\-\-export\-on\-exit\fR=\fIEXPORT_ON_EXIT\fR
Directory path in which emulator data will be saved upon shutdown.
Example:\f5/home/user/myexports/2024\-03\-26/\fR
.TP 2m
\fB\-\-host\-port\fR=\fIHOST_PORT\fR
The host:port to which the emulator should be bound. Can take the form of a
single address (hostname, IPv4, or IPv6) and/or port:
.RS 2m
[ADDRESS][:PORT]
.RE
In this format you must enclose IPv6 addresses in square brackets: e.g.
.RS 2m
[2001:db8:0:0:0:ff00:42:8329]:8080
.RE
The default value is localhost:8080.
.TP 2m
\fB\-\-import\-data\fR=\fIIMPORT_DATA\fR
File path to the data to be loaded into the emulator upon start up.
Example:\f5/home/user/myexports/sampleExport/sampleExport.overall_export_metadata.\fR
.TP 2m
\fB\-\-licenses\fR
If set, the emulator will print open\-source dependencies and licenses, then
exit.
.TP 2m
\fB\-\-rules\fR=\fIRULES\fR
If set, all projects will use the security rules in this file. More information
on Firebase Rules and the syntax for this file is available at
https://firebase.google.com/docs/rules.
.RE
.sp
.SH "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 \fB$ gcloud help\fR for details.
.SH "NOTES"
These variants are also available:
.RS 2m
$ gcloud alpha emulators firestore start
.RE
.RS 2m
$ gcloud beta emulators firestore start
.RE