
You’ve built a great Flask App or Django Project, but it only runs on your own computer (localhost:8000). So, how do you deploy your Python app and give it a real URL that your friends can visit?
We need to deploy it to a server. The easiest modern way to do this for free is using Render.com (a popular alternative to Heroku).
Note: This requires you to use Git and GitHub. If you don’t know them, pause here and learn the basics first!
Step 1: Prepare Your App
Render needs to know two things:
- What libraries to install: Create a
requirements.txtfile.
pip freeze > requirements.txt 2. How to start your app: Create a file named Procfile (no extension).
- For Flask:
web: gunicorn app:app - For Django:
web: gunicorn config.wsgi(You’ll need topip install gunicornfirst!)
Step 2: Push to GitHub
Upload your complete project code to a new repository on GitHub.
Step 3: Create a Web Service on Render
- Go to Render.com and create a free account.
- Click “New +” and select “Web Service”.
- Connect your GitHub account and select your project repository.
- Render will usually auto-detect that it’s Python.
- Click “Create Web Service”.
Render will now download your code, install the requirements, and start your app. In a few minutes, it will give you a live URL (e.g., my-app.onrender.com)!





