Skip to main content
Altitut uses Firebase as its primary persistence layer. Firestore stores all structured application data while Firebase Storage holds the media files your team uploads before publishing. If you are using the hosted Altitut service, Firebase is already configured for you — this guide is for teams self-hosting their own Altitut instance who need to connect their own Firebase project.

What Firebase Powers

Firestore Database

Real-time NoSQL storage for all your content, posts, and workspace data.

Firebase Storage

Binary file hosting for videos and images used in the Auto-Post Composer.

Real-Time Updates

The dashboard reflects data changes instantly without requiring manual refreshes.

Direct Browser Uploads

Media files upload straight from the browser to Storage, keeping large payloads off your API server.

Setup

1

Create a Firebase project

Go to the Firebase Console, click Add project, and follow the setup wizard. You can reuse an existing Google Cloud project if you have one.
2

Enable Firestore

In the Firebase Console, navigate to Build → Firestore Database and click Create database. Choose Production mode and select a region close to your users.
Pick a region that matches your API server’s region to minimize read/write latency.
3

Enable Firebase Storage

Navigate to Build → Storage and click Get started. Accept the default security rules for now — you will update them in the next step.
4

Configure Storage security rules

Update your Storage rules to allow authenticated users to upload media while keeping download URLs publicly readable:
5

Register a web app and get client credentials

In the Firebase Console, go to Project settings → General and click Add app, selecting the Web platform. Firebase will display a configuration object containing your API key, project ID, and other public values — copy these for the environment variables below.
6

Create a service account

Go to Project settings → Service accounts and click Generate new private key. Save the downloaded JSON file securely — you cannot download it again. This is your FIREBASE_SERVICE_ACCOUNT_JSON.
7

Set environment variables

Add the following variables to your server environment:
string
required
Client SDK configuration values found in Project settings → General → Your apps. These are safe to include in browser-side code.
string
required
The full service account JSON as a single-line string. Used exclusively by the server to perform privileged operations. Never expose this to the browser.
string
required
Your Storage bucket name (e.g., your-project.firebasestorage.app). Required by the server to reference the correct bucket.
Never commit FIREBASE_SERVICE_ACCOUNT_JSON to source control or expose it in client-side code. A leaked service account key grants full read/write access to your Firestore database and Storage bucket.
8

Verify the connection

Start your development server and open the Altitut dashboard. If Firestore is connected correctly, the Content Creation and Auto-Post tabs will load data (or display empty states) without console errors. Upload a test image in the Auto-Post Composer to confirm Storage is working.
If you are deploying to Google Cloud (Cloud Run, App Engine, etc.), the server can use Application Default Credentials attached to the service account of your Cloud resource — you may not need to supply FIREBASE_SERVICE_ACCOUNT_JSON in that environment.