// move out

Move your app out of Replit

Where this guide moves it

Other homes work too (GitLab for code, Netlify or Cloudflare for hosting, another Postgres host for data); the order of moves stays the same.

What you own and can take

  • All the code and files in your Replit App, with the Git history behind it.
  • Your database. Replit Database is PostgreSQL, so the production data comes out as a standard pg_dump file.
  • The files in your App Storage buckets, which you can download.
  • Domains you bought through Replit, which you can transfer to another registrar through Replit Support.

What cannot leave

  • Replit Auth accounts. Users sign in with their Replit accounts, so those logins cannot move to Supabase. Users create a new account in your app.
  • Clerk Auth users. Agent provisions a Clerk tenant for your app, and Replit's docs describe no export of those accounts, so plan to invite users again.
  • Secret values, including deployment secrets. You add each one again in Vercel and Supabase.
  • Connectors set up under Tools > Connectors. Each one needs your own account and keys at the new host.
  • Agent history and checkpoints. Checkpoint commits travel in Git history, but you cannot roll back to them outside Replit.

How to export it

  1. Open the Git tool, connect a GitHub repository, then commit and push. Use a private repository. GitHub receives only what you commit, so uncommitted files and .gitignore matches stay behind.
  2. For a one-time copy, use the three-dot menu at the top of the file tree and choose Download as zip.
  3. Open the Database tool, select the production database, open Settings and copy the connection string. Your live data is in production, not in development.
  4. In the Shell, run pg_dump -Fc with that connection string in quotes and the flags --no-owner --no-privileges -f backup.dump.
  5. Download backup.dump from the file tree. Never commit it to the repository.
  6. Download the objects from each App Storage bucket. Buckets do not move between accounts.
  7. Copy every value from the Secrets tool, including deployment secrets, into a password manager. Secret values never leave the project on their own.

The order of moves

  1. Code

    1. Confirm the code is pushed to GitHub, then clone it and run the app locally with its start command.
    2. Check how the app is served. An Express server deploys on Vercel as a function when an app, index or server file exports the app or calls app.listen.
    3. Move static assets into public/. On Vercel, express.static() is ignored.
    4. Find any code that saves uploads or data to the local disk, and change it to use Supabase Storage or the database.
    5. In Vercel, choose Add New > Project, import the repository and deploy.
  2. Database

    1. Create a Supabase project. Copy the Session pooler connection string for the restore, and the Transaction pooler string for the app.
    2. Restore the dump with pg_restore --no-owner --no-privileges into the Supabase connection string.
    3. Roles and privileges are not migrated. Recreate any custom roles you need.
    4. Row-level security status is not migrated. Turn it on for each table and add policies, or keep the tables reachable only from your server code.
    5. Set DATABASE_URL in Vercel to the Transaction pooler string, and turn off prepared statements in your database library, which transaction mode does not support.
  3. Sign-in and file storage

    1. Add Supabase Auth to the app, replacing the Replit Auth or Clerk Auth code, and enable the sign-in methods you need under Authentication > Sign In / Providers.
    2. Set the Site URL and Redirect URLs under Authentication > URL Configuration to your Vercel and production URLs.
    3. If your tables link records to Replit or Clerk user IDs, plan how to match them to the new Supabase user IDs, for example by email.
    4. Create buckets in Supabase Storage, upload the objects you downloaded, and replace the App Storage calls in your code.
    5. Add every secret to Vercel under Settings > Environment Variables, then redeploy. Changes apply only to new deployments.
  4. Domain

    1. Test the app on its vercel.app address with real data before you switch.
    2. Unpublish the app on Replit in the Publishing tool, take a final pg_dump of production and restore it into Supabase.
    3. In the Replit project, open Publishing > Domains and disconnect the domain. The domain itself is not deleted.
    4. In Vercel, open Settings > Domains, click Add Domain and add the DNS records Vercel shows at your registrar.
    5. If the domain was bought through Replit, contact Replit Support to transfer it to another registrar. ICANN rules require 60 days after purchase first.

What usually breaks after the move

  • The app crashes on Vercel because secrets from Replit's Secrets tool were never added as environment variables. Read the fix
  • Uploaded files disappear after a redeploy, because the app saved them to local disk instead of storage. Read the fix
  • The live app shows old or empty data because the dump came from the development database instead of production. Read the fix
  • Restored tables have row-level security off, so the Supabase anon key can read them. Read the fix
  • Queries fail with prepared statement errors over the Transaction pooler until prepared statements are turned off in the database library.
  • Images, CSS and other static files return 404 because Express served them with express.static(), which Vercel ignores.

Sources