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
-
Open the Deploy panel
In your Repl workspace, click the "Deploy" button in the top right corner of the editor.
-
Choose a deployment type
Select Reserved VM, Autoscale, or Static based on your application needs.
-
Configure settings
Set the machine size (CPU/RAM), build command, run command, and any environment variables.
-
Click Deploy
Replit builds your application, provisions the infrastructure, and gives you a live URL within seconds.
Custom Domains
Connect your own domain name to a Replit deployment:
-
Go to your deployment settings
Open the deployed Repl and navigate to the Deployment tab.
-
Add a custom domain
Enter your domain name (e.g.,
myapp.com) and Replit will provide DNS records to configure. -
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:
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)
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.
Lilly Tech Systems