Server not running globally

Posted August 20, 2017 3.2k views
Node.jsUbuntu 16.04

I am trying to create a node.js application, whenever I am running it in my droplet system, using “node server.js” command, it is only working in the local machine, i.e’, visible when I use “curl http://localhost:5000” command, but is not available globally, like in my browser whenever I go and search for “” or “”, it returns a page with message “THIS SITE CAN’T BE REACHED”

//my very simple node app

var http = require(‘http’);

var server = http.createServer(function(req, res){
res.end(’<b>Hello Manna!</b>’);

console.log(“server running”);

The error message that I receive in the browser
**This site can’t be reached took too long to respond.
Checking the connection
Checking the proxy and the firewall

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.

Submit an Answer
1 answer


It is probably a firewall issue, if you need security on your droplet then you must allow incoming connections to port 5000 on your droplet you can easily achieve this with this command:

sudo ufw allow 5000

If you do not need security you can just disable firewall with this command:

sudo ufw disable

Hope this helps.