Build a Streamlit web app on an 8GB mini PC
Build a small Streamlit web app on an 8GB mini PC with no GPU: measured startup time and memory, the one-file app, and the first snags.
A web app sounds heavy: a framework, a server, a database, a browser. On an 8GB PC it is easy to assume you need more RAM before you start. This article takes the smallest useful step instead — one page, one file, one local server — and measures what it actually costs on the test machine.
Bottom line: On the 8GB mini PC (no external GPU), the Streamlit server reached HTTP 200 in about 0.75 seconds and used about 59MB of memory while idle. The first pip install is the slow part. Your browser adds its own memory on top, so keep a few tabs, not twenty.
What you will build
A single page with a name field, a row-count slider, a table, and a line chart. No HTML, no JavaScript, no routing. The whole app is one Python file.
What you need
- Python 3.10 or newer (3.12 here)
- The ability to create a virtual environment (
python3 -m venv) - About 1GB of free disk space for Streamlit and its dependencies
No GPU is required. Nothing in this task uses one.
Step 1: Create a virtual environment and install Streamlit
mkdir streamlit-lab
cd streamlit-lab
python3 -m venv .venv
source .venv/bin/activate
pip install streamlit
On Windows, activate with .venv\Scripts\activate. The first install pulls a stack of dependencies, so expect a few minutes depending on your connection. Later installs reuse the files already on disk.
If you have not set up Python yet, start with Python on 8GB PC RAM: VS Code setup and your first script. If you keep several projects, SQLite for a small app is a good next step for storing data without running a database server.
Step 2: Write app.py
import streamlit as st
import pandas as pd
st.set_page_config(page_title="8GB Lab", layout="centered")
st.title("8GB mini PC test app")
st.write("Streamlit on an 8GB mini PC.")
name = st.text_input("Name", "test")
rows = st.slider("Rows", 5, 200, 50)
df = pd.DataFrame({"x": range(rows), "y": [i * 2 for i in range(rows)]})
st.dataframe(df, use_container_width=True)
st.line_chart(df, x="x", y="y")
st.button("Run")
Widgets are written top to bottom, the same order they appear on the page. Streamlit handles state and reruns, so you do not write a request handler or a template.
Step 3: Run it
streamlit run app.py
Open the local URL it prints (usually http://localhost:8501). Over SSH or in WSL, add --server.headless true so it does not try to launch a browser on the remote machine.
Measured: startup time and memory
On the test machine (Core i5-7260U / 8GB RAM / no external GPU / SATA SSD), I started the server three times and measured until http://localhost:8501/ returned HTTP 200.
| Item | Measured |
|---|---|
| Startup to HTTP 200 | 0.74–0.76 s |
| Idle memory (RSS) | about 59MB |
| Free RAM after startup | about 6.7GB (with other processes) |
| Local response time | about 2ms |
These figures are for the server process before a browser connects. Opening the page adds browser memory, and the app script runs when a session connects. On 8GB, the browser is usually the larger cost, not Streamlit.
Common snags
streamlit: command not found
The virtual environment is probably not active, or pip and streamlit point at different Python installs. Activate the environment and install again, or run python -m streamlit run app.py.
Port 8501 is already in use
Another Streamlit instance is running. Start with --server.port 8502.
Another device cannot open the page
By default Streamlit listens on localhost only. To reach it from your phone or another PC on the same network, add --server.address 0.0.0.0 and allow the port in the OS firewall. In WSL2 you may also need a Windows port proxy.
If you want to publish it
- LAN only: keep the local server and open it from another device at home or in the office. Nothing is exposed to the internet.
- Streamlit Community Cloud: deploys from a GitHub repository. Free-tier limits change, so check the current terms on the official site.
- A VPS: suited to a page that stays online. Plan for authentication, HTTPS, and updates, not just the app code.
A published URL can be opened by anyone who has it. Do not put personal or internal data behind an unauthenticated page.
Notes
- Streamlit reruns the whole script on each interaction. Move slow work behind
st.cache_datainstead of recomputing it every time. - Server and browser share the same 8GB. Closing resident apps gives the browser more room.
- Prices, free-tier limits, and versions are as of November 2026. Check the official documentation before relying on them.
- If you need fine control over layout and CSS, Flask plus templates is a better fit. For getting one screen working today, Streamlit is the shortest path.