Streamlit hosting in 2026: how to deploy a Streamlit app, and where
A Streamlit app in production runs streamlit run on the platform's port and on 0.0.0.0, headless, behind a proxy that carries its WebSocket, with secrets in the environment rather than a committed secrets.toml and enough memory for its data and models. On Livops a repository with app.py and requirements.txt starts from a push, for 39 credits a month (39,000 so'm). Here is how Streamlit Community Cloud, Hugging Face Spaces, Render and Railway compare.
By Livops team, the people who build and run LivopsUpdated
A Streamlit app is a Python script that Streamlit’s own server runs again on every interaction, talking to each open browser tab over a WebSocket. Hosting one is mostly about running that server the right way on someone else’s machine: on the port it is given, without trying to open a browser, with its secrets outside the repository and with memory for every viewer at once. This page covers each need, compares Streamlit Community Cloud, Hugging Face Spaces, Render and Railway with each provider’s own numbers, and ends with exactly what Livops reads and starts.
What does a Streamlit app need in production?
The platform’s port and address, headless
Streamlit listens on port 8501 by default, and server.address is unset[2]. A platform tells the app which port to use, so pass it, and listen on every interface so the platform’s proxy can reach it. server.headless decides whether Streamlit tries to open a browser window on start[2]; on a server there is none to open. Every option can go on the command line, which wins over STREAMLIT_* variables and every config.toml[1]:
streamlit run app.py --server.port $PORT --server.address 0.0.0.0 --server.headless true
browser.gatherUsageStats is on by default and sends usage statistics to Streamlit[2]; turn it off with --browser.gatherUsageStats false if you would rather it did not.
A proxy that keeps the WebSocket open
Streamlit keeps a persistent, two-way WebSocket between the browser and the server, and each browser tab opens its own connection and its own session[3]. So the host’s proxy has to carry WebSockets, not only plain requests. It also means a deploy that replaces the server closes those connections, and every open tab has to reconnect to the new one.
Secrets in the environment, not in the repository
Locally, secrets live in .streamlit/secrets.toml; Streamlit’s documentation says to add that file to .gitignore and calls unencrypted secrets in a git repository a bad practice[4]. Root-level keys in it are also readable as environment variables[4], so code that reads os.environ works both on your machine and on a platform that passes variables in:
import os
import streamlit as st
api_key = os.environ["OPENAI_API_KEY"]
Memory for every viewer
The machine running the app provides the compute and storage for all of its users[3], and since every tab is a separate session[3], a DataFrame loaded inside the script is loaded again for each one. st.cache_data is the recommended way to cache data such as a DataFrame read from CSV, and st.cache_resource the way to load an ML model or a database connection once and share it across all sessions[5]:
@st.cache_resource
def load_model():
return joblib.load("model.joblib")
@st.cache_data
def load_sales():
return pd.read_csv("sales.csv")
pandas with a few hundred megabytes of data, or a model from transformers, is usually where 512 MB stops being enough. File uploads are capped at 200 MB per file by default (server.maxUploadSize)[2]; size the memory for the largest file you accept.
A health check
Streamlit’s own Docker example checks /_stcore/health[6]. Point the platform’s health check there, and a version that never got its server up is never given traffic.
The options at a glance
| Option | What it is | Smallest paid always-on app | What you still maintain |
|---|---|---|---|
| Livops | A platform; servers in Uzbekistan | From 39 credits (39,000 so’m) a month | Your code |
| Streamlit Community Cloud | Streamlit’s own free hosting | No paid tier on the pages we read; free apps sleep after 12 hours without traffic[8] | Your code |
| Hugging Face Spaces | ML demo hosting, Git repositories | PRO, $9 a month, to create a Space that runs on compute[15][12]; CPU Upgrade, 8 vCPU and 32 GB, $0.03 an hour or $22 a month, runs without sleeping[15][14] | Your code; a Dockerfile if you leave the Streamlit SDK |
| Render | A platform with web services | $7 a month: 0.5 CPU, 512 MB; $25 for 1 CPU, 2 GB[16] | Your code |
| Railway | A platform billed by usage | Hobby: $5 a month, including that much usage; then about $10 per GB of memory and $20 per vCPU a month[19] | Your code |
Other providers’ prices are from each provider’s own page, read on 23 November 2026; the dates are in Sources below. Livops prices are the ones the cabinet bills today.
Each option
Livops
A Streamlit repository is read, not asked about: Livops finds the script, writes the streamlit run command with the port and the headless flags, and runs it as a web app with an address and HTTPS (details below). Payment is in so’m through Payme or Click, with no card, and the servers are in Uzbekistan — close to users there, farther from users elsewhere. One app’s memory stops at 2 GB, the largest tier, so a large model is better on Hugging Face’s bigger hardware; and you do not get root.
Streamlit Community Cloud
The easiest start there is: connect a GitHub repository, public or private, and the app is deployed, all for free[7]. Every user gets the same resources, from 0.078 to 2 cores, from 690 MB to 2.7 GB of memory and up to 50 GB of storage, and Streamlit says these limits may change at any time without notice[8]. An app with no traffic for 12 hours goes to sleep[8]. You may have one private app at a time[9], and all apps are hosted in the United States, with no choice of location[10]. Secrets are pasted in TOML into the app’s Advanced settings[11].
Hugging Face Spaces
The place for an ML demo, with GPUs by the hour. The Spaces overview now lists three SDKs — Gradio, Docker and static HTML — and creating a Space that runs on compute needs a paid plan: PRO for a personal account[12], at $9 a month[15]. The Streamlit page still describes an sdk: streamlit Space, where only port 8501 is allowed[13]. The free CPU Basic hardware has 2 vCPU and 16 GB[12], more memory than any other free option here, and goes to sleep after 48 hours without use[14]. Its disk is not persistent[12]. Variables and secrets reach a Streamlit Space as environment variables[12].
Render
A web service accepts inbound WebSocket connections from the internet[18]. The smallest paid one is $7 a month for 0.5 CPU and 512 MB, and 2 GB with 1 CPU is $25[16]: fixed prices that are easy to plan around. Render takes credit and debit cards[16]. Open WebSocket connections close when an instance is replaced, during a deploy for example[18].
Railway
The Hobby plan is $5 a month including that much usage; past it, memory is about $10 per GB and CPU about $20 per vCPU a month, billed by the second[19]. Hobby services are always on, and a service can grow to 48 GB of memory[19] — far past the 2 GB Livops stops at. Railway is paid by credit card[19].
Free demo or always-on app: what changes?
Most Streamlit apps start as a demo, and the free tiers are built for that: somebody opens the link, the app wakes, they look around. The trade-off shows up when the app becomes part of somebody’s day. A sleeping app makes the first visitor wait while it starts and loads its data again. A free tier’s limits can change under you[8]. And a dashboard for a company usually wants a database it can write to and a disk that survives a restart, which the free tiers either do not give or give for a limited time. If the app is a demo for strangers, a free tier is the right tool. If people depend on it every morning, pay for something that stays on.
Where can you host a Streamlit app for free?
- Livops has no free tier for apps. On an account that has not paid yet, the first bot or app runs for 15 minutes on a zero balance, once, so you can open it. Static sites are free, and one 500 MB database per team is free once the account has credits.
- Streamlit Community Cloud is free[7], with up to 2.7 GB of memory, sleep after 12 hours without traffic[8] and one private app at a time[9].
- Hugging Face Spaces has free CPU Basic hardware, 2 vCPU and 16 GB[12], which sleeps after 48 hours without use[14]; but creating a Space that runs on compute needs a paid plan, and static Spaces are the free ones[12].
- Render gives free instances to web services, with 750 free instance hours a month per workspace; a free web service spins down after 15 minutes without inbound traffic and takes about a minute to start again, and WebSocket messages on an open connection count as traffic[17].
- Railway has a Free plan with $1 of usage a month and up to 0.5 GB of memory per service, whose services sleep after 5 to 10 minutes without outbound traffic; a trial gives $5 of credit for 30 days, with no card[19].
Deploy Streamlit on Livops
- Push a repository with the entry script at its root —
streamlit_app.py,app.py,main.pyorHome.py— andrequirements.txt. In the cabinet, click New project and choose the repository, or upload the folder as a.zip. - Choose the memory. When the requirements name pandas, scikit-learn, SciPy or matplotlib, the form suggests 512 MB; for torch, TensorFlow or transformers, 1 GB. It is a suggestion with its price beside it: keep it or change it.
- Put your keys under Variables, marked as secret, with the names your code reads from
os.environ. For a database, add PostgreSQL under Databases:DATABASE_URLand thePG*variables are written into the app by themselves. - Deploy. The log shows the install and the start, and the app gets a
<name>.livops.appaddress with HTTPS.
Livops makes it a Streamlit app when streamlit is among the dependencies, or imported in the code, and one of streamlit_app.py, app.py, main.py, Home.py or home.py in the repository root imports it; the first one in that order is the script. For app.py it starts:
.venv/bin/streamlit run app.py --server.port 3000 --server.address 0.0.0.0 --server.headless true --browser.gatherUsageStats false
PORT is 3000 unless you change it, and the app has a minute to answer on it. Around that command:
- If
requirements.txtleavesstreamlitout but the code imports it, the server is installed for you. - Secrets marked as secret are never shown again after saving, not in the cabinet, the API or to the assistant. New values take effect on the next deploy, or now if you restart the service.
- Memory is a tier of 256, 512, 1024 or 2048 MiB, set with
memoryinlivops.jsonwhen the project is created and in the settings afterwards; the tier is part of what you pay for. An app that runs out is stopped, and the log saysKilledor exit code 137. - If the new version does not start, the previous one keeps serving. Recent versions stay in Deploys for a one-click rollback.
- Files written to
/app/data(theDATA_DIRvariable) survive restarts and deploys; the code folder is read-only and/tmpis wiped, and holds 128 MB. A file the app writes for later belongs in/app/data, and data that matters in the database, which is backed up every night.
To set the start yourself, for a script in a subfolder or with options of your own, put livops.json in the repository root:
{
"kind": "web",
"start": ".venv/bin/streamlit run dashboard/app.py --server.port $PORT --server.address 0.0.0.0 --server.headless true",
"healthPath": "/_stcore/health",
"memory": 1024
}
healthPath is optional: it is the path Livops checks to know the app is alive, and Streamlit answers on /_stcore/health. kind, start and memory are read when the project is created and changed in the settings after that.
A Streamlit app is from 39 credits a month (39,000 so’m). One credit is 1,000 so’m, and bought credits never expire. See Pricing for plans, which give more credits than they cost, and Frameworks and livops.json for every field.
Questions
Which command does Livops start a Streamlit app with?
streamlit run on the script it finds, on the platform's port, on every interface, headless and without usage statistics: .venv/bin/streamlit run app.py --server.port 3000 --server.address 0.0.0.0 --server.headless true --browser.gatherUsageStats false. It looks at streamlit_app.py, app.py, main.py, Home.py and home.py in the repository root, in that order, and takes the first that imports streamlit.
My entry script is in a subfolder. What then?
Write the start yourself, in livops.json or in Settings, for example .venv/bin/streamlit run dashboard/app.py --server.port $PORT --server.address 0.0.0.0 --server.headless true. Only the root files above are looked at.
Where do my secrets go if secrets.toml is not in the repository?
Under Variables, marked as secret, and your code reads them with os.environ. A secret's value is never shown again after you save it, not even to the assistant. Keep .streamlit/secrets.toml in .gitignore for local work.
How much memory does a Streamlit app need?
It depends on what it loads. Every browser tab is its own session, so data loaded per session is held once per viewer; load shared data and models once with st.cache_data and st.cache_resource. On Livops memory is a tier of 256, 512, 1024 or 2048 MB, and an app that runs out is stopped with Killed or exit code 137 in the log.
Does a Streamlit app on Livops go to sleep?
No. A paid app runs around the clock, whether or not anybody has it open. There is no free tier for apps; on an account that has not paid yet, the first app runs for 15 minutes on a zero balance, once.
How much does a Streamlit app cost on Livops?
From 39 credits a month, which is 39,000 so'm at 1,000 so'm a credit; the memory tier is part of the price. Credits are bought in so'm through Payme or Click, with no card, and bought credits never expire.
Who wrote this comparison?
The Livops team. Every price and limit of another provider on this page links to that provider's own page, with the day we read it.
Sources
- Streamlit — Configuration options (docs.streamlit.io). Checked .
- Streamlit — config.toml (docs.streamlit.io). Checked .
- Streamlit — Understanding Streamlit's client-server architecture (docs.streamlit.io). Checked .
- Streamlit — Secrets management (docs.streamlit.io). Checked .
- Streamlit — Caching overview (docs.streamlit.io). Checked .
- Streamlit — Deploy Streamlit using Docker (docs.streamlit.io). Checked .
- Streamlit Community Cloud — Overview (docs.streamlit.io). Checked .
- Streamlit Community Cloud — Manage your app (docs.streamlit.io). Checked .
- Streamlit Community Cloud — Share your app (docs.streamlit.io). Checked .
- Streamlit Community Cloud — Status and limitations (docs.streamlit.io). Checked .
- Streamlit Community Cloud — Secrets management (docs.streamlit.io). Checked .
- Hugging Face — Spaces overview (huggingface.co). Checked .
- Hugging Face — Streamlit Spaces (huggingface.co). Checked .
- Hugging Face — Using GPU Spaces (hardware, billing, sleep time) (huggingface.co). Checked .
- Hugging Face — Pricing (huggingface.co). Checked .
- Render — Pricing (render.com). Checked .
- Render — Deploy for free (render.com). Checked .
- Render — WebSockets (render.com). Checked .
- Railway — Pricing (railway.com). Checked .
Put your project online today
Connect GitHub or drop a folder. No card is asked for.
Deploy your Streamlit appRelated
- FastAPI hosting in 2026: how to deploy a FastAPI app, and whereA FastAPI app in production runs on Uvicorn without --reload, listens on 0.0.0.0 and the platform's port, trusts the proxy's headers and runs its migrations before it starts. On Livops a repository with main.py and requirements.txt starts on Uvicorn from a push, for 39 credits a month (39,000 so'm). Here is how Render, Railway, Fly.io and a VPS compare.
- Flask hosting in 2026: how to deploy a Flask app, and whereA Flask app in production runs on a WSGI server such as Gunicorn, never on flask run, and is told it sits behind a proxy. On Livops a repository with app.py and requirements.txt that lists gunicorn starts on Gunicorn from a push, for 39 credits a month (39,000 so'm). Here is how Render, Railway, Fly.io and a VPS compare.
- Django hosting in 2026: how to deploy a Django app, and whereA Django app in production needs a WSGI or ASGI server instead of runserver, DEBUG off, ALLOWED_HOSTS set, collected static files and migrations on every deploy. On Livops a repository with manage.py and requirements.txt gets all of that from a push, for 39 credits a month (39,000 so'm). Here is how Render, Railway, Fly.io and a VPS compare.
- Managed PostgreSQL hosting in 2026: the options comparedA production PostgreSQL needs backups you can restore, a connection limit your app stays under, the app in the same region, and a supported version. On Livops a PostgreSQL 15, 16 or 17 database runs inside your project, its DATABASE_URL is written into your services, and it is backed up every night; 500 MB is free, one per team, and 1 GB is 9 credits a month. Here is how Neon, Supabase, Render, Railway and a VPS compare.
- ModuleNotFoundError: No module named — after a deployPython searched sys.path and could not find the module you import. After a deploy that almost always means the package is not in requirements.txt, is listed under a different name than the one you import, or the start command runs a Python that the packages were not installed into.
- App not listening on $PORT: why the health check failed after deployThe platform started your app, tried the port it gave it, and nothing answered in time. Almost always the app listens on its own fixed port instead of the PORT variable, listens on localhost (127.0.0.1) instead of 0.0.0.0, or crashed or was still starting when the check gave up. Listen on 0.0.0.0 and the port in PORT, and it passes.