To connect Firebase to a self-hosted web push panel, create a Firebase project, register a web app in it, copy the app’s configuration values, and paste them into your panel when you add your website. Some panels also ask for a Web Push certificate (VAPID key) or a service account file from the same project. Then send a test notification.
Self-hosted push notification Firebase setup sounds intimidating, but it’s mostly a short console task. I’ve written this guide because the Firebase console has many screens that don’t matter for web push, and it’s easy to copy the wrong value. Below is what Firebase does in a self-hosted setup, the exact steps, and the mistakes I’d check first.
Why does a self-hosted push panel need Firebase?
A self-hosted panel uses Firebase because Firebase Cloud Messaging (FCM) is Google’s delivery network for push. Your server stores subscribers and builds campaigns, then hands each message to FCM, which delivers it to the browser.
Not every self-hosted tool needs a Firebase project. The open Web Push protocol with VAPID keys can work without one, as I explain in can you self-host web push without Firebase. However, many panels, including LaraPush, are built on FCM and ask for Firebase configuration when you add a site. If your panel asks for it, follow this guide.
What do you need before you start?
You need a Google account, access to your push panel, and your website already running on HTTPS. Firebase project creation is free.
| Item | Why you need it |
|---|---|
| Google account | To sign in to the Firebase console |
| Installed push panel | Where you paste the Firebase values |
| HTTPS website | Browsers only allow push on secure pages |
| Access to site files or WordPress | To place the script and service worker afterwards |
If the panel isn’t installed yet, start with how to install a self-hosted push panel on a VPS. If your site isn’t on HTTPS, read do you need HTTPS for web push first.
How do you connect Firebase to a self-hosted web push panel?
You connect Firebase in about six steps, all in the Firebase console and your panel. The console layout changes now and then, so treat the menu names below as a guide.
Step 1: Create a Firebase project
- Open the Firebase console and click to add a new project.
- Name it after your site or panel, for example “example-push”.
- Decide whether to enable Google Analytics; web push doesn’t require it.
- Finish and wait for the project to be created.
Step 2: Register a web app
- In the project overview, choose to add an app and pick the web icon (</>).
- Give the app a nickname, such as your domain name.
- Skip Firebase Hosting unless you actually use it.
- Register the app.
Step 3: Copy the web app configuration
After registering, Firebase shows a firebaseConfig object. You can find it again under Project settings, General, Your apps. It contains values such as apiKey, authDomain, projectId, storageBucket, messagingSenderId and appId. Google explains these in its guide to Firebase project configuration.
Step 4: Get extra keys only if your panel asks
Some panels also need a Web Push certificate, which is a VAPID key pair. You’ll find it under Project settings, Cloud Messaging, Web configuration, where you can generate a key pair. Others ask for a service account JSON file, under Project settings, Service accounts, to send through the FCM HTTP v1 API.
Step 5: Paste the values into your panel
Add your website in the panel and paste each value into the matching field. Copy them exactly, without extra spaces or quote marks.
Step 6: Install the script and send a test
Place the panel’s JavaScript and service worker on your site, or use its WordPress plugin. Then subscribe in your own browser and send a test notification.
Which Firebase values go where?
The web app configuration identifies your Firebase project to the browser script. A VAPID key or service account, when required, proves that your server is allowed to send. Mixing them up is the most common setup error I see.
| Value | Where to find it in Firebase | Typical use |
|---|---|---|
| apiKey, projectId, appId | Project settings, General, Your apps | Browser script and service worker setup |
| messagingSenderId | Same config object | Identifies the FCM sender |
| Web Push certificate (VAPID key pair) | Project settings, Cloud Messaging | Getting browser tokens with your own key, if the panel uses it |
| Service account JSON | Project settings, Service accounts | Server-side sending via FCM HTTP v1, if required |
Google’s FCM web client guide shows how the browser side uses these values. You don’t need to write that code yourself if the panel generates it. Note that Google retired the legacy FCM APIs and server keys in favour of the HTTP v1 API, and Google documents the current method in its FCM HTTP v1 API guide. So if an old tutorial tells you to copy a “server key”, it’s out of date.
Is the Firebase config secret?
The web app config isn’t a secret, because it ends up in your site’s JavaScript anyway. A service account JSON file is secret, since it grants server access to your Firebase project.
Keep the service account file and any private VAPID key out of public repositories and shared chats. In addition, store a copy in a password manager or encrypted backup. Subscriptions depend on the keys that created them, so losing them can cut you off from your list. My checklist on how to secure a self-hosted push notification server covers this in more detail.
What if test notifications don’t arrive?
If tests don’t arrive, check the configuration first, then the browser. Most failures come from a pasted value with a typo, a service worker in the wrong location, or notifications blocked in the browser or OS.
- Compare each pasted value with the Firebase console, character by character.
- Confirm the service worker file loads at the URL the panel expects on your domain.
- Check that the site uses HTTPS and the browser permission says “Allow”.
- Check OS settings, such as Focus modes or Do Not Disturb.
- Make sure you used values from the right Firebase project if you have several.
For browser-side causes, see my guide to web push notifications not showing.
Can one Firebase project serve several websites?
Often yes, but it depends on the panel. A single project can hold several web apps. Some panels let one project serve many sites, while others expect a project or app per site.
My rule is to follow the panel’s documentation rather than guess. Changing Firebase projects later can affect existing subscriptions, so pick a setup once and stick to it. If you run many sites, read push notifications for multiple websites.
Where does LaraPush fit?
LaraPush is a self-hosted web push panel that delivers through Firebase Cloud Messaging. After the free automated install, you add your website in the panel along with its Firebase configuration, then embed the JavaScript and service worker or use the free WordPress plugin. The setup guide has the exact fields.
You run the VPS yourself, the licence covers one server, and there’s no free plan. Plans start from $499 one-time; check the pricing page for the current price and the features page for what each plan includes. For a wider comparison, see my guide to push notification services.
Frequently asked questions
Creating a Firebase project is free, and Google lists Firebase Cloud Messaging as a no-cost product on its Firebase pricing page. Your costs come from the push panel and the server you run it on. Check the current pricing page before relying on this for a large project.
In the Firebase console, open Project settings, then the General tab, and scroll to Your apps. Select your web app to see the firebaseConfig object with apiKey, projectId, messagingSenderId and appId. If no web app is listed, register one first.
Not for new setups. Google retired the legacy FCM APIs and server keys, and sending now uses the FCM HTTP v1 API, which authenticates with a service account. If your panel asks for credentials, follow its current guide rather than old tutorials that mention a server key.
Be careful. Existing subscriptions are tied to the keys and project setup that created them, so switching projects can stop delivery to current subscribers. Ask your panel’s support before changing it, and back up the current configuration first.
FCM delivers messages to Chrome and other browsers, so Google handles the delivery step. In a self-hosted panel, the subscriber database itself stays on your own server. Read Google’s Firebase privacy documentation if you need details for a privacy policy.




