How to open port in Nodejs Ubuntu Server for SSL?

I am making chatbot. Need 2 ssl port. Default 443 is occupied for some secure background processes of server. Need to assign another 444 port to ssl for client interaction portal. How to open this port and assign to web services?

I am using latest ubuntu server and nodejs services. any help?

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I tried it …some how its not working…i will have to figure out …something to do with iptables…


Since you’re using Ubuntu, you have two main firewall options that are bundled in with the OS – one is ufw and the other is iptables (ufw is the easier of the two when it comes to usage).

You can check the status of ufw by running ufw status. If it shows as disabled, then there’s no active firewall running and you should be able to use any port that you choose.

If ufw is active, then you can open a new port using ufw allow port/protocol where port is the port that you’re wanting to open and protocol is the protocol you want to allow access over.

When it comes to protocol, you have two options, udp and tcptcp is the most common one that you’ll use, so if you wanted to open up port 444 (for example), you could run:

ufw allow 444/tcp

If ufw is disabled, I’d recommend setting it up. First thing I recommend is running ufw disable just to make sure it’s really disabled. Afterwards, we’ll reset the rules.

ufw reset

Now we have a clean slate. What I recommend now is setting up a deny all, except those we allow type policy.

Deny ALL Incoming Requests

ufw default deny incoming

Allow ALL Outgoing Requests

ufw default deny incoming

Allow Specific Ports

We need SSH (Port 22), HTTP (Port 80), and HTTPS/SSL (Port 443), so we’ll start with those:

ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp

Now, if you want to open port 444, we’ll add that too:

ufw allow 444/tcp

Enable ufw

ufw enable

It’ll ask you to confirm, hit y and then enter. You’re firewall is now all setup :-).