Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to host a small node application on a digital ocean droplet running ubuntu 14.04. In local development the site works fine over https, however on the server the site doesn't get displayed and the server does not throw an error, the connection is just refused. I ran nmap localhost and port 443 was closed. How can I open it?

share|improve this question
Is your web server configured for HTTPS? – kraxor Jul 20 '14 at 8:56
Sometimes sudo ufw allow out 443/tcp is necessary to allow outgoing connections from installed apps. – Kzqai Mar 23 '15 at 23:40
sudo ufw allow 443/tcp

And have a read through the docs on Ubuntu UFW interface on iptables. This should open it for your web application.

Also make sure that your application is serving off the external IP as well as the internal. The app.js file there is usually a setting to specify a interface for it to run on. should run it on both internal and external.

share|improve this answer
When I run sudo ufw status verbose it says inactive. Should I sudo ufw enable? Because it's inactive it isn't the thing that's closing the port then right? – Wilfred Jul 20 '14 at 14:38

I know this is late, but I just ran into this problem too, and using sudo ufw allow 443/tcp must be opening the port and using it, because after this, when you try to run the server, it gives you an error that the port is already in use

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.