Skip to content
RefinoStart free

How to move a Replit website to GitHub and your own hosting

A Replit project is an ordinary folder of code you can push to GitHub or download, but Replit Agent likes to build on Replit’s own database, sign-in and storage services. How much work leaving takes depends on how many of those the site uses. This guide is how to find out and what to do about each.

Published September 11, 2026 · About a 9 minute read · Last reviewed September 2026

This is the Replit-specific version of leaving an AI builder. Replit is a general development environment rather than a site builder, so the code is easy to get out. What makes leaving work is Replit Agent’s habit of building on Replit’s own services: its database, its sign-in system, its file storage and its managed API keys. Replit has no documentation for deploying an app anywhere else; this guide fills that gap from Replit’s own docs on the date at the top. Replit renamed things in 2025 and 2026: “Repls” are now apps or projects, “Deployments” are Publishing, and the free plan is Starter.

Not sure yet what you own there? The companion guide, do you actually own your Replit site?, sorts the layers before you move anything.

What Replit lets you take with you

LayerWhat Replit offers today
CodeDownload as ZIP from the file tree, or push to a GitHub repository from the Git pane, one click per push or with an auto-sync toggle. Agent’s checkpoints are ordinary Git commits.
HostingReplit publishing, on Google’s infrastructure, at a replit.app address or a custom domain. Starter’s published link expires after 30 days; paid plans’ don’t.
BackendTwo Postgres databases per app: a development one on Replit’s own infrastructure, reachable only from inside Replit, and a production one on Neon, reachable from anywhere. App Storage is Google Cloud Storage, one bucket per project. Replit Auth signs users in with Replit accounts.
DomainDomains bought through Replit can be transferred out by contacting support, after the 60-day lock. The registrar isn’t named.
SecretsThe Secrets pane, encrypted, with an “Edit as .env” view. Secrets never travel with a ZIP or a push.

Step 1: Work out which Replit services the app uses

Open the app and check each of these panes. Every one that’s in use adds a step later.

  • Database. If it exists, note whether there’s a production database as well as the development one, and whether DATABASE_URL contains helium (current infrastructure) or neon.tech (older).
  • Auth. If the app uses Replit Auth, users sign in with Replit accounts. This is the hardest dependency; see step 6.
  • App Storage. Uploaded files.
  • Secrets. Everything the app needs that isn’t code.
  • Integrations. Stripe connected through Replit’s Stripe app, Whop, email connectors, and Replit’s AI integrations, which use Replit-managed keys.
  • Publishing. The deployment type: Autoscale, Reserved VM, Static or Scheduled. Agent apps have a server and can’t be static.

Replit doesn’t document a standard stack for Agent apps. Open package.json to see the framework, and look for anything named @replit/ (the App Storage client is one) and for the environment variables REPLIT_DOMAINS, REPLIT_DEPLOYMENT, REPL_ID and REPL_OWNER in the code. Each is something a developer will have to replace or stub off-platform. The files .replit, replit.nix and replit.md are Replit’s own configuration and can be ignored elsewhere.

Step 2: Get the code

Both routes are official. Download as ZIP from the three-dot menu at the top of the file tree; for a large project, Replit’s fallback is to zip it from the Shell. The ZIP contains everything on disk, including uncommitted changes and, if present, the .git history.

For GitHub, link your GitHub account in Replit’s connected services, open the Git pane, initialize a repository if there isn’t one, connect it to a repository on GitHub, and push. Pushes are one click and manual unless you turn on auto-sync. GitHub receives only what’s committed; ignored and uncommitted files stay behind. Replit says plainly never to commit secret values or database dumps.

Step 3: Make sure the repository is under an account you control

The Git pane pushes to whatever repository you connected, so create it under your own GitHub account or organization first and check the owner, per the GitHub guide. If someone else’s Replit account owns the app, note that Replit can’t transfer a project between personal accounts; they can share it for you to fork, or push it to your repository, and you take it from there. Secrets, the database and publishing settings don’t come with a fork.

Step 4: Inventory secrets and platform-managed services

Method in the secrets guide. Replit specifics:

  • Secrets pane. Use Edit as .env to see every name and value in one place. Development and deployment secrets are kept separately, so check both. This is the only export; secrets never leave otherwise.
  • Stripe. If it was connected through Replit’s Stripe Marketplace app, there may be no keys in Secrets at all. Create keys in your own Stripe account for the new host. If it was connected by pasting keys, those keys are yours.
  • Whop. Agent’s default payment option creates a Whop account tied to your Replit email. It’s a Whop account, so it comes with you.
  • Email. Resend or SendGrid connectors save an API key as a secret. Replit sends Replit Auth’s own password-reset emails, which stop mattering once you leave Replit Auth.
  • AI features. Replit’s AI integrations use Replit-managed keys with no account of your own. An app that calls a model needs your own provider key after the move.
  • Forms usually write to the app’s database; check the code.

Step 5: Prepare the replacement host

Agent apps have a Node server, so pick a host that runs one: Vercel and Netlify for a Next.js-style app, or a container host for an Express-style server. Follow the host move guide and, for the two hosts that run Node without containers, the walkthrough for Vercel or Netlify. Replit offers no recipe for this; a developer or coding agent will need to set the build and start commands from what .replit and package.json say, and replace any use of the REPLIT_ variables.

Step 6: Move the database, auth and storage

Database

Replit documents the export: a pg_dump from the Shell using DATABASE_URL for the development database, and for the production database, the connection string from the Database tool’s Settings tab, which works from any Postgres client anywhere. Your live data is normally in the production one. Restore the dump into a Postgres provider you own (Neon, Supabase and others all take it) and set the new DATABASE_URL on the new host. Note that older apps expose PG* variables as well; current ones only DATABASE_URL.

Replit Auth

This is the dependency that can’t be exported. Users of a Replit Auth app sign in with Replit accounts through Replit’s shared OAuth apps; Replit Auth can only be set up by Agent, and there’s no documented user export. The one documented migration is Agent moving the app from Replit Auth to Clerk, which carries user identities and supported credentials across. Do that while the app is still in Replit. Note that Replit provisions a Clerk tenant it manages; you can bring your own Clerk app instead, and Replit says switching from the managed tenant to your own is a support request. Aim for your own Clerk app, which then moves with the code. The Replit Auth guide has the safe sequence, including how existing users re-establish themselves.

App Storage

Each bucket is tied to one project. Replit’s cross-account instruction is to download the objects and upload them to a new bucket; downloads are through the storage view or the SDK from inside the project. Put them in a storage service you own and replace the @replit/object-storage client in the code. The data guide covers the rewriting of stored file addresses.

Step 7: Deploy and test before changing DNS

On the new host’s own address, test the pages, sign-in (now Clerk or whatever replaced Replit Auth), forms, database reads and writes, uploads, email and payments in test mode.

Step 8: Change the website DNS records

A domain connected to Replit has an A record Replit gave you plus a TXT record starting replit-verify=. Replace the A record with the new host’s values, following the DNS guide. The TXT record was required for the life of the Replit connection and is harmless afterwards. If the domain was bought through Replit, transferring it to a registrar of your own is a support request, after the 60-day lock; the transfer guide covers the rest.

Step 9: Verify

  • The site loads at the domain and at www, over https.
  • Users can sign in through the replacement auth provider, and existing users were migrated.
  • The database on the new provider has the production data, not the development data.
  • Uploaded files load from the new storage.
  • Payments use your own Stripe or Whop account; email sends; AI features use your own key.

Step 10: Only then decide what to do with Replit

  • Unpublishing stops the live deployment and removes its custom domain connection, but keeps the code and the database. Do it after the new host is live.
  • Downgrading deletes nothing. Deleting a project can be undone for about 30 days; deleting the account purges everything, unrecoverably.
  • On a free account, inactivity for a year can lead to the apps being deleted. Don’t treat a dormant Replit as a backup.
  • Databases have a seven-day soft-delete window; after that they’re gone.

Traps: when “pushed to GitHub” isn’t the whole site

  • Replit Auth doesn’t export. Migrate to Clerk first.
  • The development database can’t be reached from outside Replit. Dump it in the Shell, and don’t confuse it with production.
  • Managed credentials: Stripe via the Marketplace app, AI integrations and App Storage all authenticate through Replit. Each needs an account of your own afterwards.
  • Secrets never travel, and .cache can leak them.
  • Starter publishing expires after 30 days, and payment failures suspend paid apps after a day’s grace.

Once the code is in your repository and the services are in your accounts, the app is portable in the way the rest of these guides describe, and Refino can give you direct control of its words without a prompt.

Sources

The rules and product behaviour described above were checked against these pages when the guide was last updated. If something here has changed, these are the places to look.

Keep going

Or go back to the overview of what owning your site means, which ties all of these together.

  • Do you actually own your Replit site?

    What you own when you build on Replit, and what still depends on Replit: the code and how to push it to GitHub, Replit’s publishing and deployments, its databases, Replit Auth, App Storage, secrets, domains bought through Replit, and what the documentation says happens when you stop paying. With an ownership checklist.

    About a 8 minute read

  • How to take your website with you when you leave an AI builder

    Leaving an AI website builder means more than downloading the code. An inventory of everything a site depends on, from the domain to the database to the secrets, and a structured checklist for moving it all.

    About a 10 minute read

  • Where your website’s data lives

    Owning the repository is not the same as owning the website. The database, uploaded files, user accounts, form submissions, CMS content and analytics each live in a service with its own owner. How to find every one, work out whose account it’s in, check whether the data can be exported, and record what would have to move.

    About a 9 minute read

Get started

Your first site is free.

Sign in with GitHub, connect the site you built with AI, and change its words yourself. Free covers one site, with no card and no end date. Pro covers up to five.

Questions first? Email hello@refino.dev. We read every message and reply ourselves.