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

Linode Staff


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:

  1. I'm using a non-default port (port: 1339) for my server.
  2. 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.

Can I please get some help with this?

1 Reply

Hey there,

Typically TLS doesn't matter what port it is being served over, as port 443 is used by default but more so out of convenience. That way web browsers know where to look without having to specify which port every time. It may be that however they are validating your TLS connection is only looking at port 443, which could explain the issue.

One thing you could try is setting up NGINX as a reverse proxy, so that Stripe can reach out on port 443, and you can even terminate the TLS connection there, which would hopefully resolve the issue.


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