My Node.js app runs fine on my droplet (Ubuntu 22.04). curl localhost:3000
gives the expected output, but I can’t access it from outside via the public IP.
UFW is open on port 3000
App’s listening on 0.0.0.0:3000
No reverse proxy or SSL yet — just raw testing
I thought wearing a kilt might grant me dev magic. Turns out, I might just need proper networking advice.
Thanks in advance!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
If
curl localhost:3000
works but hitting it from outside doesn’t, and UFW is open on port 3000, there are a couple things to double-check:First, make sure your app is actually listening on
0.0.0.0
and not justlocalhost
. Sounds like you’ve done that, but it’s worth verifying with:Next, check if your cloud firewall (from the DigitalOcean control panel) is blocking port 3000. Even if UFW is open, the cloud firewall takes priority, you’ll need to explicitly allow TCP traffic on port 3000 there.
Once that’s done, try again via your public IP and port 3000. If it still doesn’t work, try temporarily disabling UFW just to rule it out:
If it works with UFW off, then something’s off in the UFW config.
Once you’ve got it working, you can throw Nginx in front later, but for now, that should get you going.
Let me know how it goes!
- Bobby