localhost:8443: HTTPS on a Local Port
Port 8443 is the stand-in for HTTPS port 443 when a program runs without admin rights. Tomcat's SSL connector, Spring Boot apps with a keystore and the UniFi Network controller all use it. Expect a privacy warning, because local servers use self-signed certificates, and always type https, not http.
| Program | Address | Note |
|---|---|---|
| Tomcat SSL connector | https://localhost:8443 | Defined in conf/server.xml |
| Spring Boot with server.ssl | https://localhost:8443 | Set server.port=8443 |
| UniFi Network application | https://localhost:8443 | Self-signed certificate by default |
| Kubernetes dashboard port-forward | https://localhost:8443 | Common choice in docs examples |
Updated
Most trouble with 8443 is about the protocol, not the port. An HTTPS server reached over plain http returns a garbled or reset response, and a self-signed certificate produces a full-page browser warning that looks scarier than it is on your own machine.
Trusted local certificate for 8443
Create a certificate and a Java keystore
The openssl step converts the files into a PKCS12 keystore that Tomcat and Spring Boot accept.
mkcert -install
mkcert localhost 127.0.0.1
openssl pkcs12 -export -in localhost+1.pem -inkey localhost+1-key.pem \
-out keystore.p12 -name tomcat
Getting rid of the warning properly
Clicking through the warning each time works, but a trusted local certificate is better, especially for service workers and secure cookies that refuse untrusted origins. mkcert localhost creates a key and certificate pair any local server can load.
Certificates on published sites are a separate matter, and every site We.Inc hosts receives one automatically.
How it works
- Type the full https://localhost:8443 address.
- Accept the warning only for a server you started yourself.
- If the page resets, check that the server really has SSL enabled.
- For a clean padlock, create a locally trusted certificate with mkcert.
Tips
- Tomcat ships the 8443 connector commented out in server.xml. Uncomment it and point it at a keystore before expecting anything there.
- The UniFi controller also uses 8080 for device communication, so blocking 8080 breaks adoption even when 8443 loads.
- Chrome remembers HSTS for localhost if any local app ever sent the header, which can force https on other ports too.
- mkcert installs a local certificate authority, so certificates it creates are trusted only on your machine.
Frequently asked questions
What is port 8443 used for?
It is a conventional alternative HTTPS port. Tomcat, Spring Boot with SSL and network appliances such as the UniFi controller use it so they do not need the privileged port 443.
Why does localhost:8443 say my connection is not private?
The server presents a self-signed certificate the browser does not trust. On your own machine you can proceed, or trust a certificate made with mkcert.
Why does http://localhost:8443 fail?
The server expects a TLS handshake. Plain http sends text it cannot read, so you get a reset or a 400 error saying a plain request was sent to an HTTPS port.
How do I enable 8443 in Spring Boot?
Set server.port=8443 and the server.ssl keystore properties in application.properties, pointing at a PKCS12 keystore you created with keytool or mkcert.
Related: Your connection is not private, localhost:8080, SSL certificate types, localhost:80.
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:8501: Running a Streamlit App
- localhost:8834: Opening the Nessus Interface
- localhost:8888: Jupyter Tokens and MAMP
- 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
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