Articles

Where to host a Streamlit app in 2026 so it does not sleep: Community Cloud vs Hugging Face Spaces vs Render vs Modal

When Streamlit Community Cloud, Hugging Face Spaces, Render, Modal and Gregale put an idle app to sleep, how each wakes it, and why an open tab keeps it awake.

Updated

Streamlit Community Cloud puts an app to sleep after 12 hours without traffic, and the next visitor has to click "Yes, get this app back up!" and wait for it to restart. Every host that saves money on idle apps puts yours to sleep at some point. What differs is when, and how it comes back: Hugging Face Spaces' free hardware sleeps after 48 hours, Render Free after 15 minutes, Modal after 60 idle seconds, and Gregale within a minute of the last tab closing. On Render the first visitor waits about a minute. On Gregale our test app was running again 139 ms into the wake, restored from a memory snapshot.

Gregale publishes this page. Every limit and price names its vendor and comes from that vendor's own docs or pricing page, checked on November 28, 2026. The Gregale numbers are from our own test, described below.

At a glance

HostWhen an idle app sleepsHow it wakesCost for a small app
Streamlit Community CloudAfter 12 hours without trafficA visitor clicks "Yes, get this app back up!"Free; one private app at a time
Hugging Face Spaces (CPU Basic)After 48 hours without useThe next visitor restarts itFree hardware, but a new Docker Space needs PRO ($9 a month)
Hugging Face Spaces (paid CPU)Never by default; you can set a sleep timeThe next visitor restarts itCPU Upgrade: $0.03 an hour (8 vCPU, 32 GB)
Render (Free web service)After 15 minutes without inbound trafficThe next request; spinning up takes about one minuteFree, 750 instance hours a month
Modal60 seconds after its last connection closes, by defaultThe next request starts a containerPer second; $30 a month of free credits
Gregale (Hobby)Frozen once the last tab closes, parked after 10 minutesThe next request restores a memory snapshot$10 a month for 5 apps, 200 GB-RAM-hours included

An open tab keeps any Streamlit app awake

A Streamlit page talks to its server over a WebSocket, one per browser tab, for as long as the tab is open. That connection is what every host above treats as activity:

  • Render counts WebSocket messages from existing connections as inbound traffic, and spins a Free service down only after 15 minutes without any.
  • Modal keeps one function call open per WebSocket connection, so the container stays up until the tab closes, then waits out its idle window.
  • Gregale counts an open WebSocket as a request in flight. In our test, the app kept running three minutes past its 60-second idle timeout while a tab was open, and was frozen 11 seconds after we closed it.
  • Hugging Face Spaces and Community Cloud put an app to sleep only after days or hours without use, so an open tab rarely matters there.

So "scale to zero" for Streamlit means "costs nothing once nobody has it open". A dashboard someone leaves open on a second monitor runs, and on a paid host bills, all day. Close tabs, or put the app behind a page people open when they need it.

Streamlit Community Cloud

Community Cloud is free and deploys straight from a GitHub repository. Apps without traffic for 12 hours go to sleep. A visitor then sees the sleeping page, and anyone who can view the app can wake it with "Yes, get this app back up!". You can keep one private app at a time; apps deployed from public repositories are public. Resources are shared, and an app that exceeds its limits shows an error page; Streamlit raises limits for free only for nonprofits and education.

People keep apps awake with a scheduled job that visits them. That works, but it works around a free service's limits rather than removing them.

Hugging Face Spaces

Streamlit is no longer a built-in Spaces SDK: you create a Docker Space from the Streamlit template. Creating a Docker or Gradio Space now requires a paid plan, PRO at $9 a month for a personal account; static Spaces stay free. The default CPU Basic hardware (2 vCPU, 16 GB) has no hourly cost and sleeps after 48 hours without use, and the next visitor restarts it.

Paid hardware, such as CPU Upgrade (8 vCPU, 32 GB) at $0.03 an hour, never sleeps unless you set a sleep time, and a sleeping Space is not billed. Spaces fit model demos that need a lot of memory or a GPU.

Render

Render's Free web services spin down after 15 minutes without inbound traffic, HTTP requests and WebSocket messages included. The next request or new WebSocket connection spins the service back up, which takes about one minute while Render shows a loading page. Each workspace gets 750 Free instance hours a month; past that, Render suspends its Free web services until the next month. Spinning down applies to Free instances only.

Modal's Streamlit example runs streamlit run inside a container behind @modal.web_server. Containers stop after 60 idle seconds by default (scaledown_window changes it), and you pay per second: $0.0000131 per physical core (2 vCPU equivalent) and $0.00000222 per GiB of memory, with a minimum of 0.125 cores and 128 MiB per container. The Starter plan includes $30 of credits a month. With more than one container, Streamlit's reconnects need Modal's sticky sessions to reach the same container.

Gregale

Gregale runs the app from your repository, with streamlit run as the start command, and pauses or parks it when nobody is connected:

  • While a tab is open, the app runs and is billed, by plan RAM.
  • When the last tab closes, the instance is frozen in memory once its idle timeout since the last request has passed, or parked on nodes without the frozen tier. Frozen instances are not billed, and the next visitor resumes one in milliseconds.
  • After 10 minutes frozen, or sooner when the node needs the memory, it parks to a snapshot on disk. The next visitor's request restores it.

Streamlit needs WebSockets, which Gregale's Free plan does not allow, so it needs Hobby or above. Hobby is $10 a month for 5 apps with 512 MB each and includes 200 GB-RAM-hours, about 390 hours of a 512 MB instance with a tab open. Past that, a paid plan bills $0.05 per GB-RAM-hour, up to its spend cap.

Deploy it

Three files next to your app.py. A Procfile gives the start command:

text
web: streamlit run app.py --server.port $PORT --server.address 0.0.0.0 --server.headless true --browser.gatherUsageStats false

requirements.txt pins Streamlit and whatever your app imports:

text
streamlit==1.67.0

gregale.yaml makes the app public and points health checks at Streamlit's own health endpoint, because / is the app itself:

yaml
access: public
hosting:
  health: /_stcore/health

Then deploy:

bash
gregale deploy --name my-dashboard

WebSockets are on by default for apps on Hobby and above. If your app needs a login, put it in Streamlit (st.login) or in front of the app; access: public only means Gregale does not ask visitors for a Gregale API key.

What we measured

We deployed a Streamlit 1.67.0 app (a slider, a chart from pandas and NumPy, and a button) on Gregale on 2026-11-28 at 512 MB, with the idle timeout set to 60 seconds, Hobby's default:

  • Deploy: 120 seconds from gregale deploy to a verified release, 71 of them building the image. The app used 103 MB with no session and 300 MB once a session had loaded pandas, so it fits Hobby's 512 MB, not Free's 256 MB.
  • An open tab: the app kept running three minutes past its idle timeout, and the same session (its click counter and session age) carried on.
  • Closing the tab: the instance was frozen 11 seconds later.
  • Resuming a frozen instance: the page's first byte arrived about 0.2 seconds later than from an app that was already running.
  • Restoring from a parked snapshot: Gregale's wake timeline (gregale app wake-timeline) showed the instance running 139 ms into the wake and the first byte of the page at 232 ms.
  • Booting without a snapshot, as after a configuration change: the instance was running at 1.5 seconds and sent the first byte at 1.6 seconds.
  • The first script run: Streamlit runs your script for each new session. After a restore or a cold boot, the first run took about 2.3 seconds, because the process imported pandas and Altair for the first time; in a running app it took about 0.3 seconds.

Where we ran the test, about 160 ms from the app's region, the network added about half a second to every page, so a visitor's wait also depends on how far they are from the region.

Which one to pick

  • A public demo that people visit now and then, at no cost: Community Cloud. Expect the sleeping page after quiet days.
  • A model demo that needs a GPU or lots of memory: Hugging Face Spaces on paid hardware with a sleep time.
  • A side project where a one-minute first load is fine: Render Free.
  • Bursty work that uses many cores for a short time: Modal, billed per second.
  • An internal dashboard people open during the day, that should open quickly and cost nothing at night: Gregale Hobby.

Sources

Checked on November 28, 2026: Community Cloud app hibernation, Community Cloud sharing and private apps, Community Cloud resource limits, Hugging Face Spaces overview, Spaces hardware, billing and sleep time, Streamlit Spaces, Hugging Face pricing, Render free instances, Modal pricing, Modal cold starts and scaledown_window, Modal WebSockets, Modal sticky sessions, Modal Streamlit example, Gregale plans, Gregale public WebSockets and How scaling to zero works.

Questions

Why does my Streamlit app keep going to sleep?

Streamlit Community Cloud puts apps to sleep after 12 hours without traffic, and a visitor has to click "Yes, get this app back up!" to restart it. Hugging Face Spaces on free CPU Basic hardware sleep after 48 hours without use, and Render Free web services spin down after 15 minutes without inbound traffic. Each saves resources on idle apps; the difference is how long the next visitor waits.

Where can I host a Streamlit app so it wakes up quickly?

Use a host that restores an idle app on the first request instead of rebuilding it. On Gregale, our test app was running again 139 ms into the wake, restored from a memory snapshot, and its first page byte left at 232 ms; Render Free takes about one minute to spin up, and Community Cloud waits for a visitor to click the wake button. Gregale needs the Hobby plan ($10 a month) for Streamlit, because its Free plan does not allow WebSockets.

Does an open browser tab keep a Streamlit app running?

Yes, on every host. Each Streamlit tab holds a WebSocket to the server, and Render, Modal and Gregale all treat that connection as activity. In our test on Gregale, the app kept running three minutes past its 60-second idle timeout while a tab was open, and was frozen, no longer billed, 11 seconds after the tab closed.

Is Hugging Face Spaces still free for Streamlit apps?

The CPU Basic hardware (2 vCPU, 16 GB) has no hourly cost, but creating a Docker Space, which is how Streamlit runs on Spaces now that its built-in SDK is deprecated, requires a paid plan: PRO at $9 a month for a personal account. Free hardware sleeps after 48 hours without use.