NextFire main logoNextFire
Docs X
Introduction
Get Started
Clone repo
Run the app
Configuration
Firebase
Create firebase app
Authentication
Firestore
Storage
Functions
Global configuration
Public
Site config
Payments
Stripe
One time
Subscriptions
Webhooks
Usage
Project structure
Static pages
Public pages
Protected pages
Auth
Client auth
Server auth
Data fetching
Firestore client
Firestore admin
Functions
Storage
Content
Blog
Documentation
Components
Markdown
Cards
Diagrams
Filetree
Lists
Maths
Notes
Steps
Table
Tabs
Public
Deep
Deeper
Even deeper
  1. Firebase
  2. Storage

Enable Firebase Storage

Step-by-step guide to enabling and configuring Firebase Cloud Storage.

In this section, you’ll set up Firebase Cloud Storage for your project. We’ll go through enabling Storage, uploading your first file, setting permissions, and connecting it to your app.


1

Open Your Firebase Project

  1. Go to https://console.firebase.google.com.
  2. Select the project where you want to enable Cloud Storage.
2

Navigate to Storage

Note:

You may be asked to update your plan, this is required to use storage.

  1. In the left-hand sidebar, click “Create” → “Storage”.
  2. You’ll land on the Cloud Storage Overview page.
  3. Click “Get started” to begin setup.

Firebase Storage Section (Add screenshot: Firebase dashboard showing the Storage option under Build)

3

Set Up Your Storage Bucket

  1. Choose a storage location — this determines where your files will be physically stored.

    ⚠️ You can’t change this later, so pick a region close to your users!

  2. Review your security rules:

    • Start in production mode — access restricted by default.
    • Start in test mode — open access
    allow read, write: if request.auth != null;
    

When working with Storage from web apps, you may encounter CORS (Cross-Origin Resource Sharing) errors. To fix this, configure CORS settings using gsutil.

The simplest way to update cors rules, is to open a cloud shell in google cloud console and run the following commands:

  1. Go to Google cloud console
  2. Open a shell console (at top right menu)
    nano cors.json

And paste:

  1. For Local dev (If you're using a dev project):
    [{"maxAgeSeconds": 3600, "method": ["GET", "POST", "PUT", "DELETE", "OPTIONS"], "origin": ["*"]}]
  1. For prod:
    [{"maxAgeSeconds": 3600, "method": ["GET"], "origin": ["https://your-domain.com/", "https://your-domain.vercel.app/"]}]

Now, you need to apply the new rules

gsutil cors set cors.json gs://your-app-id.firebasestorage.app
## Verify with
gsutil cors get gs://your-app-id.firebasestorage.app
FirestoreFunctions

On this page

Verify with

Content

FeedbackEdit page

© 2025 Ship IT.

Rubix Studios logo