About Firebase Studio workspaces Stay organized with collections Save and categorize content based on your preferences.
Firebase Studio provides a collaborative, cloud-based developmentenvironment that simplifies the process of building applications with anextensive combination offrameworks and libraries.
After you set up aFirebase Studio workspace, you can access and share afully-functional, flexible development environment:Firebase Studio workspaces are accessible from any device and provideintegrated tools to streamline you and your team's development process.
Create a workspace
A workspace inFirebase Studio is a development environment thatcontains everything you need to develop your application. It contains yourcode, a code editor (with plugins relevant to your project), and toolchainsthat support app development. It's just like creating a new project in yourlocal desktop development environment, except you have an entire computerand operating system pre-configured and dedicatedexclusively to buildingyour application, running on your browser in the cloud, accessible whereveryou are.
Firebase Studio workspaces are optimized to contain a single codebase,so you can keep the environments and system-level dependencies of differentapplications isolated from each other. You can create multiple workspaces touse with different applications and frameworks.
Key Point: There's a limit to the number of workspaces you can create. Ifyou have aGoogle Developer Profile,you can create more workspaces. Learn more atFirebase Studio pricing, quotas and limits.To create a new workspace:
- Opening a template or sample app.
- Importing a project.
- Prototype with AI, then switch toCode view (
</>
).
Duplicate a workspace
Duplicating aFirebase Studio workspace creates a copy of your project thatcontains everything within thehome/user
directory. This is useful when youwant to experiment with a project without affecting the original, or when youwant to use an existing project as a starting point for a new one.
To duplicate a workspace:
- From theFirebase Studio homepage,click the menu next to theworkspace you want to copy >Duplicate.
Enter the name of your new workspace and clickDuplicate. The newworkspace is created and added to your list of workspaces.ßNote: Duplicating larger workspaces can take several minutes. If your newworkspace doesn't load, wait 5 minutes, then refresh the page.
(Optional) If the original workspace has a linked Firebase project,consider creating a separate Firebase project for your new workspace. Thisprevents your new workspace from making changes to the Firebase projectlinked to your original workspace. To create a Firebase project:
- Open the new workspace and askGemini to create aFirebase project for you.
- Update any files that reference the Firebase project, such as
.env
or.firebaserc
.
Configure your workspace
Firebase Studio usesNix to define the environment configuration for each workspace. Nix is a purelyfunctional package manager and assigns unique identifiers to eachdependency, which ultimately means your environment can contain multipleversions of the same dependency, seamlessly. It is also reproducible anddeclarative. In the context ofFirebase Studio, this means you canshare your Nix configuration file across workspaces to load the sameenvironment configuration. Learn more aboutNix +Firebase Studio.
Create or edit the.idx/dev.nix
file
Environment configuration is defined in the.idx/dev.nix
file in your coderepository. This file specifies all of the components to be added to yourworkspace including:
System toolsavailable from theNix package registry,including compilers, packages (like
go
orangular
), and command lineutilities, like extragcloud CLI components.IDE extensions from theOpenVSX registry, likelanguage-specific debuggers, code formatters, official extensions for cloudservices, and more.
Common services, likedocker, Pub/Sub messaging, databases like Postgres and Redis, andmore.
See the following example.idx/dev.nix
file for a basic workspace environmentconfiguration that enables app previews inFirebase Studio:
{ pkgs,...}:{# Which nixpkgs channel to use.channel="stable-23.11";# or "unstable"# Use https://search.nixos.org/packages to find packagespackages=[ pkgs.nodejs_20];# Sets environment variables in the workspaceenv={SOME_ENV_VAR="hello";};# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" idx.extensions=["angular.ng-template"];# Enable previews and customize configuration idx.previews={enable=true;previews={web={command=["npm""run""start""--""--port""$PORT""--host""0.0.0.0""--disable-host-check"];manager="web";# Optionally, specify a directory that contains your web app# cwd = "app/client";};};};}
Apply new configuration
Any time you add or update thedev.nix
configuration file,Firebase Studioshows a prompt in the bottom-right corner toRebuild the environment.The time it takes to rebuild the environment depends on the number of packagesyour configuration needs.
Debug environment build failures
Because configuration files are machine-readable code, they can haveerrors. If this happens, the environment may fail to build and not start.Firebase Studio displays an option to start aRecovery environment.This workspace doesn't include any of the configuration you've defined andjust runs basicCode OSS. This gives you the chance to fix errors in yourdev.nix
configuration file and rebuild the environment.
Next steps
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-09-24 UTC.