App hosting ยท Streamlit

Streamlit hosting on an address of your own

Streamlit is a web app, so it needs what any web app needs here: a port to listen on and an address to be reached at. Push the repository, set the start command, turn on the address, and every commit redeploys it.

Free app
256 MB, Node.js, Python, Go, Java and more
Address
https://name.fadehost.app, sleeps when idle on free
Paid
from $2/mo or $20/yr for 1 GB, with an always-on address included
Regions
France, Montreal, Oregon, Singapore

The start command, which is the whole trick

streamlit run app.py --server.port $PORT --server.address 0.0.0.0 --server.headless true

Three flags matter. --server.port $PORT uses the port the panel sets, 8080 by default. --server.address 0.0.0.0 answers the proxy instead of only itself. --server.headless true stops Streamlit trying to open a browser and asking for an email on first run, which is what makes a deploy hang. streamlit goes in requirements.txt.

The address, free and paid

Give the app a name and it answers at https://name.fadehost.app with the certificate handled, behind the Cloudflare proxy. The address comes with the plan on every tier. On the free plan it sleeps when nobody has opened it for a while and wakes on the next request, which the first viewer after a quiet spell waits for; from $2 a month it stays awake. Your own domain can point at it from the app's page.

How much memory a dashboard wants

Streamlit keeps state per viewer and reruns your script on every interaction, so memory follows the data you load rather than the number of widgets. A small app reading a CSV runs in the free 256 MB; pandas over anything substantial, or a handful of people with the page open, is the 1 GB tier at $2, with up to 3 GB more at $1 a gigabyte. Cache the expensive parts with st.cache_data and the reruns stop costing what the first load cost.

Secrets, not secrets.toml

Read keys from the environment with os.environ: the panel masks the values, injects them at start and keeps them out of the repository. A committed .streamlit/secrets.toml puts your keys in git history, which is the one thing to avoid on a public repository.

Frequently asked questions

Does Streamlit work on the free plan?

Yes, for a small app. The free 256 MB runs a simple dashboard, and the address sleeps when idle and wakes on the next request. An app people use belongs on a paid plan from $2 a month, where the address stays awake.

Why does my deploy hang on the first start?

Almost always the email prompt: Streamlit asks for one on a first run unless you pass --server.headless true. Add the flag to the start command and the app comes up.

Can I put it behind my own domain?

Yes. Point a hostname at the app from its page, up to three per app, and it answers on your domain with a certificate.

Which port does the app listen on?

The PORT environment variable, 8080 by default, on 0.0.0.0. A server bound to 127.0.0.1 answers only itself and the web address gets nothing.

How does the public address work?

Give the app a web address in the panel and it is served at https://name.fadehost.app behind the Cloudflare proxy with a certificate. It comes with the plan on every tier. On the free tier the address sleeps when nobody has used it for a while and wakes on the next request; on a paid tier it stays awake. Your own domain can point at it.

What happens on a deploy?

The repository is cloned at your branch, dependencies install, the build runs when there is one, the app starts. With auto-deploy on, every push does the same. The live console shows each step; a failed one is explained in plain words.

Related

Streamlit hosting on an address of your own

Deploy a Streamlit app free