{
  "manifest_version": "1",
  "slug": "migrate-replit",
  "title": "Apps from Replit",
  "headline": "Move a Replit app and its data to exe.dev",
  "description": "Move a Replit app, built by Replit Agent or by hand, to an exe.dev VM: its .replit run and build, PostgreSQL, Replit Database, secrets, and domain.",
  "category": "migration",
  "tags": [
    "replit",
    "replit agent",
    "export replit",
    "self-host replit",
    "replit alternative",
    "replit deployments",
    "replit database",
    "replit db",
    ".replit",
    "replit.nix",
    "replit postgres",
    "autoscale"
  ],
  "url": "https://exe.dev/deploy/migrate-replit",
  "markdown_url": "https://exe.dev/deploy/migrate-replit.md",
  "upstream": {
    "website": "https://replit.com",
    "source": "https://github.com/replit/replit-py",
    "docs": "https://docs.replit.com/",
    "license": "Proprietary (Replit); your app's code is yours"
  },
  "example_vm_name": "my-replit",
  "time": "30 minutes",
  "stack": [
    {
      "name": "Caddy",
      "detail": "The front door on port 8000; routes paths to your servers and serves static builds, as Replit's router did",
      "port": 8000
    },
    {
      "name": "Your Replit app",
      "detail": "Each server it publishes as a systemd service in app.target, read from .replit by replit-plan; always on",
      "data": "~/app → the current release in ~/releases"
    },
    {
      "name": "PostgreSQL 18",
      "detail": "In place of Replit's production database, set up as in the PostgreSQL recipe, with nightly backups",
      "data": "/var/lib/postgresql/18/main, ~/postgres/backups"
    },
    {
      "name": "Replit Database",
      "detail": "replitdb answers its API on 127.0.0.1:8099, so the replit and @replit/database clients work unchanged",
      "port": 8099,
      "data": "~/replitdb.sqlite"
    },
    {
      "name": "Node.js 24, pnpm 10, and uv",
      "detail": "In place of Replit's modules and Nix; system packages come from apt"
    },
    {
      "name": "Deploys",
      "detail": "app-deploy builds each new commit, updates the schema, and switches over; from GitHub every minute, or on git push",
      "data": "~/app.git, ~/releases"
    }
  ],
  "access": [
    {
      "url": "https://my-replit.exe.xyz/",
      "who": "private",
      "what": "Your app, until you make it public"
    },
    {
      "url": "https://my-replit.shelley.exe.xyz/",
      "who": "private",
      "what": "Shelley, to change the app in place of Replit Agent"
    }
  ],
  "inputs": [
    {
      "name": "REPO",
      "description": "the GitHub repository your Replit app syncs to, as owner/name (in Replit: Tools → Git). Without one, say so and upload the app's zip as \"Get your code out\" says"
    }
  ],
  "delivers": [
    "Node.js 24, pnpm 10, uv, and Caddy installed; PostgreSQL 18 with an empty `app` database and nightly backups, as in the PostgreSQL recipe; `replitdb.service` answering Replit Database's API on 127.0.0.1:8099.",
    "`~/app.git` with the app's code, and `~/bin/replit-plan`'s reading of its `.replit` in place: each published server as a unit in `app.target`, Caddy on port 8000 routing paths and serving static builds, and the build in `~/bin/app-build`.",
    "`~/app.env` (mode 600) pointing the app at the VM's PostgreSQL and Replit Database, and Replit AI Integrations' variables at exe.dev's LLM gateway.",
    "`~/bin/app-deploy` building a commit into `~/releases`, updating the schema, switching over, and keeping the previous release if a page doesn't answer; run by `app-deploy.timer` for a GitHub repository, or by a push to `~/app.git`.",
    "The app answering at https://my-replit.exe.xyz/, still private, and `~/bin/app-import` ready to copy the production database and Replit Database from Replit.",
    "A report of what in the app still needs Replit (`replit-plan`'s `Uses` lines), each with the section of this page that deals with it."
  ],
  "deployable": true,
  "deploy": {
    "new_vm_url": "https://exe.dev/new?prompt=REPO%3D%3Cfill-this-in%3E%0A%0ASet%20up%20Apps%20from%20Replit%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe.dev%2Fdeploy%2Fmigrate-replit.md%20from%20top%20to%20bottom.%0A%0AThe%20values%20at%20the%20top%20of%20this%20message%20are%20mine%3A%0A-%20REPO%3A%20the%20GitHub%20repository%20your%20Replit%20app%20syncs%20to%2C%20as%20owner%2Fname%20%28in%20Replit%3A%20Tools%20%E2%86%92%20Git%29.%20Without%20one%2C%20say%20so%20and%20upload%20the%20app%27s%20zip%20as%20%22Get%20your%20code%20out%22%20says%0AAsk%20me%20for%20any%20that%20still%20say%20%3Cfill-this-in%3E%20before%20you%20need%20them.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-replit.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-replit.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20Node.js%2024%2C%20pnpm%2010%2C%20uv%2C%20and%20Caddy%20installed%3B%20PostgreSQL%2018%20with%20an%20empty%20%60app%60%20database%20and%20nightly%20backups%2C%20as%20in%20the%20PostgreSQL%20recipe%3B%20%60replitdb.service%60%20answering%20Replit%20Database%27s%20API%20on%20127.0.0.1%3A8099.%0A-%20%60~%2Fapp.git%60%20with%20the%20app%27s%20code%2C%20and%20%60~%2Fbin%2Freplit-plan%60%27s%20reading%20of%20its%20%60.replit%60%20in%20place%3A%20each%20published%20server%20as%20a%20unit%20in%20%60app.target%60%2C%20Caddy%20on%20port%208000%20routing%20paths%20and%20serving%20static%20builds%2C%20and%20the%20build%20in%20%60~%2Fbin%2Fapp-build%60.%0A-%20%60~%2Fapp.env%60%20%28mode%20600%29%20pointing%20the%20app%20at%20the%20VM%27s%20PostgreSQL%20and%20Replit%20Database%2C%20and%20Replit%20AI%20Integrations%27%20variables%20at%20exe.dev%27s%20LLM%20gateway.%0A-%20%60~%2Fbin%2Fapp-deploy%60%20building%20a%20commit%20into%20%60~%2Freleases%60%2C%20updating%20the%20schema%2C%20switching%20over%2C%20and%20keeping%20the%20previous%20release%20if%20a%20page%20doesn%27t%20answer%3B%20run%20by%20%60app-deploy.timer%60%20for%20a%20GitHub%20repository%2C%20or%20by%20a%20push%20to%20%60~%2Fapp.git%60.%0A-%20The%20app%20answering%20at%20https%3A%2F%2Fmy-replit.exe.xyz%2F%2C%20still%20private%2C%20and%20%60~%2Fbin%2Fapp-import%60%20ready%20to%20copy%20the%20production%20database%20and%20Replit%20Database%20from%20Replit.%0A-%20A%20report%20of%20what%20in%20the%20app%20still%20needs%20Replit%20%28%60replit-plan%60%27s%20%60Uses%60%20lines%29%2C%20each%20with%20the%20section%20of%20this%20page%20that%20deals%20with%20it.%0A%0ARead%20the%20whole%20recipe%2C%20including%20the%20closed%20details.%20Follow%20%22Set%20up%20by%0Ahand%22%20from%20%22Install%20Node.js%2C%20pnpm%2C%20and%20Caddy%22%20to%20the%20end%20of%20it%2C%20as%0Aexedev%3B%20the%20walkthrough%20above%20it%20is%20for%20the%20owner%20afterwards.%20Do%20not%0Arun%20%22Update%22%2C%20do%20not%20reboot%2C%20and%20leave%20public%20sharing%20off.%20The%20scripts%0Aand%20units%20were%20tested%20as%20written%3A%20use%20them%20unchanged%2C%20and%20leave%20no%20test%0Afiles%20behind.%0AREPO%20is%20a%20GitHub%20repository%3B%20turn%20a%20URL%20into%20owner%2Fname.%20Clone%20it%0Athrough%20the%20GitHub%20integration.%20If%20that%20fails%20with%20%22not%20found%22%20or%20a%20403%2C%0Aand%20https%3A%2F%2Fgithub.com%2FOWNER%2FNAME%20is%20public%2C%20clone%20that%20instead%3B%0Aotherwise%20give%20the%20owner%20the%20integration%20command%20from%20%22Get%20the%20code%22%2C%0Awith%20this%20VM%27s%20name%2C%20and%20wait%20for%20them.%20Install%20everything%20else%0Ameanwhile.%20If%20the%20owner%20has%20no%20repository%2C%20ask%20for%20the%20zip%20and%20the%20scp%0Acommand%20from%20%22Get%20your%20code%20out%22%2C%20and%20use%20the%20zip%20steps.%0ANever%20commit%20or%20push%20to%20a%20GitHub%20repository%20in%20this%20setup.%0AIf%20replit-plan%20prints%20a%20Nix%20line%2C%20install%20the%20apt%20packages%20that%0Aprovide%20those%20tools%20before%20the%20first%20deploy.%20If%20the%20first%20deploy%20fails%2C%0Aread%20the%20error%20above%20FAILED%20and%20fix%20what%27s%20on%20the%20VM%27s%20side%20%28a%20missing%0Aapt%20package%2C%20a%20setting%20in%20~%2Fapp.env%29%3B%20if%20the%20code%20itself%20needs%20Replit%2C%0Asay%20what%20and%20leave%20the%20rest%20set%20up.%0ADon%27t%20run%20app-import%3A%20the%20owner%20runs%20it%20with%20Replit%27s%20connection%20strings%2C%0Awhich%20should%20never%20be%20pasted%20into%20this%20conversation.%0AKeep%20keys%20and%20passwords%20out%20of%20your%20replies%3B%20say%20which%20file%20holds%20them.%0AIn%20your%20report%2C%20say%20in%20plain%20words%20what%20the%20Uses%20lines%20found%2C%20with%20the%0Asection%20of%20this%20recipe%20that%20deals%20with%20each.%20Then%20give%20the%20owner%20the%0Anext%20steps%3A%20copy%20the%20secrets%20over%20and%20bring%20the%20data%20across%2C%20as%20%22Settings%0Aand%20secrets%22%20and%20%22Bring%20your%20data%20over%22%20say%2C%20with%20this%20VM%27s%20name.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open.%0A",
    "terminal": "curl -fsSL https://exe.dev/deploy/migrate-replit/prompt.txt | ssh exe.dev new --prompt=/dev/stdin",
    "prompt": "REPO=\u003cfill-this-in\u003e\n\nSet up Apps from Replit on this VM by following the exe.dev recipe at https://exe.dev/deploy/migrate-replit.md from top to bottom.\n\nThe values at the top of this message are mine:\n- REPO: the GitHub repository your Replit app syncs to, as owner/name (in Replit: Tools → Git). Without one, say so and upload the app's zip as \"Get your code out\" says\nAsk me for any that still say \u003cfill-this-in\u003e before you need them.\n\nThe recipe's example VM name is my-replit. This VM's name is the output of `hostname`: use it wherever the recipe writes my-replit. Skip the step that creates the VM; you are on it.\n\nYou are done when all of these are true. Check each one yourself:\n- Node.js 24, pnpm 10, uv, and Caddy installed; PostgreSQL 18 with an empty `app` database and nightly backups, as in the PostgreSQL recipe; `replitdb.service` answering Replit Database's API on 127.0.0.1:8099.\n- `~/app.git` with the app's code, and `~/bin/replit-plan`'s reading of its `.replit` in place: each published server as a unit in `app.target`, Caddy on port 8000 routing paths and serving static builds, and the build in `~/bin/app-build`.\n- `~/app.env` (mode 600) pointing the app at the VM's PostgreSQL and Replit Database, and Replit AI Integrations' variables at exe.dev's LLM gateway.\n- `~/bin/app-deploy` building a commit into `~/releases`, updating the schema, switching over, and keeping the previous release if a page doesn't answer; run by `app-deploy.timer` for a GitHub repository, or by a push to `~/app.git`.\n- The app answering at https://my-replit.exe.xyz/, still private, and `~/bin/app-import` ready to copy the production database and Replit Database from Replit.\n- A report of what in the app still needs Replit (`replit-plan`'s `Uses` lines), each with the section of this page that deals with it.\n\nRead the whole recipe, including the closed details. Follow \"Set up by\nhand\" from \"Install Node.js, pnpm, and Caddy\" to the end of it, as\nexedev; the walkthrough above it is for the owner afterwards. Do not\nrun \"Update\", do not reboot, and leave public sharing off. The scripts\nand units were tested as written: use them unchanged, and leave no test\nfiles behind.\nREPO is a GitHub repository; turn a URL into owner/name. Clone it\nthrough the GitHub integration. If that fails with \"not found\" or a 403,\nand https://github.com/OWNER/NAME is public, clone that instead;\notherwise give the owner the integration command from \"Get the code\",\nwith this VM's name, and wait for them. Install everything else\nmeanwhile. If the owner has no repository, ask for the zip and the scp\ncommand from \"Get your code out\", and use the zip steps.\nNever commit or push to a GitHub repository in this setup.\nIf replit-plan prints a Nix line, install the apt packages that\nprovide those tools before the first deploy. If the first deploy fails,\nread the error above FAILED and fix what's on the VM's side (a missing\napt package, a setting in ~/app.env); if the code itself needs Replit,\nsay what and leave the rest set up.\nDon't run app-import: the owner runs it with Replit's connection strings,\nwhich should never be pasted into this conversation.\nKeep keys and passwords out of your replies; say which file holds them.\nIn your report, say in plain words what the Uses lines found, with the\nsection of this recipe that deals with each. Then give the owner the\nnext steps: copy the secrets over and bring the data across, as \"Settings\nand secrets\" and \"Bring your data over\" say, with this VM's name.\n\nFinish with the URLs I should open.\n",
    "prompt_url": "https://exe.dev/deploy/migrate-replit/prompt.txt"
  },
  "updated": "2026-11-16",
  "verified": "2026-11-16",
  "related": [
    "migrate-lovable",
    "migrate-heroku",
    "postgres",
    "nodejs",
    "dev-test-prod",
    "agent-secrets"
  ],
  "alternatives": [
    "Replit"
  ],
  "files": [
    "https://exe.dev/deploy/migrate-replit/app-deploy",
    "https://exe.dev/deploy/migrate-replit/app-import",
    "https://exe.dev/deploy/migrate-replit/replit-plan",
    "https://exe.dev/deploy/migrate-replit/replitdb"
  ]
}
