Why Can't I Connect to my (Droplet's) Server? It's Working

I have a Next.js server. It’s up and running, and I know because when I do wget myserveripaddress:30002 from the server itself, I get a (valid) index.html file.

However, when I do the exact same thing from my own machine (or use my browser), the request times out. It’s like there’s a firewall that I never setup blocking things.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Accepted Answer

It turns out there is a firewall installed by default. I was able to open it up (thanks to a little help from Digital Ocean support) with the command:

sudo ufw allow 3002
Site Moderator
Site Moderator badge
May 8, 2023

Hello @tinyazuredolphin

You can check the address is resolving, e.g the domain name is reachable. There might be a DNS conflict or some DNS cache that can prevent you to load the resource from your local machine.

You’ve correctly checked that the next.js server is running and also that the wget command will return successful result, but this happens only on the server. You can test this from another machine as well or using different network.


Site Moderator
Site Moderator badge
May 7, 2023

Hi @tinyazuredolphin,

Are you using a domain? If it is, see if your domain is pinging from your Droplet:

  1. ping

Additionally, enter your Droplet via SSH and see in your logs if anything is being blocked.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel