Deployments Intermediate

Replit makes deploying applications as simple as clicking a button. Learn about the different deployment types, how to configure custom domains, manage environment variables, and get your apps running in production.

Deployment Types

Replit offers three types of deployments, each suited for different use cases:

Type Best For How It Works Pricing
Reserved VM Always-on apps, bots, APIs Dedicated virtual machine that runs 24/7 Starts at $7/month
Autoscale Web apps with variable traffic Scales up/down based on traffic, pay per request Pay-as-you-go
Static HTML/CSS/JS sites, SPAs Serves static files from a CDN Free (with limits)

Deploying Your App

  1. Open the Deploy panel

    In your Repl workspace, click the "Deploy" button in the top right corner of the editor.

  2. Choose a deployment type

    Select Reserved VM, Autoscale, or Static based on your application needs.

  3. Configure settings

    Set the machine size (CPU/RAM), build command, run command, and any environment variables.

  4. Click Deploy

    Replit builds your application, provisions the infrastructure, and gives you a live URL within seconds.

Development vs Production: The "Run" button runs your code in development mode. The "Deploy" button creates a production deployment with its own URL, SSL certificate, and uptime guarantees. Keep development and production separate.

Custom Domains

Connect your own domain name to a Replit deployment:

  1. Go to your deployment settings

    Open the deployed Repl and navigate to the Deployment tab.

  2. Add a custom domain

    Enter your domain name (e.g., myapp.com) and Replit will provide DNS records to configure.

  3. Update your DNS

    Add the provided CNAME or A records to your domain registrar. SSL is automatically provisioned.

Environment Variables & Secrets

Never hardcode API keys or passwords. Use Replit's Secrets tool to store sensitive configuration:

Python
import os

# Access secrets set in the Replit Secrets panel
api_key = os.environ['API_KEY']
db_url = os.environ['DATABASE_URL']

# Use them in your application
client = APIClient(api_key=api_key)
Security: Secrets are encrypted and only accessible to the Repl owner and invited collaborators. They are never exposed in the code editor, version history, or forked copies of your Repl.

Monitoring Deployments

After deploying, monitor your application's health:

  • Logs: View real-time application logs in the deployment panel
  • Analytics: Track request counts, response times, and error rates
  • Health checks: Replit automatically pings your app to ensure it is running
  • Rollbacks: Revert to a previous deployment version if something goes wrong

Try It Yourself

Create a simple web server in Python or Node.js, add a secret API key using the Secrets panel, and deploy it using a Static or Reserved VM deployment. Visit the generated URL to verify it works.