Home / Localhost / localhost:8501

localhost:8501: Streamlit apps

Port 8501 is Streamlit’s default. How to open your app, change the port and fix errors.

localhost:8501 in a browser address bar reaches port 8501 on your computer, where Streamlit is running

Open this address: http://localhost:8501This opens on your own computer. It only works if the program is running.

localhost:8501 is the default address of a Streamlit app. It works while the streamlit command keeps running in your terminal.

What runs on localhost:8501

Commands to start and test port 8501

Start an app
streamlit run app.py
Use another port
streamlit run app.py --server.port 8502
Allow other devices on your network
streamlit run app.py --server.address 0.0.0.0

Find what is using port 8501

Run these in a terminal on your computer. Nothing is sent to this site.

If localhost:8501 will not open

Port 8501 is already in use
An older Streamlit app is still running. Stop it, or start the new one with --server.port 8502.
streamlit: command not found
Install it with pip install streamlit and activate the right Python environment.
Blank page
Read the terminal for Python errors. Streamlit shows them there and in the page.
Cannot open it from your phone
Use --server.address 0.0.0.0 and your computer’s IP address. See how to open localhost from your phone.

Other ports like 8501

PortUsually used by
localhost:3000React, Next.js, Express
localhost:5173Vite dev server
localhost:4200Angular dev server
localhost:5000Flask
localhost:8000Django, PHP, Python
localhost:8080Tomcat, Spring Boot, Docker
localhost:8888Jupyter Notebook

Questions about localhost:8501

What is port 8501?
The default port of Streamlit apps.
How do I run two Streamlit apps?
Start the second with a different port, such as --server.port 8502.
Is localhost:8501 safe?
Yes, as long as it stays on localhost. Only your own computer can reach localhost:8501. It becomes reachable from other devices only if you start the program on 0.0.0.0 or your computer's IP address. Development servers are for testing, so do not put them on the public internet.
Can I use a different port instead of 8501?
Yes. Most programs let you choose the port with a setting or a command option. Pick a free port above 1024 and open that number instead, for example localhost:8502.
How do I check what is using port 8501?
Use the port checker on this page. It shows the command for Windows, macOS and Linux and does not send anything to this site.
Can I open localhost:8501 from my phone?
Yes, if both are on the same Wi-Fi. Start the program so it listens on all addresses, then open your computer's IP address with :8501 on the phone. A firewall on the computer can still block it.

Updated 2026-10-03

Free tools that help

Related pages