\ Home
๐ How to Deploy on Render
Render makes it simple to host and scale web apps directly from your GitHub or GitLab repositories.
Follow these steps to deploy your application in minutes.
๐งฉ Prerequisites
Before starting, make sure you have:
- A Render account
- Your project pushed to GitHub or GitLab
- A working app (Flask, Node.js, React, etc.)
- A valid dependency file (
requirements.txt,package.json, etc.)
โ๏ธ Step 1: Connect Your Repository
- Log in to your Render Dashboard.
- Click New + โ Web Service.
- Connect your GitHub or GitLab account.
- Select the repository containing your project.
- Choose the branch you want to deploy (usually
mainormaster).
๐งพ Step 2: Configure Deployment Settings
- Enter a name for your service (e.g.,
my-web-app). - Select a region close to your users (e.g., Oregon or Frankfurt).
- Choose the environment type:
- Web Service โ For APIs, Flask, Django, Node.js, etc.
- Static Site โ For HTML/CSS/JS or React apps
- Confirm the branch and click Next.
๐งฐ Step 3: Add Build and Start Commands
Set up commands based on your tech stack:
๐ Python (Flask/Django)
- Build Command:
```bash pip install -r requirements.txt
๐ Step 4: Add Environment Variables
If your application uses environment variables (for example, database URLs, API keys, or secret tokens):
- Go to your service โ Environment tab.
- Click Add Environment Variable.
-
Enter the key-value pairs, for example:
```bash SECRET_KEY=your-secret-key DATABASE_URL=postgres://user:password@host:port/dbname
๐ Step 5: Deploy Your App
After setup:
- Click Create Web Service.
Render will:
- Clone your repository
- Install dependencies
- Build and start your app
Once deployed, your live URL will look like:
- https://your-app-name.onrender.com