Deploy a FastAPI or Flask app to Render as a web service, set the build and start commands, and understand free tier sleep.
Deploy my FastAPI app to Render and keep it from sleeping
How it works
- Check your requirements file: Render installs packages from requirements.txt. Vovy makes sure it lists everything your app imports, including uvicorn for FastAPI.
- Create a new Web Service: Vovy opens the Render dashboard, clicks New, then Web Service, and connects your GitHub repo. You sign in yourself if prompted.
- Set build and start commands: Vovy fills Build Command with pip install -r requirements.txt and Start Command with uvicorn main:app --host 0.0.0.0 --port $PORT, matching your file names.
- Pick a plan and deploy: Vovy explains Free versus paid in a card, asks which you want, then clicks Deploy Web Service and reads the logs as it builds.
- Test the live endpoint: Vovy opens your onrender.com URL and your /docs page, confirms a real response, and shows the URL in a card.
What you provide
- Python code on GitHub
- A Render account
What you get
- A live onrender.com API
- Correct build and start commands
- A clear picture of free tier sleep
FAQ
Why is my Render app slow on the first request?
Free web services spin down after 15 minutes with no traffic and take about a minute to wake up. A paid instance stays on.
Can I save uploaded files on Render?
Not on the free tier. Its filesystem is wiped on every restart or redeploy, so store files in something like Supabase Storage or S3.
Do I need Docker?
No. Render's native Python runtime handles it. Docker is optional if your app needs special system packages.
Related tasks
All tasks