You can install (and manage) any of the official Firebase extensions using either the Firebase console or the Firebase CLI (command-line interface).
Make sure to review the differences in the supported actions for the Firebase CLI and Firebase console.
To install or manage extensions, you must be assigned one of these roles: Owner or Editor or Firebase Admin.
Also, to install an extension, your project must be on the Blaze (pay as you go) plan. You will be charged a small amount (typically around $0.01/month) for the Firebase resources required by this extension (even if it is not used), in addition to any charges associated with its usage.
Before you begin
If you haven't already, add Firebase to your project.
If you haven't already, upgrade your project to the Blaze (pay as you go) plan.
Install or update to the latest version of the Firebase CLI.
Take note of either your Firebase project ID or previously configured project alias.
- Project ID — Run
firebase projects:list
from anywhere on your computer. - Project alias — Run
firebase use
from your local app directory.
- Project ID — Run
Step 1: View detailed information about an extension
This step is optional, but strongly recommended.
Before installing a Firebase Extension, we recommend that you review detailed information about the extension, including:
- How the extension works, any pre-installation tasks, and details about the extension
- General identifying information and description
- Whether the extension's tasks require a billing account
- Google services (APIs) and access roles required for operation
- Resources created for the extension (like functions)
- Descriptions of user-configurable parameters
To view an extension's detailed information:
Make sure that you've set up your environment and selected an extension.
Run the extension-info command from anywhere on your computer:
firebase ext:info extension-name
Where
extension-name
is required and can be found either in the extension's detail page or in thename
field of the extension'sextension.yaml
file.
Step 2: Install an extension
During the installation process, you'll be prompted to review the basic specifications for the extension (such as APIs enabled, resources created, access granted, etc.). You'll be notified of any billing requirements, and you'll also be prompted to specify values for the extension's configurable parameters.
Make sure that you've set up your environment and selected an extension.
Run the extension-install command. If prompted, enter parameter values to customize the extension instance.
firebase ext:install extension-name --project=projectId-or-alias
The
extension-name
argument is required and can be found either in the extension's preinstall details page or in thename
field of the extension'sextension.yaml
file.Create a
.env
file (for example,params.env
) that defines your parameter values. Save the file locally.- Declare each parameter by its
param
value found in the extension'sextension.yaml
file. - Include values for all the parameters.
- Follow dotenv syntax.
For example, for the Translate Text extension, you could create this
.env
file:# params.env LOCATION=us-east1 LANGUAGES=fr,es COLLECTION_PATH=translations INPUT_FIELD_NAME=input OUTPUT_FIELD_NAME=output
- Declare each parameter by its
Run the extension-install command with the
--params
flag. For example, to install the Translate Text extension, run the following command:firebase ext:install firestore-translate-text --params=path/to/params.env --project=projectID-or-alias
After the installation is complete, review instructions for using your extension, which may include some required post-installation tasks.
Find these instructions in your extension's postinstall details page in the Extensions dashboard of the Firebase console (the specific link to the dashboard is displayed in the terminal after installation).
You can also find these instructions in the
POSTINSTALL.md
file included in the extension's source directory.If applicable, these instructions will tell you how to test out your extension (look for a See it in action section).
Next Steps
View the details and the configuration of your installed extension in the Firebase console.
Monitor the activity of your installed extension, including checks on its health, usage, and logs.
Using the Firebase CLI, manage your installed extension. You can reconfigure or uninstall your extension, as well as update your extension to the latest version.
Using the Firebase console, manage your installed extension. For official Firebase extensions, you can reconfigure or uninstall your extension, as well as update your extension to the latest version.
As a best practice for all projects, make sure to set up budget alerts for your project and monitor your Usage and billing dashboard in the Firebase console.