I host a server on my own internet that talks to the website that hostinger.com hosts.
I downloaded certbot on my raspberry pi (which hosts the node.js server) and generated the key cert etc with manual mode. Now that i rewrote my http server to https and try to connect to my website it throws the following error:
WebSocket connection to ‘wss://ipadress:6060/’ failed: Error in connection establishment: net::ERR_CERT_COMMON_NAME_INVALID
The server worked fine over http before, wanted to upgrade to https because some peoples browsers complained about http.
Any ideas what the issue is?
The certbot generated the cert/key for www.wptguild.com & wptguild.com (which are the site that hostinger.com hosts for me). Should those keys been generated for my server IP instead? Im new to this…
The command i ran on my raspberry was: certbot certonly --manual
So i should redo the certbot commands but with my server ip address this time?
To clarify:
Server: Hosted by me on my IP
Client: Hosted by hostinger.com
Cert/Key was generated for my website that hostinger hosts.
And no, port 6060 is open
How can i make it so that my server (i host it with my internet) can talk to my website hosted by hostinger.com (which uses lets encrypt)? I need key cert etc right?
Ah okay i think im getting the hang of this, if i want to talk with a client using lets encrypt i need to issue my own lets encrypt cert for MY server?
If a client connects a server via https, the server needs a certificate.
But you can’t create Letsencrypt certificates with ip addresses. So the server must have a domain name, so you can create a certificate with that domain name.
So your home server must have a domain name if your website (acts as client) connects your home server via https / wss.
this means you need to add an A or CNAME record on a subdomain, pointing to your home IP, and get the certificate for that subdomain. and then you can use wss://subdomain.example.com:1234 as you wish
So i can use the same domain that my client use but simply add a subdomain that points to MY ip instead? for instance server.mysite.com? Also in the DNS change - do i include the port aswell or just IP?
alright i setup server.wptguild.com and using some websites that check DNS it points to my IP, however, my node.js server is listening to 6060 and it wont connect when i run my client which is listening on ws://server.wptguild.com:6060