Back to Field notes

All field notes

How to

How to move an Emergent app off the platform and own the code

5 min read /

Emergent's help centre says you retain full ownership of the apps you build, and it documents how the code leaves: on paid plans (Standard and above) through Save, then Save to GitHub, or on any plan by copying files from the VS Code view. It also says there is no download or archive button (Emergent help, FAQs). The code is the easy part. Secrets stay on the platform, the MongoDB data has to be moved by hand, and AI features may depend on Emergent's own key. Move them in that order, and confirm the details below with Emergent support before you rely on them, because plans and steps change.

What Emergent's help centre confirms

  • Web apps are published to an address ending in emergent.host, and the Free plan cannot publish.
  • Data is stored in a MongoDB Atlas database provisioned for each project. External MongoDB clients cannot connect to it; you use Emergent's Database Manager, which edits live data with no undo.
  • Because MongoDB has no Postgres-style row level security, the FAQ says per-user access rules must be enforced in your app's API layer.
  • Publish history keeps up to three earlier images you can roll back to.
  • Deleting a project permanently removes the code, database and related resources, and cannot be undone.

Step 1: get the code into GitHub

Use Save, then Save to GitHub, then clone the repository. Emergent's secrets page says the .env file is excluded from GitHub pushes automatically (Emergent help, Secrets and environment variables); the FAQ still tells you to make sure it is git-ignored before you save. Our advice: clone the repository into an empty folder on another machine and read the README and folder structure, so you know which parts are the browser app and which part is the server.

Step 2: list every secret

Emergent says secrets live only on the platform and do not sync to GitHub, and that it injects them into the app's container when it starts. So a copy of the code running elsewhere starts without them. Open Preview, Manage, Secrets, write down every key name, and plan where each value will live on the new host. Keep the values themselves out of shared documents. Emergent says you must configure secrets separately in any outside hosting environment. If a key has ever been committed, rotate it at the provider.

Step 3: move the data

Emergent's database page describes the move as manual and for published apps only (Emergent help, Database (MongoDB)).

  1. Preview and production are separate databases. Changes in preview do not flow to production after the first publish.
  2. Preview data can be exported with mongodump from the workspace VS Code terminal and downloaded. The managed production cluster does not accept direct outside connections, so for a production export the page points you to the Database Manager or to support. We could not confirm a self-serve production export.
  3. Create your own MongoDB database (Emergent recommends Atlas), import with mongorestore and check the import.
  4. Allow Emergent's outgoing IP addresses in your database's network list, update MONGO_URL (and DB_NAME if it changed) in Secrets, and re-publish. The page stresses the key is MONGO_URL, not another name.

Emergent says there is no automatic copy, sync or zero-downtime cut-over, and no guaranteed rollback to the managed database, so keep a verified export. This step is useful on its own: the app keeps running on Emergent while the data already lives in an account you control.

Step 4: replace the Universal LLM Key

If your app uses AI, it may call models through Emergent's Universal LLM Key, paid from Emergent credits. Emergent says the key works inside published apps, and that its proxy only accepts requests from known Emergent infrastructure or a verified address (Emergent help, Universal LLM Key). The page does not say how an app hosted elsewhere is handled, so plan to switch to your own provider keys. Emergent says you can do that by updating the project's Secrets.

Step 5: host it and cut over

Emergent's FAQ says that once the code is exported you can publish to any hosting provider. Which host suits you depends on what is in the repository: a browser-only app needs a static host, while a server needs a host that runs it. Our own advice for the cut-over:

  • Run the exported app on the new host with a copy of the data and every secret set.
  • Test sign-up, sign-in, the main create and edit flows, uploads, payments and AI features.
  • Check that one user cannot read another user's records, since those rules live in your code. Our note on data access mistakes describes a two-account test that works on any stack.
  • Move the domain last, and keep the Emergent project until everything passes. Deleting it first is the one step you cannot undo.

Confirm these with Emergent support

Ask for current answers on four points: how to get a full production data export for your plan, which plans include Save to GitHub, the current list of outgoing IP addresses, and how AI calls should be set up for an app hosted outside Emergent. Emergent's FAQ lists support@emergent.sh as the contact.

Want it moved for you?

App Rescue and Move to Cloudflare can move the app to Cloudflare as code you own, from $2,999 USD with a fixed quote first. The AI-Built App Audit ($299 USD) shows what to fix before you move, and App Triage ($99 USD) is the smallest first step. For Lovable and Bolt, read how to export your code and keep it running.

Emergent, MongoDB, Atlas and GitHub are trademarks of their respective owners. Red Center Studio is an independent studio and is not affiliated with, endorsed by or certified by any of them. The names describe the technology this note is about. Details were checked in each company's own documentation on 15 November 2026 and can change.

Edited

Sources

  1. FAQs, Emergent help centre
  2. Secrets and environment variables, Emergent help centre
  3. Database (MongoDB), Emergent help centre
  4. The Universal LLM Key, Emergent help centre

More field notes