Port reference
Port 8888 (TCP) – HTTP Alternate / Jupyter Notebook
Alternate HTTP — default port for Jupyter Notebook/Lab, an interactive code-execution environment. No single fixed service.
Quick facts
- Transport
- tcp
- Category
- Registered
- Risk level
- High
Frequently targeted — restrict exposure and harden it.
Default state
Open when Jupyter or another app server is running. Often plain HTTP and bound to all interfaces by mistake.
What is port 8888 used for?
Port 8888 is a common alternate HTTP port and the default for Jupyter Notebook and JupyterLab, the popular interactive coding environments. There is no single fixed service — it also shows up for other dev tools and local web apps — but Jupyter is by far the most notable. A Jupyter server runs arbitrary code (Python, shell, and more) on the host and is normally reached at http://host:8888/.
When would you open it?
You usually keep 8888 on localhost for your own use. Open or forward it only when you need to reach a Jupyter server or app from another machine, and even then most people tunnel it over SSH or a VPN rather than exposing it directly.
Is it safe to open?
Jupyter executes code by design, so an exposed server with a weak or missing token effectively gives anyone a shell; require a strong token or password and keep it off the internet. See the security notes below.
How to check if this port is open
ss -tulpn | grep :8888
nmap -p 8888 <target>netstat -ano | findstr :8888
Test-NetConnection <host> -Port 8888lsof -i :8888
nmap -p 8888 <target>How to open this port on your router
To reach this service from outside your network, forward the port on your router:
- Open your router's admin page (usually http://192.168.1.1 or http://192.168.0.1) and sign in.
- Find the "Port Forwarding" section — it may be called NAT, Virtual Server, or Applications & Gaming.
- Add a rule forwarding external port 8888 to your device's local IP, internal port 8888, protocol TCP.
- Save and reboot the router if prompted, then test the port from outside your network.
Only forward ports you understand — it exposes that device to the public internet. For remote admin access, a VPN is safer than forwarding the port.
Allow this port through the firewall
sudo ufw allow 8888/tcpsudo firewall-cmd --permanent --add-port=8888/tcp
sudo firewall-cmd --reloadsudo iptables -A INPUT -p tcp --dport 8888 -j ACCEPTNew-NetFirewallRule -DisplayName "Allow 8888" -Direction Inbound -Protocol TCP -LocalPort 8888 -Action AllowSecurity & risks
Common attacks
- Unauthenticated or token-less Jupyter Notebook leading to remote code execution
- Token/password brute force against the Jupyter login
- Cleartext interception of tokens and session cookies
- Pivoting and crypto-mining via an exposed notebook kernel
Hardening
- Never expose Jupyter on 8888 to the internet; bind to 127.0.0.1 and tunnel via SSH/VPN
- Require a strong token or hashed password and serve over HTTPS
- Run notebooks as an unprivileged user in a sandboxed container
- Restrict by IP allowlist and front with an authenticated reverse proxy
- Keep Jupyter and dependencies patched and disable terminals if unused
How to block this port
sudo ufw deny 8888/tcpsudo firewall-cmd --permanent --remove-port=8888/tcp
sudo firewall-cmd --reloadsudo iptables -A INPUT -p tcp --dport 8888 -j DROPNew-NetFirewallRule -DisplayName "Block 8888" -Direction Inbound -Protocol TCP -LocalPort 8888 -Action Blocknmap snippet
nmap -p8888 --script http-title,http-headers,http-auth <target>Replace <target> with the host or range you're authorized to scan.
Related ports
Frequently asked questions
- What is port 8888 used for?
- It is the default port for Jupyter Notebook and JupyterLab, and a common alternate HTTP port. Since it can run anything, fingerprint the listener; if it is Jupyter, it provides an interactive Python shell on the host.
- Why is an exposed Jupyter on 8888 so dangerous?
- Jupyter executes arbitrary code by design. An instance with authentication disabled or a weak token gives any visitor remote code execution as the running user. Bind it to localhost, require a token, and access it over SSH or VPN.