Migrate from Replit
Move AI-built Repls to Git-owned repositories with Secrets, Postgres, object storage and agent keys.
On this page
An app or API built in Replit moves to Gregale as soon as its code lives in a Git repository or clean local folder: Gregale builds Node, Bun, Python, and Go from source (or runs a Dockerfile) inside isolated Firecracker microVMs with Git-native workflows, PR previews, and hard monthly spend caps. .replit and replit.nix settings do not carry over; this page maps Replit concepts to Gregale and walks through a move.
How Replit maps to Gregale
| Replit | Gregale |
|---|---|
| Replit Repl / Workspace | Local or Git-owned repository deployed with gregale deploy, or cloud workspace via gregale dev (Remote dev) |
| Autoscale / Reserved VM Deployment | Firecracker microVM per instance. Idle apps pause after ~1s and park at $0 compute (Scale to zero); hold minimum instances with --min 1 (Pro/Scale) |
.replit run command | Detected from framework (package.json, requirements.txt, pyproject.toml, go.mod) or pinned via hosting.start in gregale.yaml (Deployment overrides) |
replit.nix system packages | Language toolchain detection (Node, Bun, Python, Go) or a Dockerfile for custom system binaries (Container compatibility) |
| Replit Secrets | Secrets (gregale env set) and environment variables |
| Replit SQL / Neon Postgres | Managed PostgreSQL, bound as DATABASE_URL |
| Replit Key-Value DB / local files | No persistent local disk or Replit DB client: keep persistent state in managed PostgreSQL or object storage |
| Replit Object Storage | Object storage (S3-compatible) |
| Scheduled Deployments | Crons (HTTP schedules) or Jobs (container schedules) |
| One-click Republish | Git push / CLI deploys with automatic 1% → 10% → 50% → 100% canary rollouts, auto 5xx rollback, and PR previews |
| Replit Agent deployments | Scoped --agent keys, human approvals, and gregale undo for coding agents (Use Gregale from coding agents) |
| Usage billing alerts | Hard monthly spend caps enabled on every paid plan (Cost controls) |
Prepare the repository for Git-native deploys
First push your Replit project to GitHub (via Replit's Git pane or git push), clone it locally, and make three checks before deploying:
- Listen on
0.0.0.0andPORT. Replit apps often bind0.0.0.0:5000or127.0.0.1:8080. Readprocess.env.PORT/os.environ["PORT"]and bind0.0.0.0, or pin a fixed port withhosting.portingregale.yaml(Deployment overrides). - Use a production server. Replace
next dev,flask run, oruvicorn --reloadwithnext start,gunicorn, oruvicorn app:main --host 0.0.0.0 --port $PORT. - Remove Replit-only SDK dependencies. Replace
@replit/databaseor@replit/object-storagecalls with standard PostgreSQL (DATABASE_URL) or S3 SDK calls (BUCKET_*credentials from Object storage). If your app depended on apt/system packages fromreplit.nix(such asffmpegor Playwright browsers), add a minimalDockerfileinstalling them.
Create gregale.yaml if you need an explicit start command, health check, or migration step:
# gregale.yaml
hosting:
health: /healthz
release:
command: alembic upgrade head
Test detection locally before deploying:
gregale deploy --dry-run
Copy Replit Secrets and deploy
Copy your Replit Secrets from the Secrets tool (omit REPL_ID, REPL_SLUG, REPL_OWNER, and REPLIT_* variables) into a local KEY=VALUE file, one pair per line without surrounding quotes. Set multiline secrets afterward with gregale env set. Then deploy:
gregale deploy --name my-api --secrets-file replit.env
rm replit.env
Or launch directly from GitHub with the browser Deploy button (/deploy?repo=https://github.com/OWNER/REPO). If a coding agent drives your deploys, issue a scoped --agent key so destructive actions require human approval and changes can be undone (Use Gregale from coding agents). Check deploy health or logs:
gregale app health my-api --errors
gregale logs my-api
The database and files
Gregale instances have ephemeral disks that reset when an app parks (What breaks when scaling to zero). Move any SQLite files, uploaded media, or Replit Key-Value entries into managed services:
-
Move to Gregale Managed PostgreSQL:
bash gregale add postgres --app my-api gregale postgres attach my-api-postgres my-api --access migration --env MIGRATION_DATABASE_URLExport your Replit Postgres database using
pg_dumpand restore it through Connect from your laptop (requires app tasks on your plan). Run schema migrations onMIGRATION_DATABASE_URL; your serving app connects via pooledDATABASE_URL(Managed PostgreSQL). -
Object storage. Replace local upload folders or Replit Object Storage with a Gregale bucket (Object storage).
Switch traffic
Connect your domain and verify DNS (Custom domains), shift traffic over, and shut down your Replit deployment once live requests succeed.
Related articles
Replit alternatives in 2026 compares the main platforms people move to from Replit.
Spotted a problem on this page? Tell us