
Firebase Hosting Basics
- 112k installs
- 390 repo stars
- Updated July 27, 2026
- firebase/agent-skills
firebase-hosting-basics is an agent skill for deploying static sites and SPAs to Firebase Hosting Classic via firebase.json and the CLI.
About
The firebase-hosting-basics skill guides agents through Firebase Hosting Classic for static web apps, simple single-page applications, and lightweight microservices behind Cloud Functions or Cloud Run rewrites. It contrasts Hosting versus App Hosting, recommending Classic when teams deploy HTML, CSS, and JS static assets or SPAs without server-side rendering and want CLI-controlled builds. Key capabilities include global CDN delivery with SSD edge caching, zero-configuration SSL, preview channels for staging URLs, GitHub Actions automation, and dynamic content via Cloud Functions or Cloud Run integrations. Instructions point to reference docs for firebase.json public directories, redirects, rewrites, headers, deploy flows, preview channels, and release management. Local testing uses npx firebase-tools emulators:start --only hosting, serving the default http://localhost:5000 endpoint. Developers choose this skill when deploying marketing sites, documentation bundles, or client-rendered React and Vue apps where full-stack App Hosting is unnecessary. It explicitly directs SSR and Next.js framework workflows to firebase-app-hosting-basics instead.
- Covers Firebase Hosting Classic for static sites, SPAs, and Cloud Function or Run rewrites.
- Documents CDN delivery, built-in SSL, preview channels, and GitHub Actions deploy integration.
- Routes firebase.json configuration details to references/configuration.md.
- Provides local emulator command npx firebase-tools emulators:start --only hosting.
- Directs SSR and Next.js workloads to Firebase App Hosting instead of Classic Hosting.
Firebase Hosting Basics by the numbers
- 112,415 all-time installs (skills.sh)
- +5,645 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #21 of 1,041 Cloud & Infrastructure skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
firebase-hosting-basics capabilities & compatibility
- Capabilities
- firebase.json hosting configuration guidance · static and spa deploy workflows · preview channel staging urls · github actions deploy integration · local hosting emulator startup
- Works with
- gcp · github
- Use cases
- devops · frontend
What firebase-hosting-basics says it does
Do NOT use for Firebase App Hosting.
Zero-configuration SSL is built-in.
npx skills add https://github.com/firebase/agent-skills --skill firebase-hosting-basicsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 112k |
|---|---|
| repo stars | ★ 390 |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 27, 2026 |
| Repository | firebase/agent-skills ↗ |
How do I configure and deploy a static or SPA web app to Firebase Hosting with previews and SSL?
Deploy static sites and SPAs to Firebase Hosting Classic with firebase.json config, previews, and local emulation.
Who is it for?
Developers shipping static or client-rendered web apps who want Firebase CDN hosting with CLI deploy control.
Skip if: Skip for Next.js or Angular SSR; use firebase-app-hosting-basics instead.
When should I use this skill?
User deploys static web apps, SPAs, or simple microservices to Firebase Hosting Classic, not App Hosting.
What you get
Correct Hosting versus App Hosting choice with firebase.json setup, deploy steps, and optional local emulator validation.
- Configured firebase.json hosting block
- Deploy or preview channel commands
- Local emulator validation steps
By the numbers
- Local hosting emulator serves at http://localhost:5000 by default.
- Contrasts six Hosting Classic scenarios versus three App Hosting SSR cases.
Files
hosting-basics
This skill provides instructions and references for working with Firebase Hosting, a fast and secure hosting service for your web app, static and dynamic content, and microservices.
Overview
Firebase Hosting provides production-grade web content hosting for developers. With a single command, you can deploy web apps and serve both static and dynamic content to a global CDN (content delivery network).
Key Features:
- Fast Content Delivery: Files are cached on SSDs at CDN edges around the world.
- Secure by Default: Zero-configuration SSL is built-in.
- Preview Channels: View and test changes on temporary preview URLs before deploying live.
- GitHub Integration: Automate previews and deploys with GitHub Actions.
- Dynamic Content: Serve dynamic content and microservices using Cloud Functions or Cloud Run.
Hosting vs App Hosting
Choose Firebase Hosting if:
- You are deploying a static site (HTML/CSS/JS).
- You are deploying a simple SPA (React, Vue, etc. without SSR).
- You want full control over the build and deploy process via CLI.
Choose Firebase App Hosting if:
- You are using a supported full-stack framework like Next.js or Angular.
- You need Server-Side Rendering (SSR) or ISR.
- You want an automated "git push to deploy" workflow with zero configuration.
Instructions
1. Configuration (firebase.json)
For details on configuring Hosting behavior, including public directories, redirects, rewrites, and headers, see configuration.md.
2. Deploying
For instructions on deploying your site, using preview channels, and managing releases, see deploying.md.
3. Emulation
To test your app locally:
npx -y firebase-tools@latest emulators:start --only hostingThis serves your app at http://localhost:5000 by default.
Hosting Configuration (firebase.json)
The hosting section of firebase.json configures how your site is deployed and served.
Key Attributes
public (Required)
Specifies the directory to deploy to Firebase Hosting.
"hosting": {
"public": "public"
}ignore (Optional)
Files to ignore on deploy. Uses glob patterns (like .gitignore). Default ignores: firebase.json, **/.*, **/node_modules/**
redirects (Optional)
URL redirects to prevent broken links or shorten URLs.
"redirects": [
{
"source": "/foo",
"destination": "/bar",
"type": 301
}
]rewrites (Optional)
Serve the same content for multiple URLs, useful for SPAs or Dynamic Content.
"rewrites": [
{
"source": "**",
"destination": "/index.html"
},
{
"source": "/api/**",
"function": "apiFunction"
},
{
"source": "/container/**",
"run": {
"serviceId": "helloworld",
"region": "us-central1"
}
}
]headers (Optional)
Custom response headers.
"headers": [
{
"source": "**/*.@(eot|otf|ttf|ttc|woff|font.css)",
"headers": [
{
"key": "Access-Control-Allow-Origin",
"value": "*"
}
]
}
]cleanUrls (Optional)
If true, drops .html extension from URLs.
"cleanUrls": truetrailingSlash (Optional)
Controls trailing slashes in static content URLs.
true: Adds trailing slash.false: Removes trailing slash.
Full Example
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"cleanUrls": true,
"trailingSlash": false
}
}Deploying to Firebase Hosting
Standard Deployment
To deploy your Hosting content and configuration to your live site:
npx -y firebase-tools@latest deploy --only hostingThis deploys to your default sites (PROJECT_ID.web.app and PROJECT_ID.firebaseapp.com).
Preview Channels
Preview channels allow you to test changes on a temporary URL before going live.
Deploy to a Preview Channel
npx -y firebase-tools@latest hosting:channel:deploy CHANNEL_IDReplace CHANNEL_ID with a name (e.g., feature-beta). This returns a preview URL like PROJECT_ID--CHANNEL_ID-RANDOM_HASH.web.app.
Expiration
Channels expire after 7 days by default. To set a different expiration:
npx -y firebase-tools@latest hosting:channel:deploy CHANNEL_ID --expires 1dCloning to Live
You can promote a version from a preview channel to your live channel without rebuilding.
npx -y firebase-tools@latest hosting:clone SOURCE_SITE_ID:SOURCE_CHANNEL_ID TARGET_SITE_ID:liveExample: Clone the feature-beta channel on your default site to live:
npx -y firebase-tools@latest hosting:clone my-project:feature-beta my-project:liveRelated skills
Forks & variants (1)
Firebase Hosting Basics has 1 known copy in the catalog totaling 1k installs. They canonicalize to this original listing.
- firebase - 1k installs
How it compares
Firebase Hosting Classic for static and SPA deploys, not App Hosting for SSR frameworks.
FAQ
Who is firebase-hosting-basics for?
Developers deploying static HTML, CSS, JS, or simple SPAs to Firebase Hosting Classic with the Firebase CLI.
When should I use firebase-hosting-basics?
When you need CDN hosting, preview channels, or firebase.json redirects for a non-SSR web app.
Is firebase-hosting-basics safe to install?
Review the Security Audits panel on this page before installing in production.