How can I setup my Node.js server to serve only TLSv1.2 on a custom port??


I'm currently trying to integrate my website with an external payment processor that requires the connection to use TLSv1.2 only. I'm using a non-standard port for this connection, and they mentioned that there were two possible causes for the TLS error:

I'm using a non-default port (port: 1339) for my server.
They sent me a screenshot of my cert and said that the certificate I'm using is not issued for the port number 1339, which according to them could be another reason for TLS failure.

1 Reply

Hey there -

You can use non-standard ports for TLS. Upon doing some research about this to see if there as anything specific you needed to do, I came across some information that might help you out.

Here's a how-to from Superuser:

Can I use Another Port Other than 443 for SSL Communication?

Here's another that gives some further tips:

Error When Setting up SSL on Alternate Port

You basically want to make sure that the port is configured as 1339 everywhere it needs to be, like in your Apache VirtualHosts or Nginx server blocks.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct