Alternative HTTP Port for Web Servers
π Open localhost:8080Access your web server or application running on port 8080
Port 8080 is the unprivileged HTTP port most projects pick when port 80 is taken. On Linux and macOS, binding to ports below 1024 needs root (or the CAP_NET_BIND_SERVICE capability on Linux); 8080 is one of the “alternate HTTP” numbers in IANA’s port registry (registered as http-alt) and stays out of root territory. That’s the main reason it caught on.
localhost resolves to 127.0.0.1 on IPv4 or ::1 on IPv6, both pointing at the machine you’re on. So localhost:8080 means “whatever process is listening on TCP port 8080 of this machine.” Apache Tomcat picked 8080 as a default decades ago, Jenkins inherited it, and the broader Java ecosystem locked it in. Plenty of non-Java tools default to 8080 today too - code-server, LocalAI, and Open WebUI are common modern examples.
If you can not reach localhost:8080 from other devices, it is probably because you are on a different network. Use Pinggy tunnel to easily access it from anywhere:
This command creates a secure tunnel that forwards traffic from a public URL to your local web server on port 8080, allowing you to:
The tunnel provides a public URL that you can share, making your localhost:8080 web server accessible from any device with internet access.
Port 8080 is not tied to a single service by default, so many different applications use it based on their configuration. Here are the main categories:
127.0.0.1:8080compose examples3000:8080)The Java tools above are what made 8080 famous; the AI/dev tools are why you’ll see it on a fresh machine in 2026. If you’re running more than one of them at once, you’re going to collide. Skip to the troubleshooting section for the conflict-resolution dance.
If you can’t access localhost:8080, here’s how to diagnose and fix common web server issues:
Action: Confirm that your web server or application is active on port 8080.
How to check:
mvn spring-boot:run or java -jar app.jarAction: find out what else is on 8080 and either stop it or move your app.
How to fix:
lsof -iTCP:8080 -sTCP:LISTEN on Linux/macOS, or netstat -ano | findstr :8080 on Windows. ss -lptn 'sport = :8080' works on modern Linux without lsof.kill <PID> (sends SIGTERM). Only fall back to kill -9 <PID> if the process refuses to exit, since SIGKILL skips cleanup.Action: verify the service actually thinks it's on 8080. Most "it should be running" issues are a config drift somewhere.
Where to look:
Connector port="8080" attribute in conf/server.xmlserver.port in application.properties/application.yml, or SERVER_PORT env var (which overrides the file)--httpPort=8080 on the war launcher, or JENKINS_PORT in /etc/default/jenkins / the systemd unit--bind-addr flag or the bind-addr line in ~/.config/code-server/config.yamlAction: Verify that the web server is accessible.
How to test:
http://localhost:8080curl http://localhost:8080http://192.168.1.100:8080Here are typical issues with localhost:8080 and how to resolve them:
Problem: Another application is occupying port 8080.
Solution: Find the conflicting process with sudo lsof -i :8080, stop it with sudo kill -9 <PID>, or configure your application to use port 8081.
Problem: Tomcat, Jenkins, or other service fails to start on port 8080.
Solution: Check service logs for errors, verify configuration files, ensure proper permissions, and check if dependencies are installed.
Problem: Can't access Jenkins setup wizard or find initial password.
Solution: Navigate to localhost:8080, find initial password in /var/lib/jenkins/secrets/initialAdminPassword, and follow the setup wizard.
Problem: localhost:8080 only works on the local machine.
Solution: Configure application to bind to 0.0.0.0:8080, allow port 8080 through firewall with sudo ufw allow 8080, and use IP address instead of localhost.
Problem: Can't access application running in Docker container on port 8080.
Solution: Ensure proper port mapping with docker run -p 8080:8080 myapp and check container logs with docker logs container-name.
127.0.0.1 / ::1). Registered with IANA as http-alt, the unprivileged alternative to port 80.lsof -iTCP:8080 -sTCP:LISTEN (or ss -lptn 'sport = :8080') to see who actually has the port.server.port, Jenkins’s --httpPort, code-server’s --bind-addr, LocalAI’s --port all take it.# Tomcat (systemd)
sudo systemctl start tomcat
# Spring Boot
mvn spring-boot:run
# code-server (VS Code in browser)
code-server --bind-addr 0.0.0.0:8080
# LocalAI (default port)
docker run -p 8080:8080 localai/localai:latest
# Quick static file server
python3 -m http.server 8080Use these commands to quickly get started with services on localhost:8080
A small operational note to close on: if multiple services on your machine all want 8080, the conventional escape ladder is 8081 β 8082 β 8083 and so on. If you’re running Tomcat and Jenkins together, expect at least one of them to move. Spring Boot’s server.port property and Jenkins’s --httpPort flag (or JENKINS_PORT env var on systemd) are the two settings you’ll touch most often. For LocalAI and Open WebUI, both honor an explicit --port / PORT env var; setting one to 8081 sidesteps the whole problem.