localhost:8080 (Tomcat, Jenkins, Spring Boot): not working and fixes
Port 8080 is the alternate web port for Tomcat, Jenkins, Spring Boot and Docker. How to open it, and fix refused to connect and port conflicts.
Open this address: http://localhost:8080This opens on your own computer. It only works if the program is running.
localhost:8080 is the usual alternative web port. Tomcat, Jenkins, Spring Boot and many Docker containers use it, so conflicts are common.
What runs on localhost:8080
- Spring Boot and Tomcat (default 8080)
- Jenkins
- A second Apache or nginx site when port 80 is taken
- Docker containers started with
-p 8080:80
Commands to start and test port 8080
docker run -p 8080:80 nginx./mvnw spring-boot:runserver.port=8081Find what is using port 8080
Run these in a terminal on your computer. Nothing is sent to this site.
If localhost:8080 will not open
- Web server failed to start. Port 8080 was already in use
- Another program has 8080. Stop it using the tool below, or set
server.port=8081. - Docker: bind: address already in use
- Change the left number:
-p 8081:80opens http://localhost:8081. - localhost:8080:80 does not open
- That is not an address.
8080:80comes from Docker’s-p 8080:80, which means port 8080 on your computer goes to port 80 inside the container. In the browser type only http://localhost:8080. - Jenkins asks for an unlock password
- Read it from the file path Jenkins prints in its log, usually initialAdminPassword.
- 8080 is also a common proxy port
- Many tools use 8080 for an HTTP proxy, such as corporate proxies and debugging tools. If you did not start a web app, check whether your proxy settings point to localhost:8080. See the refused to connect checklist.
- Permission denied or bind failed on Windows with nothing using the port
- Windows can reserve port ranges. Run
netsh int ipv4 show excludedportrange protocol=tcpin an administrator prompt. If 8080 is in an excluded range, pick another port. - Tomcat shows HTTP Status 404
- Tomcat is running but your app is not deployed at that path. Open
http://localhost:8080/yourappusing the name of the deployed war or folder. - Spring Boot: change the port
- Add
server.port=8081to application.properties, or start with--server.port=8081. - Jenkins does not open after install
- Give it a minute to finish starting, then check the service log. The first screen asks for the unlock password printed in the log.
Other ports like 8080
| Port | Usually used by |
|---|---|
| localhost:3000 | React, Next.js, Express |
| localhost:5173 | Vite dev server |
| localhost:4200 | Angular dev server |
| localhost:5000 | Flask |
| localhost:8000 | Django, PHP, Python |
| localhost:8888 | Jupyter Notebook |
| localhost:9000 | PHP-FPM, SonarQube |
Questions about localhost:8080
- What is localhost:8080?
- An alternative web port used by Tomcat, Jenkins, Spring Boot and Docker containers, and by a second web server when port 80 is taken.
- How do I change the port from 8080?
- In Spring Boot set server.port=8081. In Docker change the left number in -p 8081:80.
- What does 8080:80 mean?
- It is a Docker port mapping: host port 8080 to container port 80. You open localhost:8080.