How to move a Lovable project to your own repo and database
Lovable's docs say you can export the code through its GitHub integration at any time, and that the database can be moved to another provider. This is the order to do it in, and where people usually trip. Lovable changes often, so check its self-hosting page for the current state.
The seven steps
- Connect GitHub and push the project. Clone the repo. It holds the whole frontend and the database schema files.
- Make a new Postgres database. Supabase or any other Postgres. Run the schema from the repo against it so the tables and policies exist.
- Export your data. The documented way is a CSV per table from the Database section. Import them into the new database in dependency order, so tables that others point to come first.
- Move your auth providers by hand. Google and other sign-in settings do not come across. Set them up again and update the redirect URLs to the new domain.
- Plan for your users. Passwords cannot be copied, and one community guide says users need a password reset. Offering Google sign-in avoids that.
- Update the environment variables. Point the app at the new database, then test every screen that reads or writes data. Check the row level security policies: a table that worked before can return empty rows with the new setup.
- Deploy the repo and point the domain at it. Any host that runs a Node or static app works.
Before relying on this, open your project's settings and check what Lovable currently says about removing or pausing its backend. Sources disagree on that point, and it changes between versions.
Two ways to do step 2
- Keep Supabase. The app keeps its Supabase client code, so the change is mostly keys and URLs. Fastest if you like Supabase.
- Move to plain Postgres and your own server code. More work, because the data calls in the frontend move into server code. In return the database, sign-in and hosting live in one place.
Prompt: move an exported Lovable project to its own hosting
Paste this into Claude Code, Cursor, Codex or any agent that can run commands.
Read https://portal.traceshield.app/agent.md and follow it. This folder is a project exported from Lovable through GitHub. Move it onto its own hosting and Postgres database. Read the schema files and create the tables with migrations that run when the app starts. Replace the old backend keys and client calls with server code that uses DATABASE_URL, and set secrets as environment variables. Use Traceshield's built-in Google sign-in. Do not invent data. Deploy it, and tell me the live URL, which tables I still need to import data into, and anything that does not work yet.
You export the data from Lovable yourself (CSV per table). Traceshield does not import it for you yet, and the prompt tells the agent to leave the tables ready for it.
What Traceshield does here, and what it doesn’t
Traceshield does not migrate Lovable data automatically. It gives the exported project a database, Google sign-in, hosting and logs once the agent has rewritten the data calls. That rewrite is real work, so keep Supabase if you only want to leave Lovable and not change the backend.
More guides
Updated 2026-10-27. Written by the Traceshield founder.