What a Streamlit app needs from a host
Five things, and here is how each one maps to a Hostim feature.
A long-running process
Streamlit is a Python server process, not a serverless function. Hostim runs the container continuously: there is no sleep mode and no scale-to-zero.
WebSockets
The browser UI talks to the Streamlit server over a WebSocket at /_stcore/stream. It works on Hostim with no proxy config.
Enough RAM
Each user session lives in the memory of the server process, and a loaded DataFrame or model stays there. Pick a plan with room: 1 GB for a small dashboard, 2 to 4 GB when the data or the model is large.
Secrets kept out of the code
API keys and database passwords go in environment variables, not in the image or the repository. Read them in Python with os.environ.
Files that survive a redeploy
Attach a volume for SQLite, cached data or uploaded files. Files written outside the volume's mount path are lost on the next deploy.
How to deploy a Streamlit app on Hostim
This is the short path: a Dockerfile, one CLI command, then the settings in the dashboard.
- Put a Dockerfile in the repo. Hostim builds from a Dockerfile. We deployed this one on Hostim and it worked:The
Dockerfile
FROM python:3.12-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . EXPOSE 8501 CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=8501", "--server.headless=true"]--server.address=0.0.0.0flag matters: the app must listen on all interfaces, not on localhost. See deploying from Git for the Dockerfile path and build context rules. - Create a project. A project holds the app, its databases and its volumes.
- Add an app from Git or from a Docker image. From Git, Hostim builds the image for you. From a registry, point it at a public or private image. See deploying from Docker.
- Or deploy a local folder with the CLI. This command uploads the folder and sets the plan, port and health check in one step:
CLI
hostim deploy streamlit --source . --plan sa-1-1 --port 8501 --health-check-path /_stcore/health - Under HTTP Service, choose Public website. Set the HTTP port to 8501. Hostim gives the app an HTTPS domain with a certificate, and custom domains are supported.
- Set the health check path to
/_stcore/health. It is Streamlit's built-in health endpoint and returns "ok". See advanced app settings. - Put secrets in environment variables. Add API keys and database passwords in the Envs tab, then read them with
os.environ. Do not bake.streamlit/secrets.tomlinto the image. See environment variables. - Attach a volume if the app writes files. SQLite, cached data and uploaded files must live inside the volume's mount path or they are lost on the next deploy. See volumes.
- Run one replica. Streamlit keeps each user session in the memory of one server process, so one replica is the correct shape.
- Read the logs. The Logs tab streams stdout, so you can see the server start and any traceback. See logs.
Streamlit Community Cloud vs your own container
Streamlit Community Cloud is Streamlit's own host, and it is free. For a public demo app it is the obvious free choice: connect a GitHub repository, pick a file, get a URL. Nothing on this page changes that.
Community Cloud has one limit you cannot change: its documentation says it hosts all apps in the United States, and this is not configurable.
Hostim is the other shape: your own container, on your own plan, in the EU. It fits when the app must be private behind your own login, needs more RAM, needs a database next to it, or must run in the EU. You pay for it: €2.50 a month for the smallest plan.
Hostim has no built-in login layer in front of apps. For a private app, add authentication in the app. Streamlit itself supports OIDC login through st.login() in recent versions.
How much RAM does a Streamlit app need
Start at 1 GB and move up when the data grows. A pandas and plotly dashboard on a small dataset fits in the 1 GB plan. Load a big DataFrame or an ML model and you need 2 to 4 GB.
Uploads count against RAM as well. Streamlit's default upload limit is 200 MB per file (server.maxUploadSize), and an upload is held in memory while the script runs.
The plans are sa-1-1 for 1 shared core and 1 GB of RAM at €2.50 a month, sa-2-2 for 2 cores and 2 GB at €4.50, and sa-3-4 for 3 cores and 4 GB at €7.50. Billing is hourly in EUR excluding VAT. Every new account gets a 5-day trial with no credit card.
When Hostim is not the right choice
- For a public demo app, Streamlit Community Cloud is free and is the obvious choice. Hostim is not free after the trial.
- Hostim has no GPU. If the app needs one, this is not the place for it.
- If you need several replicas that share user sessions, this setup does not give you that. Streamlit keeps each session in one process, so run one replica.
- There is one region, in the EU. If the app must run outside the EU, this is not it.
In the EU, on purpose
Hostim runs in German data centers under EU jurisdiction, with no US parent company and no CLOUD Act exposure.
Every project includes a free Postgres (256 MB), MySQL (256 MB), Redis (128 MB) and a 1 GB volume, in the same place as the app.
Streamlit hosting FAQ
How do I deploy a Streamlit app with Docker?
Add a Dockerfile that installs your requirements and starts the server with streamlit run app.py --server.address=0.0.0.0 --server.port=8501 --server.headless=true. Hostim builds that Dockerfile from Git, or runs an image from a registry. The 0.0.0.0 address matters: the app must listen on all interfaces, not localhost.
Do WebSockets work on Hostim?
Yes. Streamlit talks to the browser over a WebSocket at /_stcore/stream, and it works on Hostim with no proxy config. In our test an idle connection stayed open for 4 minutes.
Which port and health check should I use?
Under HTTP Service choose Public website and set the port to 8501. In the advanced settings, set the health check path to /_stcore/health, which is Streamlit’s built-in health endpoint and returns "ok". The CLI equivalent is --port 8501 --health-check-path /_stcore/health.
How do I keep secrets out of the code?
Put API keys and database passwords in environment variables in the Envs tab, then read them in Python with os.environ. Do not bake .streamlit/secrets.toml into the image or commit it to the repository. That lets you rotate a secret without rebuilding.
How much does Streamlit hosting cost, and is there a free tier?
There is no free tier. A new account gets a 5-day trial with no credit card. After that the plans are €2.50 a month for 1 shared core and 1 GB of RAM, €4.50 for 2 cores and 2 GB, and €7.50 for 3 cores and 4 GB, billed hourly in EUR excluding VAT. Streamlit Community Cloud is the free option for a public demo app.
Can a Streamlit app use a database?
Yes. Every project includes a free Postgres (256 MB), MySQL (256 MB) and Redis (128 MB), and their connection details are exposed to the app as environment variables. For a single-process dashboard, SQLite on an attached volume also works; write the file inside the volume’s mount path so it survives a redeploy.
Start now
Put something live today.
Open the dashboard and deploy a Docker image, a Git repo or a template. The 5-day trial project needs no card.