GUIDES May 23, 2026 12 min read

Replit Deployment Guide: Static, Autoscale, Reserved VM, and Scheduled

TL;DR Replit offers four deployment types: Static (free), Autoscale (scales to zero), Reserved VM (always-on), and Scheduled (cron jobs). Autoscale cold starts run 10–30 seconds — use Reserved VM for…

by Bugi 12 min
TL;DR

  • Replit offers four deployment types: Static (free), Autoscale (scales to zero), Reserved VM (always-on), and Scheduled (cron jobs).
  • Autoscale cold starts run 10–30 seconds — use Reserved VM for anything customer-facing that can’t tolerate latency.
  • Your server must bind to 0.0.0.0 and respond to GET / within 5 seconds or the deployment fails silently.

Overview

Replit Deployments let you ship web apps, APIs, and background jobs directly from the browser-based IDE — no CI pipeline, no Docker config, no cloud console. You pick a deployment type, configure a run command, and click Deploy.

This guide covers all four deployment types, the .replit configuration that controls them, custom domain setup, secrets management, and the production gotchas that Replit’s own docs underplay. It’s written for developers who have a working Repl and want to get it running in production without surprises.

Replit Deployments · quick reference
Platform
Web-based (browser IDE)
Pricing
Free (Starter) · Core $25/mo · Teams $15/mo per seat
Deployment types
Static · Autoscale · Reserved VM · Scheduled
Infrastructure
Google Cloud Platform (Cloud Run / GCE)
Config file
.replit (TOML)

Prerequisites

Before deploying, make sure you have:

  • A Replit account — Starter (free) works for Static deployments only
  • A Replit Core ($25/mo) or higher plan for Autoscale, Reserved VM, or Scheduled deployments
  • A working Repl that runs successfully in the workspace (click Run and verify it works before attempting deployment)
  • A payment method on file if deploying anything beyond Static

For custom domains, you’ll also need access to your domain registrar’s DNS settings.

Choosing a Deployment Type

This is where most developers make their first mistake. Each type maps to a different GCP service under the hood, and choosing wrong means either overpaying or shipping broken UX.

Feature Static Autoscale Reserved VM Scheduled
Server-side code
Always-on
Scales to zero ~
Secrets support
WebSockets ~
Starting cost Free ~$1/mo ~$6/mo ~$0.10/mo

Use Static for SPAs, portfolios, and landing pages with no backend. Use Autoscale for side projects and low-traffic APIs where cold starts are acceptable. Use Reserved VM for production apps, WebSocket servers, or anything where a 10–30 second cold start would lose users. Use Scheduled for cron jobs — scraping, notifications, report generation.

Warning
Autoscale cold starts (10–30 seconds) are a dealbreaker for customer-facing apps. If users hit your app after idle periods, they’ll see a loading screen or timeout. Use Reserved VM instead.

Step 1: Configure the .replit File

The .replit file is TOML-formatted and controls both development and production behavior. It’s hidden by default — enable “Show hidden files” in the filetree menu to see it.

entrypoint = "server.js"

[deployment]
run = ["node", "server.js"]
build = "npm install && npm run build"
deploymentTarget = "cloudrun"

The [deployment] section is what matters. Three properties:

  • run — the command that starts your production server (string or array)
  • build — runs once during deployment to install dependencies and compile
  • deploymentTarget"cloudrun" for Autoscale, "gce" for Reserved VM, "static" for Static

The development run command (top-level) can differ from [deployment].run. Use this to run dev servers with hot reload locally while deploying an optimized production build.

Tip
For Static deployments, set deploymentTarget = "static" and specify a publicDir (e.g., dist) instead of a run command.

Step 2: Deploy Your App

1
Click Deploy
Hit the Deploy (or Publish) button at the top of the editor.
2
Select deployment type
Choose Static, Autoscale, Reserved VM, or Scheduled. Replit may suggest one based on your project.
3
Configure settings
Verify build command, run command, machine size, and secrets. Add a payment method if prompted.
4
Hit Deploy
Replit snapshots your project and sends it to GCP. You get a live URL at your-app.replit.app.

Deployments are snapshot-based. Editing code in the workspace does NOT auto-update the live app. You must explicitly redeploy to push changes. This is intentional — it prevents broken WIP code from reaching production.

After deployment, use the Deployments tab to view logs, analytics, and trigger redeployments.

Deployment logs

Building...
$ npm install && npm run build
 Build completed
Starting server...
$ node server.js
 Listening on 0.0.0.0:3000
 Health check passed
LIVE https://my-app.replit.app

Step 3: Set Up Secrets for Production

Replit separates workspace secrets from deployment secrets. This catches developers off guard — your app works in dev but crashes in production because the database URL isn’t set.

Workspace secrets live in Tools > Secrets. Deployment secrets are configured in the Deployments pane > Secrets section. You must add secrets to both places.

# Python
import os
db_url = os.environ['DATABASE_URL']

# Node.js
const dbUrl = process.env.DATABASE_URL;

Secrets are AES-256 encrypted at rest, hidden from the code editor, and excluded from forks and version history. Account-level secrets can be linked to multiple Repls — useful for shared credentials across microservices.

Danger
Static deployments do NOT support runtime secrets — there’s no server to inject them into. If your frontend needs API keys, use Autoscale or Reserved VM with a backend proxy.

Step 4: Connect a Custom Domain

Custom domains require a paid plan and an active deployment.

1
Open domain settings
Go to Deployments tab → Settings → “Link a domain.”
2
Enter your domain
Type your domain (e.g., app.example.com). Replit generates A and TXT records.
3
Configure DNS
Add the A record and TXT record at your domain registrar. Wait for propagation.
4
Verify
Domain shows “Verified” in Replit. SSL certificate is provisioned automatically.

If you use Cloudflare, set the DNS record to DNS-only mode (gray cloud icon). Cloudflare’s proxied mode breaks Replit’s automatic SSL certificate renewal. This is the single most common custom domain issue.

The Health Check That Blocks Every First Deploy

This is the gotcha that Replit’s troubleshooting docs mention but don’t emphasize enough: after deployment, Replit sends a GET / request to your app. If it doesn’t get a 200 response within 5 seconds, the deployment fails.

Two things break this constantly:

1. Binding to localhost. Your server must listen on 0.0.0.0, not 127.0.0.1 or localhost. Express defaults to 0.0.0.0, but some frameworks (like Flask with default settings) bind to localhost.

// Wrong — deployment health check will fail
app.listen(3000, 'localhost');

// Correct
app.listen(3000, '0.0.0.0');

2. Slow initialization. If your app loads ML models, connects to databases, or runs migrations on startup, the 5-second window closes before the server responds. Move heavy initialization to background tasks and return a lightweight 200 from / immediately.

# Flask example — respond fast, initialize later
@app.route('/')
def health():
    return 'OK', 200

# Run heavy setup in a background thread after server starts
Takeaway

If your first deploy fails with no obvious error, check the health check: bind to 0.0.0.0 and make GET / return 200 within 5 seconds.

Deployment Pricing Breakdown

Replit’s pricing has two layers: your plan subscription and per-deployment compute costs.

$0/mo
Static deployment
~$1/mo
Autoscale (low traffic)
$6/mo
Reserved VM (basic)
$0.10/mo
Scheduled (base fee)

Reserved VM pricing scales by machine size: 0.5 vCPU / 1 GB RAM at ~$6/mo, 1 vCPU / 2 GB RAM at ~$15/mo, and 2 vCPU / 4 GB RAM at ~$50/mo.

The hidden cost is egress. Core plans include 100 GiB outbound data per month. Overages cost $0.10/GiB. A high-traffic API serving large payloads can generate significant bandwidth bills. Check the deployment pricing calculator before committing to Replit for anything bandwidth-heavy.

Note
Your app’s IP address changes on every redeployment. Don’t hardcode IPs in DNS or allow-lists — use the .replit.app subdomain or a custom domain.

Using Replit Agent to Deploy

Replit Agent can handle the entire build-and-deploy flow from a natural language prompt. Describe what you want, and it writes the code, configures the .replit file, sets up secrets, and triggers deployment.

Agent 4 runs independent tasks in parallel — auth, database schema, backend routes, and frontend components build simultaneously. It also self-tests: executing code, identifying errors, fixing them, and rerunning until tests pass.

For deployment specifically, the Agent handles the .replit configuration and deployment settings automatically. You can also describe scheduled deployment timing in natural language (e.g., “run every weekday at 9 AM EST”) and the Agent converts it to a cron expression.

That said, Agent-generated deployments still hit the same health check and binding constraints. If the Agent’s deploy fails, check the same things you’d check manually: 0.0.0.0 binding, the 5-second health check window, and matching workspace vs. deployment secrets.

Tips and Best Practices

  • Separate dev and prod run commands. Use the top-level run for hot-reload dev servers and [deployment].run for production. Don’t deploy with nodemon or flask --debug.
  • Pin your Nix channel. The [nix] section in .replit controls system dependencies. Set channel = "stable-23_05" (or current stable) so deployments don’t break when Replit updates the default channel.
  • Monitor egress early. If you’re serving images, large JSON responses, or file downloads, estimate your monthly bandwidth before choosing Replit over a traditional cloud provider. At $0.10/GiB overage, costs add up fast.
  • Use Account Secrets for shared credentials. If you have multiple Repls connecting to the same database, store the connection string as an Account Secret rather than duplicating it across Repls.
  • Restart after adding secrets. Secrets added while the app is running may not be picked up by the current process. Stop and re-run the Repl to reload environment variables.

When to Use Replit Deployments — and When Not To

Replit Deployments are excellent for prototypes, internal tools, side projects, and apps where deployment complexity is the main bottleneck. The zero-config approach from IDE to production URL is genuinely faster than setting up CI/CD on AWS, GCP, or Vercel for the first time.

Avoid Replit Deployments when you need fine-grained infrastructure control (custom Docker images, multi-region), predictable sub-100ms latency (Autoscale cold starts kill this), or high-bandwidth workloads where egress costs exceed what you’d pay on a VPS. For production SaaS with paying customers, evaluate whether the convenience is worth the limited observability and vendor lock-in compared to deploying on GCP directly (which is where Replit runs under the hood anyway).

Pros
  • Zero-config path from IDE to production URL
  • Built-in secrets, SSL, and custom domain support
  • Static deployments are free — good for portfolios and landing pages
  • Scheduled deployments handle cron jobs without external services
Cons
  • Autoscale cold starts (10–30s) are too slow for production APIs
  • Egress overage at $0.10/GiB adds up for bandwidth-heavy apps
  • No custom Docker, multi-region, or advanced networking
  • Limited observability — no APM integration, basic logs only

FAQ

How much does it cost to deploy on Replit?
Static deployments are free. Autoscale starts around $1/month for low-traffic apps. Reserved VM starts at ~$6/month for 0.5 vCPU / 1 GB RAM. Scheduled deployments have a $0.10/month base fee plus per-second runtime charges. All paid deployment types require a Replit Core plan ($25/month) or higher.
Why does my Replit deployment fail immediately after deploying?
The most common cause is a failed health check. Replit sends a GET / request after deployment and expects a 200 response within 5 seconds. Make sure your server binds to 0.0.0.0 (not localhost) and that your root route responds quickly. Move slow initialization — database connections, model loading — to background tasks.
Do code changes automatically update my live deployment?
No. Replit deployments are snapshot-based. Editing code in the workspace has no effect on the live app. You must go to the Deployments tab and explicitly click Redeploy to push updates.
What’s the difference between Autoscale and Reserved VM deployments?
Autoscale (backed by Google Cloud Run) scales to zero when idle and bills per vCPU-hour — cheaper for low-traffic apps but has 10–30 second cold starts. Reserved VM (backed by Google Compute Engine) runs 24/7 with no cold starts but costs a fixed monthly fee starting at ~$6/month. Use Reserved VM for production apps that need consistent response times.
Can I use a custom domain with Replit?
Yes, but it requires a paid plan and an active deployment. Replit provides A and TXT records to add at your domain registrar. SSL is provisioned automatically. If you use Cloudflare, set the record to DNS-only mode (gray cloud) — Cloudflare’s proxy breaks Replit’s SSL certificate renewal.
Why are my environment variables missing in production?
Replit separates workspace secrets from deployment secrets. Adding a secret in Tools → Secrets only makes it available during development. You must also add it in the Deployments pane → Secrets section for production. Static deployments don’t support secrets at all — there’s no server-side runtime to inject them.
Does Replit support WebSocket connections?
Reserved VM deployments fully support WebSockets since the server runs continuously. Autoscale deployments have limited WebSocket support — connections drop when the instance scales to zero. Static deployments don’t support WebSockets. For real-time apps, use Reserved VM.
How much does it cost to deploy on Replit?
Static deployments are free. Autoscale starts around $1/month for low-traffic apps. Reserved VM starts at ~$6/month for 0.5 vCPU / 1 GB RAM. Scheduled deployments have a $0.10/month base fee plus per-second runtime charges. All paid deployment types require a Replit Core plan ($25/month) or higher.
Why does my Replit deployment fail immediately after deploying?
The most common cause is a failed health check. Replit sends a GET / request after deployment and expects a 200 response within 5 seconds. Make sure your server binds to 0.0.0.0 (not localhost) and that your root route responds quickly. Move slow initialization — database connections, model loading — to background tasks.
Do code changes automatically update my live deployment?
No. Replit deployments are snapshot-based. Editing code in the workspace has no effect on the live app. You must go to the Deployments tab and explicitly click Redeploy to push updates.
What’s the difference between Autoscale and Reserved VM deployments?
Autoscale (backed by Google Cloud Run) scales to zero when idle and bills per vCPU-hour — cheaper for low-traffic apps but has 10–30 second cold starts. Reserved VM (backed by Google Compute Engine) runs 24/7 with no cold starts but costs a fixed monthly fee starting at ~$6/month. Use Reserved VM for production apps that need consistent response times.
Can I use a custom domain with Replit?
Yes, but it requires a paid plan and an active deployment. Replit provides A and TXT records to add at your domain registrar. SSL is provisioned automatically. If you use Cloudflare, set the record to DNS-only mode (gray cloud) — Cloudflare’s proxy breaks Replit’s SSL certificate renewal.
Why are my environment variables missing in production?
Replit separates workspace secrets from deployment secrets. Adding a secret in Tools → Secrets only makes it available during development. You must also add it in the Deployments pane → Secrets section for production. Static deployments don’t support secrets at all — there’s no server-side runtime to inject them.
Does Replit support WebSocket connections?
Reserved VM deployments fully support WebSockets since the server runs continuously. Autoscale deployments have limited WebSocket support — connections drop when the instance scales to zero. Static deployments don’t support WebSockets. For real-time apps, use Reserved VM.