To take a Replit app to production, publish it with the right deployment type, confirm the live app uses its own production database and production secrets, turn on backups you have tested, and review the code Agent wrote for access control and logging. Replit runs the platform; your app’s security and data rules stay with you.
This guide is for founders who built something real on Replit and now have users, or are about to. Every Replit fact below comes from Replit’s own documentation, read on December 3, 2026. Replit changes quickly, so check the linked pages before you act on any detail. For the same steps across other builders, see our AI-built app to production guide.
What publishing does, and what it leaves to you
Publishing a web app gives you a live URL, hosting that Replit operates and, when the app uses Replit’s database, a separate production database. It does not make the app ready for real users on its own. Replit’s shared responsibility model is direct about the split. Replit handles the platform, edge protection, encryption in transit and at rest, and backups of published code and Replit-managed databases. You are responsible for:
- Reviewing the correctness, security and licensing of the code Agent generates, including the packages it adds.
- User management and access control inside the published app: who can see and change which records.
- Application-level logging and monitoring, such as errors, business events and user activity.
- Penetration testing of your app and regulatory compliance (Replit lists GDPR, CCPA, HIPAA and PCI DSS as examples).
Replit also notes that working code and correct code are different things, and asks you to read what Agent wrote around authentication, data handling and anything that crosses a trust boundary. That is the core of production readiness on any builder.
Choose the right deployment type
Replit offers four deployment types, set under Adjust settings in the Publishing tool. Autoscale is the default, and Replit recommends it for most apps. This table summarizes Replit’s deployment types page.
| Type | Best for (per Replit) | How it runs | Watch for |
|---|---|---|---|
| Autoscale | Web apps and APIs with variable traffic | Adds servers when busy, scales to zero when idle | Set machine power and a maximum number of servers you can afford |
| Static | Landing pages, portfolios, documentation | Serves files from a cache, no backend | Not compatible with apps built by Agent; Secrets are not available |
| Reserved VM | Bots, background work, always-on APIs | One dedicated server that never sleeps, fixed monthly cost | A single server: plan for what happens while it restarts |
| Scheduled | Backups, notifications, periodic jobs | Runs a command on a schedule, then stops | No public URL; set a job timeout and read the failure alerts |
Two platform rules matter for any published web app. First, Replit’s publishing troubleshooting page warns that the file system in published apps is not persistent and resets every time you publish. Uploaded files or generated reports saved to disk will disappear; Replit says to store them in a database or a storage service instead. Second, a published web server must listen on 0.0.0.0, not localhost, and Replit’s health check can fail publishing if your homepage takes more than five seconds to respond.
Preview and production are two different environments
Every Replit app works with two databases, according to Replit’s page on development and production databases. The development database is where you and Agent build. The production database serves the published app and holds real user data. The key details:
- Both use a variable called
DATABASE_URL, but each environment gets its own value. In the editor, the Shell and Agent sessions it points to development. The published app gets a separate value that points to production. - Your published app runs with
REPLIT_DEPLOYMENT=1. Replit notes that seeingREPLIT_ENVIRONMENT=productionin the Shell does not mean your workspace uses the production database. - Agent cannot modify the production database. It can read it through a read-only replica.
- When you publish, structural changes Agent made to the development database are applied to production. Replit uses drizzle-kit for tables, columns, indexes, constraints, views and row-level security policies, and does not copy functions, procedures, triggers or grants.
That last point is easy to miss. If your app depends on a database trigger or a function, it can work in Preview and fail in production. Replit’s publish flow flags changes that could remove data, such as dropping a column that still holds values, asks you to confirm renames (an unconfirmed rename drops the data), and lets you test against a migrated copy of production before you approve. Use that preview every time a release touches the schema.
Replit also warns against copying development data into production unless it is safe to use live, because development data can include test accounts and sample records.
Check which database your live app uses
Replit says that in almost every case a published app uses its Replit-managed production database. Its documentation also describes a few setups where the live app’s data can end up somewhere you did not expect:
- A database secret someone added by hand. If Secrets contains a
DATABASE_URLyou added yourself, or another connection such asSUPABASE_DATABASE_URL, Replit says your app may use that database instead of its Replit-managed one. The Database tool only shows databases Replit manages. - A shared legacy database. Replit documents that some older published apps, typically ones remixed from another app that had a database before January 9, 2026, were still connected to the original app’s development database. Replit’s documentation says those shared databases were shut down on June 8, 2026, and it publishes a step-by-step fix for published apps that stopped working or lost access to their data.
- Files on disk. Anything written to the app’s file system instead of a database is lost on the next publish.
Replit’s checklist for this is worth running before launch and after any remix: confirm which variable your code reads, list the names (not values) of any database secrets, and check that a record you just created in the live app appears in the Production Database view. If the development and production connection strings share the same endpoint ID, Replit says the app may still share one database across both.
Secrets: check the production side, not just the editor
Replit’s Secrets documentation describes encrypted storage with AES-256 at rest, separate from non-sensitive Configurations, and a separate list of Production app secrets under Publishing, Adjust settings.
Replit’s own pages describe the handoff between the two differently. The Publishing overview says secrets sync automatically from development to the published app when you publish. The troubleshooting page says secrets set in the editor do not automatically carry over and should be added in the Publishing pane. Do not rely on either. Open Production app secrets and confirm every key the live app needs is there, with live values where your test and live credentials differ, such as payment keys, webhook signing secrets and OAuth callback URLs.
Two more points from the same page. Organization members without the Owner role cannot see secret values in the UI, but Replit notes they can still read them by printing environment variables. And someone who remixes a project they do not own sees secret names but not values, so a remixed copy fails in ways that look like code bugs until its own secrets are set.
Backups and recovery you have tested
Replit’s data recovery page lists point-in-time recovery for production databases, on by default with a 7-day window (up to 28 days on Pro, Teams and Enterprise), and optional daily scheduled backups on Core and higher plans. Replit also notes that a database left idle can be archived, and scheduled backups are skipped while it is archived. Turn on the retention you need, then restore once into a copy so you know how long it takes and that the result is usable.
Before you open the app to real users, it is worth an outside read. Our production readiness checklist lists 25 points you can score yourself.
Book a Free 30 Minute Consultation
Moving off Replit: code, data and sign-in
Some teams stay on Replit and harden in place. Others move to their own cloud account for a compliance requirement, a cost model or an existing team’s tooling. If you move, there are three things to carry.
The code
Replit’s Git pane can initialize a repository, connect it to GitHub or another supported provider, and push commits. Standard Git commands work in the Shell too. Push the full history to a repository your company owns, then confirm the code builds and runs outside Replit against a copy of your data. That test tells you how much of the app depends on Replit-specific services.
The data
Replit’s data export documentation gives three routes: download one table at a time from the Database tool as CSV, JSON or XLSX; ask Agent to export every table as CSV; or run pg_dump from the Shell. Replit says the Shell route is the only one that saves a full backup of every table in one file that you can restore to another PostgreSQL database. Very large databases may not fit inside the project for the Agent and Shell routes. Plan a short write freeze for the cutover so no live data is lost between export and switch.
Sign-in and integrations
If your app signs users in with Replit Auth, decide how sign-in will work at the new host before you move users. Replit documents a migration from Replit Auth to Clerk Auth for eligible apps, which keeps existing users’ data. Clerk Auth there is a Clerk tenant that Replit sets up for the app, and the page does not say how it behaves on another host, so confirm that before you rely on it. Also list every login callback, payment webhook, CORS allowlist and custom domain that points at the Replit URL; each needs updating at cutover.
What we check and fix
If you bring us a Replit app, the work follows the order above. We confirm which database and secrets the live app actually uses, check access rules on every route and table, look for files written to disk, set up logging and alerts a named person receives, test a restore, and write down what must change before launch and what can wait. If you decide to move, we plan the code, data and sign-in cutover with a rollback. Deployment pipelines and monitoring are part of our DevOps services.
Our production readiness audit starts at $2,500; see the audit page for what it covers. Other work is billed at $150 to $250 per hour. If you are comparing quotes, our guide to what it costs to fix an AI-built app explains why published prices vary so much. Built with another tool? See our notes on Lovable and Bolt apps.
Book a Free 30 Minute Consultation
Frequently asked questions
Is a Replit app production ready once it is published?
Publishing gives you hosting, a live URL and a production database. Replit’s shared responsibility model leaves code review, access control, application logging, penetration testing and compliance with you, so a published app is live but not necessarily ready for real users or real data.
Which Replit deployment type should I use?
Replit recommends Autoscale for most web apps and APIs. Use Reserved VM for bots and always-on background work, Scheduled for periodic jobs, and Static only for sites with no backend. Replit says Static is not compatible with apps built by Agent.
Why does my Replit app work in Preview but break when published?
Replit’s troubleshooting page points to missing production secrets, database connection settings, login and payment redirect URLs, CORS allowlists, a server listening on localhost instead of 0.0.0.0, and files written to disk, which reset on every publish. Check Production app secrets first.
Does my published Replit app use the same database as Preview?
It should not. Replit gives each app a development database and a separate production database, each with its own DATABASE_URL value. A database secret added by hand, or a legacy setup where development and production share one database, can change that, so run Replit’s check before launch.
Can I move my Replit app to my own hosting?
Yes. Push the code to a GitHub repository you own from the Git pane, export the database with pg_dump for a full backup, and plan how sign-in will work if you use Replit Auth. Test the app outside Replit against a copy of your data before you switch.
How much does it cost to make a Replit app production ready?
It depends on what the review finds. Our production readiness audit starts at $2,500 and other work is billed at $150 to $250 per hour. The audit gives you a prioritized list so you can decide what to fix now and what can wait.
Sources
| Fact used | Source | Read |
|---|---|---|
| Deployment types, default and recommended type, Static not compatible with Agent apps, Scheduled has no public URL | https://docs.replit.com/features/publishing/deployment-types | 2026-12-03 |
| Two databases, separate DATABASE_URL values, REPLIT_DEPLOYMENT, Agent read-only on production, drizzle-kit scope, hand-added database secrets | https://docs.replit.com/features/data-and-storage/development-and-production | 2026-12-03 |
| Shared legacy databases, January 9, 2026 remix cutoff, June 8, 2026 shutdown | https://docs.replit.com/features/data-and-storage/shared-database-migration | 2026-12-03 |
| Non-persistent file system, 0.0.0.0, five-second health check, secrets not carried over | https://docs.replit.com/build/troubleshooting | 2026-12-03 |
| Secrets encryption, Production app secrets, visibility rules, not available on Static | https://docs.replit.com/core-concepts/project-editor/app-setup/secrets | 2026-12-03 |
| Secrets sync automatically on publish | https://docs.replit.com/features/publishing/overview | 2026-12-03 |
| Point-in-time recovery windows, scheduled backups, archived databases | https://docs.replit.com/features/data-and-storage/data-recovery | 2026-12-03 |
| Split of responsibilities between Replit and the app owner | https://docs.replit.com/features/security/shared-responsibility-model | 2026-12-03 |
| Git pane: connect a provider and push | https://docs.replit.com/features/workspace-tools/git-interface | 2026-12-03 |
| Three ways to export production data; pg_dump as the only full single-file backup | https://docs.replit.com/features/data-and-storage/work-with-your-data | 2026-12-03 |
| Migration from Replit Auth to Clerk | https://docs.replit.com/features/auth-and-identity/migrate-auth-to-clerk | 2026-12-03 |



