You spent twenty minutes chatting with Replit Agent, and suddenly you have a working full-stack SaaS: React frontend, Express or FastAPI backend, and an active PostgreSQL database. It looks alive in the browser preview. But you do not have a hosted app yet.
The development preview running under *.replit.dev is a sandbox. The moment you close the browser tab or let the session idle, that development container shuts down. To turn an agent-built prototype into a production service with isolated infrastructure, custom domain support, and automated SSL, you must push it through Replit Deployments.
Here is how the deployment architecture works, how to trigger it conversationally or manually, and where the operational traps hide.
1. The Pre-Deployment Audit
Before clicking publish, do not assume Replit Agent configured your production environment cleanly. 365Finds recommends running a quick pre-flight sequence inside your chat:
- Verify Database Persistence: Replit Agent frequently uses an integrated PostgreSQL database. Ask the agent directly: "Verify that all database migrations have run and that the schema handles cold starts gracefully." Ensure your backend reads the database connection string from environment variables rather than a hardcoded local fallback.
- Audit Secrets and Environment Variables: Open the Secrets tool (the padlock icon in the left workspace dock). Confirm your sensitive keys—such as OpenAI tokens, Stripe keys, and JWT secrets—are stored as environment secrets rather than plain text in configuration files like
.replitorconfig.json. - Sanitize Test Data: Tell Replit Agent: "Clean up dummy mock records from the database and verify production seeding."
2. Triggering the Deployment
You have two paths to deploy: conversational prompting or the workspace publishing panel.
Method A: Conversational Deployment via Replit Agent
You can instruct Replit Agent directly in the prompt window:
"Prepare this full-stack application for production deployment. Verify the build command, set up the production start script, and trigger publishing."
Replit Agent will inspect your package manifests, verify your build scripts (such as npm run build or vite build), check that the server binds to 0.0.0.0 on port 5000 or the platform-assigned $PORT, and generate the deployment configuration.
Method B: Manual Configuration via Replit Publishing
If you want granular control over your infrastructure tier, use the manual workflow:
- In the upper-right corner of the Replit workspace, click the Publish button (or navigate to Tools > Publishing under Replit Cloud).
- Choose your Deployment Type.
- Configure your compute specifications (CPU cores and RAM limits).
- Review your production domain settings (a free
.replit.appsubdomain or your own custom domain). - Click Publish.
Replit packages your application files, provisions an isolated Google Cloud Platform (GCP) container, executes your build steps, and maps your public routing.
3. Picking the Right Deployment Architecture
Replit provides multiple deployment targets, but full-stack applications generated by Replit Agent have strict requirements. Selecting the wrong model will cause immediate build or runtime failures.
| Deployment Type | Compatible with Agent Full-Stack? | Cost Model | Best Use Case |
|---|---|---|---|
| Autoscale | Yes (Recommended) | Billed per request / compute time (scales to zero) | Web applications, APIs with spiky traffic, early MVPs |
| Reserved VM | Yes | Fixed monthly cost per VM tier | Always-on APIs, WebSockets, background queues, cron tasks |
| Static | No | CDN asset hosting | Marketing landing pages, docs (No backend server) |
| Scheduled | No (Not for web apps) | Pay per scheduled run | Periodic data scraping, database maintenance tasks |
Autoscale vs. Reserved VM: The 365Finds Assessment
At 365Finds, our testing shows that Autoscale is the sensible starting choice for 85% of indie projects. When no visitors hit your app, compute scales down to zero, saving your compute credits.
However, Autoscale has a significant catch: cold starts. When your service wakes from zero instances, spinning up Node or Python runtimes and initializing database pools can introduce a 3 to 8-second delay on the first HTTP request. If your app handles real-time WebSockets, Discord/Slack bots, or incoming third-party payment webhooks that timeout after 5 seconds, Autoscale will bite you. In those cases, pay for a Reserved VM.
4. Attaching Custom Domains and SSL
By default, your published app receives a domain formatted as [your-app-name].[your-username].replit.app. While functional for user testing, putting that link in front of paying customers looks amateurish.
To attach a production domain:
- Inside the Publishing panel, navigate to Domains.
- Enter your custom apex domain or subdomain (e.g.,
app.yourdomain.com). - Replit provides the required DNS records (typically a CNAME pointing to Replit's routing layer, or an A record for root domains).
- Update the DNS records at your domain registrar (such as Cloudflare, Namecheap, or Porkbun).
- Replit automatically issues and manages a free Let's Encrypt SSL certificate once DNS propagation verifies.
5. Troubleshooting Deployment Failures with Replit Agent
Deployments rarely succeed on the first try if complex native dependencies or dynamic Vite assets are involved. The most common error occurs during the "Creating Autoscale service" phase or displays a No run command configured warning.
When a deployment fails, use Replit Agent to heal the deployment:
- Open the Publishing drawer, click the three dots next to the failed deployment run, and select View Logs.
- Copy the entire raw build or runtime log output (including stack traces).
- Paste the log into your Replit Agent chat with the command:
"The deployment build failed with this log output: [paste log]. Diagnose the root cause in the package build script or .replit configuration and fix it."
- Replit Agent will inspect the start command, repair mismatched ports, fix broken dependencies, and re-trigger the build.
6. Prerequisites and Cost Governance
Deploying full-stack applications with Replit Agent requires understanding two billing layers:
- Replit Core Subscription: Replit Agent access requires an active Replit Core plan (billed monthly or annually).
- Deployment Compute Credits: Deployments consume cloud compute resources separately from your workspace editing seat. Autoscale consumes credits based on vCPU and RAM seconds used while serving requests, whereas Reserved VMs charge a predictable monthly flat fee starting around $6/month for basic specs.
- Database Limits: The built-in managed PostgreSQL cluster includes storage and connection thresholds. If your full-stack app generates heavy database load, monitor your storage consumption directly from the Replit Database panel.
Replit publishes your container into a dedicated, single-tenant GCP project isolated from other tenants, with regional deployment configurations handled via the platform settings.