Home / Localhost / localhost:8888

localhost:8888 (Jupyter Notebook): not working and fixes

Port 8888 is Jupyter’s default and an older MAMP default. How to open it and fix token and connection problems.

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

localhost:8888 opens Jupyter Notebook or JupyterLab by default. Older MAMP installs also use it for Apache.

localhost:8888 in a browser address bar reaches port 8888 on your computer, where Jupyter Notebook is running

What runs on localhost:8888

Commands to start and test port 8888

JupyterLab
jupyter lab
Jupyter Notebook
jupyter notebook
Another port
jupyter lab --port 8889
Show running servers and their tokens
jupyter server list

Find what is using port 8888

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

If localhost:8888 will not open

The page asks for a token or password
Jupyter protects the server with a token. Open the exact link that Jupyter prints in the terminal, which includes the token. You can set a password once with jupyter server password, which writes the hash to jupyter_server_config.json. That file takes precedence over a password written in jupyter_server_config.py.
Change the port or the address
Jupyter Server’s docs show jupyter server --port=8888 --no-browser --ip=0.0.0.0 for a server others can reach. By default it runs at 127.0.0.1:8888 and only your computer can use it. Use a password and HTTPS if you open it up, and keep it single-user.
The page opens but kernels never connect
Jupyter needs WebSockets and localhost connections on high ports (49152 to 65535) for its kernels. A firewall, a proxy that blocks WebSockets, or a strict Content-Security-Policy can break that.
Docker: kernels crash
Jupyter Server’s docs say to run it under an init process such as tini when it is the container’s main command.
Jupyter asks for a token or password
Copy the full URL with ?token= from the terminal, or run jupyter server list.
MAMP page will not load
Start the servers in MAMP first. In MAMP preferences you can set Apache to port 80 and MySQL to 3306.
jupyter: command not found
Install it with pip install jupyterlab and activate the right Python environment.

Other ports like 8888

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:9000PHP-FPM, SonarQube

Questions about localhost:8888

What is localhost:8888?
The default port of Jupyter Notebook and JupyterLab, and of Apache in older MAMP versions.
Why does Jupyter ask for a token?
Jupyter protects access with a token. Copy the full URL from the terminal, or run jupyter server list.
Is localhost:8888 safe?
Yes, as long as it stays on localhost. Only your own computer can reach localhost:8888. 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.

Updated 2026-10-20

Free tools that help

Related pages