Create a Lark project
Create a project in the Lark dashboard. Note your project ID — you’ll need it for the connection URL.
Enable Firebase compatibility
In project settings, toggle Allow Legacy Firebase. This turns on the Firebase wire protocol so your existing SDKs can connect.If your Firebase app stores multiple independent data silos (game rooms, workspaces, etc.) under path prefixes, Lark can split them into separate databases automatically. See Database routing for your options.
Configure Firebase Auth (if applicable)
If you use Firebase Auth, enter your Firebase project ID in the Firebase Auth Project ID field. This lets Lark validate your users’ tokens. See Firebase Auth with Lark for details.
Migrate security rules
Copy your Firebase RTDB security rules into Lark’s security rules editor. The syntax is identical — paste them in and click Save Rules.You can find your current rules in the Firebase console under Realtime Database > Rules.
Export your data
In the Firebase console, export your database as JSON. Or use the Firebase CLI:For large databases, consider exporting individual paths to keep file sizes manageable.
Import your data
In the Lark dashboard, open your database and use Import to upload the JSON file. This writes the data to your Lark database in the same structure it had in Firebase.
Common gotchas
A few things to double-check before you go live:- Ephemeral mode — Make sure ephemeral mode is OFF if you want data to persist. Ephemeral mode is a Lark feature that discards data when all subscribers disconnect. Great for presence systems, not great for your users table.
- Auto-create — If you’re using database routing to split data into separate databases, enable auto-create so Lark creates databases on first connect.
- Security rules — Test your rules in Lark’s rules editor before going live. The syntax is the same, but it’s worth verifying that everything was copied correctly.
- Volatile paths — If you have high-frequency data like cursor positions or player movement, consider configuring volatile paths. Firebase SDK clients fully support volatile updates — Lark batches them on the server and delivers them as
PATCHevents that the Firebase SDK handles natively. You just need to define the volatile path patterns in your project settings.

