localhost:8081: What Listens There and How to Fix It
In most projects, localhost:8081 is React Native's Metro bundler, which Expo also uses by default. Nexus Repository Manager and second Spring or Tomcat apps use it too. Visiting it in a browser shows 'packager-status:running' for Metro; errors in the app usually mean the phone or emulator cannot reach that port.
| Program | Start command | Use another port |
|---|---|---|
| React Native Metro | npx react-native start | --port 8082 |
| Expo dev server | npx expo start | --port 8082 |
| Sonatype Nexus | Service or bin/nexus run | application-port in nexus-default.properties |
| Spring Boot (second app) | server.port=8081 | Any free port |
Updated
Most searches for 8081 come from React Native developers whose app shows a red screen about loading the JavaScript bundle. The bundler runs on your computer at 8081; the app on the device has to reach it, and that link is what usually breaks.
Connect the device to Metro
Start Metro and forward the port
adb reverse must be run again after the device reconnects.
npx react-native start
adb reverse tcp:8081 tcp:8081
curl http://localhost:8081/status
Device and emulator connections
iOS simulators share your Mac's network, so localhost:8081 works directly. Android emulators and USB phones do not, which is why adb reverse exists. Over Wi-Fi, open the developer menu and set the bundler address to your computer's local IP and port.
A mobile app is a different project from a website; for the website side, We.Inc can build and publish it without any bundler running.
How it works
- Start Metro and open http://localhost:8081/status in a browser.
- On an Android emulator or USB device, forward the port with adb reverse.
- On a physical device over Wi-Fi, make sure phone and computer share the network.
- Reload the app once the bundler answers.
Tips
- The Android emulator sees your computer as 10.0.2.2, not localhost, unless you run adb reverse tcp:8081 tcp:8081.
- McAfee and some other security suites have used 8081 for their own agents, which stops Metro from starting.
- If you change Metro's port, the native app must know it too; pass the same --port to run-android or run-ios.
- Clearing Metro's cache with --reset-cache fixes stale bundle errors, but it does not fix connection problems.
Frequently asked questions
What is localhost:8081 in React Native?
It is the Metro bundler, which serves your JavaScript to the app during development. Opening /status there should return packager-status:running.
How do I fix 'Unable to load script' on Android?
Make sure Metro is running, then run adb reverse tcp:8081 tcp:8081 so the device can reach your computer's port. Rebuild the app if you changed the port.
Port 8081 is already in use. What now?
Find the process with lsof -i :8081 or netstat -ano | findstr :8081. Often it is an older Metro instance; close it, or start Metro with --port 8082.
Is 8081 used by Nexus Repository?
Yes, Sonatype Nexus serves its web interface on 8081 by default. If you run Nexus and React Native on one machine, move one of them.
Related: localhost:8080, React vs React Native, localhost refused to connect, localhost:3001.
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:8088: Superset, YARN or Splunk
- localhost:8090: Confluence and Other Port 8090 Servers
- localhost:8096: Opening Jellyfin's Web Interface
- localhost:8443: HTTPS on a Local Port
- localhost:8501: Running a Streamlit App
- localhost:8834: Opening the Nessus Interface
- localhost:8888: Jupyter Tokens and MAMP
- localhost:9000: Which Program Is It?
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