localhost:8888: Jupyter Tokens and MAMP
Jupyter Notebook and JupyterLab open on localhost:8888 by default and ask for a token the first time. That token is printed in the terminal that started Jupyter, inside a URL ending ?token=. MAMP on Mac also uses 8888 for Apache, so the two clash when both run.
| Program | Sign of it | Change the port |
|---|---|---|
| Jupyter Notebook / JupyterLab | Token or password page | jupyter lab --port 8889 |
| MAMP Apache | MAMP start page or your htdocs | MAMP Preferences > Ports |
Updated
When 8888 is busy, Jupyter moves to 8889 and up, so the bookmark you saved may point to a dead or different server. The URL in the terminal output is always the reliable one.
Jupyter commands for port 8888
List servers, change port, tunnel
The tunnel line runs on your laptop, not on the server.
jupyter server list
jupyter lab --port 8889 --no-browser
ssh -L 8888:localhost:8888 you@server
Running Jupyter remotely
Forward the port over SSH and keep Jupyter bound to localhost on the server. That way the token is never exposed to the internet, and your browser still opens localhost:8888 as usual.
Notebooks are for data work; a public website for your business is easier to make with We.Inc than to serve from MAMP.
How it works
- Start jupyter lab or jupyter notebook from your project folder.
- Copy the full URL with the token from the terminal output.
- If you lost the terminal, run jupyter server list to print it again.
- Set a password once if you prefer not to paste tokens.
Tips
- jupyter server list shows every running server with its port and token, which solves most 'which tab is which' confusion.
- In Docker, start Jupyter with --ip=0.0.0.0 and publish 8888, or the host cannot reach it.
- On a remote machine, an SSH tunnel such as ssh -L 8888:localhost:8888 user@host is safer than opening the port.
- MAMP lets you switch Apache to port 80 from its port settings, which frees 8888 for Jupyter.
Frequently asked questions
Where do I find the Jupyter token for localhost:8888?
In the terminal that launched Jupyter, or by running jupyter server list. Older Notebook versions use jupyter notebook list.
Why does localhost:8888 refuse to connect?
Jupyter is not running, crashed, or started on 8889 because 8888 was busy. Check the terminal and use the address it printed.
How do I set a Jupyter password instead of a token?
Run jupyter server password (on the classic Notebook 6, jupyter notebook password) and enter one. Next time the login page accepts that password.
Why does MAMP use 8888?
MAMP avoids port 80 so it does not need admin rights. Its Apache defaults to 8888 and MySQL to 8889.
Related: localhost:8501 (Streamlit), localhost:8080, localhost:80, localhost refused to connect.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
More in Guides
- localhost:9000: Which Program Is It?
- localhost:9090: Prometheus or Cockpit
- localhost Refused to Connect: Find the Cause in Minutes
- Location Pages SEO: Real Pages for Real Places
- Logo Size for a Website: Every Size You Need
- How to Make a Website with HTML and CSS
- Markdown Cheat Sheet
- Microsoft Teams Webhook: How to Post Messages in 2026
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App