Localess
Setup

Firebase

Deploy Localess to production on Firebase.

Firebase is the recommended way to run Localess in production. It uses Google Cloud infrastructure — Firebase Hosting, Firestore, Cloud Functions, and Cloud Storage — deployed automatically via Cloud Build.

For local exploration or personal use without a Google Cloud account, see the Docker or Local setup instead.

Prerequisites

Before you start:

Create Project

Open the Firebase console and create a new project.

Create Web App connection

  • In the Firebase console, open Firebase Settings
  • Go to your Apps section
  • Select the Web App icon
    • Fill in the App nickname field
    • Check Also set up Firebase Hosting for this app checkbox
    • Press Register app
    • The registered app values will be used automatically during build in Cloud Build
    • Press Next
    • Press Next again
    • Press Continue to console

Authentication

Localess uses Firebase Authentication to identify users and keep data secure. Enable Identity Platform in the Settings tab before configuring sign-in methods.

Email/Password

Login by Email and Password is enabled by default.

Google Identity Provider

  • In the Firebase console, open the Auth section.
  • On the Sign-in method tab, enable the Google sign-in method.
  • Click Save.

To restrict access to a specific organisation domain, set the _LOCALESS_AUTH_CUSTOM_DOMAIN substitution variable in your Cloud Build trigger.

Microsoft Identity Provider

  • In the Firebase console, open the Auth section.
  • On the Sign-in method tab, enable the Microsoft provider.
  • Add the Client ID and Client Secret from the Azure portal:
    • Register a new app following the Azure AD v2.0 quickstart.
    • Add *.firebaseapp.com as a redirect URI for your Firebase project.
  • Click Save.

Hosting

In the Firebase console, open the Hosting tab and create a default hosting site.

Firestore

In the Firebase console, open the Firestore tab and create a default database.

Service Account

Create a service account named build-deploy to assign to Cloud Builder. Follow the official guide.

The service account requires the following IAM roles:

RolePurpose
Cloud Build Service AccountRun builds
Firebase AdminFull access to Firebase products
Service Account UserAct as the service account
Storage Usage AdminManage storage service state
Storage Object AdminFull control over storage objects

Enable Cloud APIs

Open Cloud Shell and run the following command. Some APIs take 5–10 minutes to become active after enabling, so run this ahead of your first deployment:

gcloud services enable \
  firebasestorage.googleapis.com \
  firebaseextensions.googleapis.com \
  cloudfunctions.googleapis.com \
  cloudbuild.googleapis.com \
  artifactregistry.googleapis.com \
  run.googleapis.com \
  eventarc.googleapis.com \
  pubsub.googleapis.com \
  storage.googleapis.com \
  translate.googleapis.com \
  cloudbilling.googleapis.com

The command enables the following APIs:

APIService
firebasestorage.googleapis.comCloud Storage for Firebase
firebaseextensions.googleapis.comFirebase Extensions
cloudfunctions.googleapis.comCloud Functions
cloudbuild.googleapis.comCloud Build
artifactregistry.googleapis.comArtifact Registry
run.googleapis.comCloud Run
eventarc.googleapis.comEventarc
pubsub.googleapis.comPub/Sub
storage.googleapis.comCloud Storage
translate.googleapis.comCloud Translation
cloudbilling.googleapis.comCloud Billing

Configuration

The cloudbuild.yaml at the root of the repository is pre-configured for Localess deployments. No manual edits are required.

Cloud Build

To automatically deploy on every push, create a Cloud Build trigger:

  • Open Cloud Build Triggers
  • Click Create trigger and configure:
    • Name — a name for your trigger
    • Event — Push to a branch
    • Repository — your fork of https://github.com/Lessify/localess
    • Branchmain
    • Configuration type — Cloud Build configuration file (YAML or JSON)
    • Location — Repository
  • Under Substitution variables, add:
VariableDescription
_LOCALESS_AUTH_CUSTOM_DOMAINRestrict sign-in to this domain (e.g. lessify.io). Leave empty to allow all domains.
_LOCALESS_AUTH_PROVIDERSComma-separated auth providers. Available values: GOOGLE, MICROSOFT.
_LOCALESS_LOGIN_MESSAGEOptional message displayed on the login screen.
  • Click Create.

First start

After the first successful deployment, open the setup page to create your first user:

  • https://<firebase-project-id>.web.app/setup
  • https://<firebase-project-id>.firebaseapp.com/setup

Troubleshooting

Cloud Function API not enabled

functions: missing required API cloudfunctions.googleapis.com. Enabling now...

Enable Cloud Functions API in Marketplace, then re-run the Enable Cloud APIs command.

Artifact Registry API not enabled

artifactregistry: missing required API artifactregistry.googleapis.com. Enabling now...

Enable Artifact Registry API in Marketplace, then re-run the Enable Cloud APIs command.

Cloud Run API not enabled

functions: missing required API run.googleapis.com. Enabling now...

Enable Cloud Run API in Marketplace, then re-run the Enable Cloud APIs command.

Eventarc API not enabled

functions: missing required API eventarc.googleapis.com. Enabling now...

Enable Eventarc API in Marketplace, then re-run the Enable Cloud APIs command.

Missing permissions

Missing permissions required for functions deploy. You must have permission iam.serviceAccounts.ActAs on service account project-id@appspot.gserviceaccount.com.

Assign the Service Account User role to project-id@appspot.gserviceaccount.com. Changes may take a few minutes to propagate.

IAM Roles verification failed

functions: Failed to verify the project has the correct IAM bindings for a successful deployment.

Run the gcloud projects add-iam-policy-binding commands shown in the error output. You can execute them directly in Cloud Shell.

Function requires manual deletion

Error: The following functions are found in your project but do not exist in your local source code:
importLocaleJson(us-central1)

Delete the orphaned function from one of:

  • Google Cloud Console → Cloud Functions
  • Google Cloud Console → Cloud Run
  • Firebase Console → Functions

Cloud Translation API not enabled

Cloud Translation API has not been used in project {projectId} before or it is disabled

Enable Cloud Translation API in Marketplace, then re-run the Enable Cloud APIs command.

On this page