# Replit app to production: a checklist

> Taking a Replit Agent app live: separate dev and production databases, production secrets, backups, and what the July 2025 database deletion taught.

- Author: Pranav Mahaveer, Founder, SBD
- Published: 2026-11-21
- Updated: 2026-11-21
- Canonical: https://smallbaydigital.com/blog/replit-app-to-production-checklist/
- Contact: hello@smallbaydigital.com

<p data-region-keep>To take a Replit Agent app to production, you need a separate production database the agent cannot change, production secrets kept apart from development ones, a published deployment with sign-in checked on the server, and a restore you have tested. Replit now builds most of this in. Every app has a development database for building and a production database for the published app, and Replit's documentation says the Agent can only read production, through a read-only replica. The checklist below confirms those protections are switched on for your app, then covers the parts Replit leaves to you.</p>

This post is for founders who built an app with Replit Agent and are about to put paying users or real company data on it. It starts with the incident that changed how Replit handles databases, then goes through the checklist.

> **The short answer.** Before launch, confirm your published app's DATABASE_URL points at the production database and not the development one. Put every live API key in Production app secrets. Check that each API route verifies who is calling it. Restore a backup once so you know how long it takes. Older apps, especially ones that predate the dev and production split, need the most attention.

## What happened in July 2025

In July 2025, Jason Lemkin, founder of SaaStr, was running a twelve-day trial building an app with Replit Agent. He reported that the agent deleted his production database during a declared code freeze, after being told not to make changes. Coverage by The Register and Fortune reported that the database held records on more than 1,200 executives and roughly 1,190 companies. Lemkin also said the agent had produced fake data and misreported test results, and that it initially told him the data could not be recovered. The rollback did in fact work.

Replit's CEO, Amjad Masad, called the deletion unacceptable. Replit said it had begun rolling out automatic separation of development and production databases that weekend, pointed to its existing backups and one-click project restore, and promised Lemkin a refund and a postmortem.

The lesson for anyone shipping on any agent platform is plain. An agent with write access to the live database can delete it, whatever it has been told in chat. Instructions are not permissions. The protection that works is one the agent cannot get round: a database it has no write access to, and a backup stored somewhere else.

## How Replit handles databases now

Replit's development and production documentation describes the current setup:

- Every app has two databases. The development database is where you and the Agent build, and the production database serves the published app.
- The Agent cannot modify the production database. It reads production through a read replica, which can lag slightly behind.
- Both environments use a variable called `DATABASE_URL`, with a different value in each. In the workspace and Shell it points at development. When you publish, the app gets its own value pointing at production.
- Schema changes made in development are applied to production when you publish.
- Production values live under Publishing, in Production app secrets, separate from development secrets.

Apps created on older infrastructure may still have a single shared database or a leftover `NEON_DATABASE_URL` secret. Replit has a separate guide for migrating a shared database. If your app was built before the split, assume nothing until you have checked.

## The checklist

Work through this with the Replit project open. Each item has a test you can run.

1. **Confirm the published app uses the production database.** Open Publishing, choose Adjust settings, and find `DATABASE_URL` under Production app secrets. Compare its host with the connection string in the production database's Settings tab. Replit warns that both values contain your password, so compare them on your own screen.
2. **Look for a database URL you added yourself.** If there is a `DATABASE_URL` in development Secrets that you created, your app may be talking to a database Replit is not managing. Find out which one before launch.
3. **Move live keys into Production app secrets.** Payment, email and AI provider keys should be set only for production, and development should use test keys. Search the code for any key pasted directly into a file.
4. **Check the front end for secrets.** If the app has a React or Vite front end, build it and search the output for key prefixes such as `sk_`, `sk-` and `re_`. Anything found there is public.
5. **Check every API route for auth.** For each route that reads or changes data, confirm the server checks the session and the user's permission to touch that record. A route that trusts a user id sent from the browser lets anyone read anyone's data by changing a number.
6. **Review schema changes before publishing.** Because development schema changes apply to production on publish, read what changed. A dropped column in development means dropped data in production.
7. **Test a restore.** Use the project restore or a database backup to bring back an earlier state on a copy. Note how long it takes and who has to do it.
8. **Keep your own export.** Schedule a daily `pg_dump` of the production database to storage outside Replit. If the platform, your account or the agent has a bad day, you still have yesterday's data.
9. **Set up a custom domain and monitoring.** Point your domain at the deployment and add an uptime check so you hear about an outage before a customer does.
10. **Limit who can run the Agent on the live project.** Collaborators with Agent access can make changes. Keep that list short.

## What the checklist does not cover

These checks deal with the database, secrets and the obvious auth gaps. They do not test business logic, such as whether a user can apply a discount twice or see another team's invoices through a report. They also do not cover rate limits, abuse of sign-up forms, or how the app behaves when a third-party API is down. Those need someone reading the code with the business rules in mind.

## When to bring someone in

If customers will put money or personal data into the app, get it reviewed before launch. Our [vibe-coded app audit](/vibe-coded-app-audit/) starts at $500 and you receive a written report within a week, ranked by risk, covering the database setup, secrets, auth on each route, backups and restore. Harden starts at $1,000 if you want us to make the fixes, and Rebuild starts at $8,000 when the app needs a new server layer.

If parts of the app were built in other tools, the related reviews are [Is my Bolt.new app secure?](/blog/is-my-bolt-app-secure/) and [Cursor app security review](/blog/cursor-app-security-review/). Apps on Supabase have the extra row-level security step described in [Your Lovable app is probably public](/blog/your-lovable-app-is-probably-public/), and our [Supabase integration page](/integrations/tools/supabase/) shows how we set it up on client builds.

## Questions we get asked

**Can Replit Agent still delete my production database?**

Replit's documentation says the Agent cannot modify the production database on current infrastructure and reads it through a read-only replica. Check your app is on that setup, and keep an external backup regardless, because an agent with access to your code can still publish a schema change you did not read.

**Do I need to use Replit's database?**

No. You can connect an external Postgres such as Supabase or Neon. You then own the separation between development and production yourself, which means two databases and two sets of credentials.

**Is Replit fine for production?**

Plenty of small apps run on Replit deployments. The questions are the same as on any host: is production data isolated, are secrets kept out of code, does every route check the user, and can you restore. Answer those and the host matters less.

**Where did the 1,200 executives figure come from?**

From news reports of Lemkin's posts, including The Register and Fortune. We have not seen the data ourselves.

## Sources and further reading

- [Development and production](https://docs.replit.com/features/data-and-storage/development-and-production), Replit docs, checked 21 November 2026: two databases, Agent read replica, `DATABASE_URL`, Production app secrets
- [Production databases](https://docs.replit.com/cloud-services/storage-and-databases/production-databases), Replit docs, checked 21 November 2026
- [Shared database migration](https://docs.replit.com/references/data-and-storage/shared-database-migration), Replit docs, checked 21 November 2026
- [Vibe coding service Replit deleted user's production database](https://www.theregister.com/software/2025/07/21/vibe_coding_service_replit_deleted_production_database/719783), The Register, 21 July 2025
- [Replit makes vibe-y promise to stop its AI agents making vibe coding disasters](https://www.theregister.com/2025/07/22/replit_saastr_response/), The Register, 22 July 2025, on Replit's response
- [AI coding tool Replit wiped a database and called it a catastrophic failure](https://fortune.com/2025/07/23/ai-coding-tool-replit-wiped-database-called-it-a-catastrophic-failure/), Fortune, 23 July 2025
- [vibe-coded app audit](/vibe-coded-app-audit/), the SBD service this post describes
