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.
Open Your Firebase Project
- Go to https://console.firebase.google.com.
- Select the project where you want to enable Cloud Storage.
Navigate to Storage
Note:
You may be asked to update your plan, this is required to use storage.
- In the left-hand sidebar, click “Create” → “Storage”.
- You’ll land on the Cloud Storage Overview page.
- Click “Get started” to begin setup.
(Add screenshot: Firebase dashboard showing the Storage option under Build)
Set Up Your Storage Bucket
-
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!
-
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:
- Go to Google cloud console
- Open a shell console (at top right menu)
nano cors.json
And paste:
- For Local dev (If you're using a dev project):
[{"maxAgeSeconds": 3600, "method": ["GET", "POST", "PUT", "DELETE", "OPTIONS"], "origin": ["*"]}]
- 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