How to Deploy a Streamlit App on Render (Free, 2026)

Web Engineer

To deploy a Streamlit app to Render, put your code and requirements.txt on GitHub, create a Web Service on Render, and set the Start Command to streamlit run your_app.py --server.port $PORT --server.address 0.0.0.0. On the Free instance type it costs nothing, but the service spins down after 15 minutes without traffic and takes about a minute to start on the next visit. This guide walks through the steps using Streamlit's official sample app (Uber pickups).

Updated December 2026: reflects Render's current form fields (Language / Compute) and free-tier limits (spin-down after 15 minutes, 512MB, 750 hours per month), and fixes the Start Command to set the port explicitly. Also adds how to pin the Python version and a comparison with Streamlit Community Cloud.

Overview

  1. Write the sample code locally and run it
  2. Upload the code to GitHub
  3. Connect GitHub to Render and deploy the app
  4. Check the deployed app

Who this is for

  • Developers new to Render
  • Developers with some knowledge of Python web frameworks
  • Anyone who already has Render and GitHub accounts

What is Streamlit?

Streamlit is an open-source web application framework written in Python. It makes it easy to build graphical web apps for machine learning and data science. It is often compared with Flask and Django; compared with these traditional frameworks, it is better suited to building interactive dashboards and data-analysis apps.

Streamlit • A faster way to build and share data apps
Streamlit is an open-source Python framework for machine learning and data science teams. Create interactive data apps in minutes.

Streamlit official website home page

What is Render?

Render (render.com) is a cloud platform for quickly deploying web services, static sites, Docker containers and more. It also offers fully managed PostgreSQL and Key Value (Redis-compatible, formerly called Redis). Connected to GitHub, it deploys automatically on every push, and with a free instance type available it is a popular place to publish portfolio projects.

Cloud Application Hosting for Developers | Render
Render is a unified cloud to build and run all your apps and websites with free TLS certificates, global CDN, private networks and auto deploys from Git.

Render official website home page

Render free-tier limits to know (December 2026)

ItemDetails
Free instance specs0.1 CPU / 512MB RAM
Spin-downSpins down after 15 minutes without inbound traffic (HTTP requests or WebSocket messages). Starts again on the next request, which takes about a minute
Instance hours750 hours per workspace per month (not consumed while spun down). When they run out, services stay suspended until the next month
Bandwidth and buildsThe Hobby plan includes 5GB of bandwidth and 500 build pipeline minutes per month
FilesChanges to local files are lost on redeploy, restart or spin-down (no persistent disks)
OtherNo SSH / shell access, no scaling, and Render may restart the service at any time

Streamlit is fairly memory-hungry, so apps that load large data or models can crash at the 512MB limit. In that case, move to a paid instance (from $7/month for 512MB; 2GB from $25/month) or consider Streamlit Community Cloud, which has a higher memory limit (see the comparison at the end of this article).

Write the code locally

First, build an app that runs locally. We will deploy the sample code published on the official site (the link below now redirects to the new URL of the official "Create an app" tutorial).

Create an app - Streamlit Docs

Create a folder anywhere and add a file named uber_pickups.py. Copy and paste the following code into it.

import streamlit as st
import pandas as pd
import numpy as np

st.title('Uber pickups in NYC')

DATE_COLUMN = 'date/time'
DATA_URL = ('https://s3-us-west-2.amazonaws.com/'
            'streamlit-demo-data/uber-raw-data-sep14.csv.gz')

@st.cache_data
def load_data(nrows):
    data = pd.read_csv(DATA_URL, nrows=nrows)
    lowercase = lambda x: str(x).lower()
    data.rename(lowercase, axis='columns', inplace=True)
    data[DATE_COLUMN] = pd.to_datetime(data[DATE_COLUMN])
    return data

data_load_state = st.text('Loading data...')
data = load_data(10000)
data_load_state.text("Done! (using st.cache_data)")

if st.checkbox('Show raw data'):
    st.subheader('Raw data')
    st.write(data)

st.subheader('Number of pickups by hour')
hist_values = np.histogram(data[DATE_COLUMN].dt.hour, bins=24, range=(0,24))[0]
st.bar_chart(hist_values)

# Some number in the range 0-23
hour_to_filter = st.slider('hour', 0, 23, 17)
filtered_data = data[data[DATE_COLUMN].dt.hour == hour_to_filter]

st.subheader('Map of all pickups at %s:00' % hour_to_filter)
st.map(filtered_data)

Next, run the following command in the directory containing this file and confirm that the app starts.

$ streamlit run uber_pickups.py

If it does not run, Streamlit is not installed. Run

$ pip install streamlit

or similar, then try again.

The Uber pickups sample app running locally

Next, create the file Render uses to install Streamlit. Name it requirements.txt and put the following in it (pandas and numpy are installed along with Streamlit as its dependencies).

streamlit

For production, it is safer to pin the version that worked locally. Check it with pip show streamlit and write something like streamlit==1.68.0.

Pin the Python version

Render's default Python version depends on when the service was created. For services created on or after November 3, 2026, the default is 3.14.x. To match your local version, add a .python-version file to the repository root.

3.12

.python-version lets you omit the patch number, in which case the latest patch release is used. You can also use the PYTHON_VERSION environment variable, but it requires a full version including the patch number (such as 3.12.8) and takes precedence over the file.

Set up GitHub

Create a GitHub repository just for this app. I named mine streamlit_render.

See the following page for how to create a repository.

リポジトリのクイック スタート - GitHub Docs
新しいリポジトリを作成し、最初の変更を 5 分でコミットする方法について説明します。

Then push the project you created locally to the repository. If you are not sure how, see Pushing commits to a remote repository (GitHub Docs); the original Japanese version of this post linked to this tutorial (Japanese). You can also upload files by drag and drop on GitHub.

In the end, requirements.txt and uber_pickups.py should be in the repository, as shown below.

GitHub repository with requirements.txt and uber_pickups.py uploaded

Set up Render

Next, configure Render to deploy the app. The screenshots below show the UI as of December 2023. Some field names and their order have changed since, so the text gives the field names from the current official docs alongside.

Click "+ New" → "Web Service" in the upper right of the dashboard.

Choosing Web Service from Render's New menu (December 2023 UI)

Next, connect the GitHub repository you just created. (In 2023 there was a screen where you chose Build and deploy from a Git repository. Now the form lists the repositories Render can access, and if GitHub is not connected yet you can connect it right there.)

Choosing to deploy from a Git repository (December 2023 UI)

Select the repository you created and click "Connect".

Selecting the GitHub repository to connect (December 2023 UI)

Give the app any name (it is also used in the onrender.com URL), set Branch to main, and set Language (called Runtime in the old UI) to Python 3.

Setting the app name, branch and runtime (December 2023 UI)

Leave the Build Command at its default,

pip install -r requirements.txt

and set the Start Command to the following.

streamlit run uber_pickups.py --server.port $PORT --server.address 0.0.0.0

Render requires web services to listen on 0.0.0.0, on the port in the PORT environment variable (default 10000). Without options, Streamlit starts on port 8501. Render can "usually" detect a different port automatically, but if it can't, the deploy fails, so it is safest to set the port explicitly as above.

Setting the Build Command and Start Command (December 2023 UI)

In the first version of this post (December 2023), the Start Command was just streamlit run uber_pickups.py and the deploy worked (a 2023 record). It may still work thanks to automatic port detection, but setting the port is recommended to avoid errors such as "Port scan timeout reached".

Finally, choose Free under Compute (the instance type) and click "Deploy" at the bottom of the form. The deploy starts automatically.

Check that the deploy succeeded

When the deploy succeeds, you can open the web app from the your-app.onrender.com link shown at the top of the service page.

Service page and URL after a successful deploy (December 2023 UI)

Here is the deployed app.

The app deployed to Render

On a Free instance, the service spins down when nobody visits for a while, and the next visitor sees a loading screen while it starts. This is not a bug: Free instances spin down after 15 minutes without traffic.

How it differs from Streamlit Community Cloud

If you only need to publish Streamlit apps, the official Streamlit Community Cloud is another option. The main differences (December 2026):

ItemRender (Free)Streamlit Community Cloud
Memory512MB690MB–2.7GB
Time until it stops15 minutes without traffic (starts automatically in about a minute)12 hours without traffic (wake with a button)
SetupBuild / Start Command and port requiredJust choose the repository and file
Custom domainSupported (up to 2 on Hobby)streamlit.app subdomains only
Non-Streamlit appsFastAPI, Node.js, Docker and moreStreamlit apps only

The full deployment steps are in How to deploy to Streamlit Community Cloud.

Wrapping up

We built a simple web app with Streamlit and deployed it to the cloud with Render.

The code from this article is published on GitHub for reference.

GitHub - gomorepython/streamlit_render
Contribute to gomorepython/streamlit_render development by creating an account on GitHub.

Render's error messages often make the cause hard to find, so also see Render deploy errors and how to fix them.

Render Deploy Failed? Fix Common Python Errors
Fix Python deploy errors on Render: your_application, ModuleNotFoundError, Port scan timeout, Python version, 512MB out of memory, 502/503 and Keras.

References

Title and URL copied