emqx icon indicating copy to clipboard operation
emqx copied to clipboard

How do I set up the WSS protocol? Access using HTTPS website?

Open bbhxwl opened this issue 3 years ago • 3 comments

What would you like to be added or enhanced?

How do I set up the WSS protocol? Access using HTTPS website?

Why is this needed?

image

bbhxwl avatar Jun 10 '22 05:06 bbhxwl

@bbhxwl this worked for me.

Use certbot to generate SSL certificates ([https://certbot.eff.org/]) sudo certbot certonly --standalone -d example.com

It generates the below files at /etc/letsencrypt/live/$domain cert.pem fullchain.pem chain.pem privkey.pem

Copy the certificates from /etc/letsencrypt/live/$domain to /etc/emqx/certs

Edit the following lines of emqx.conf :

listener.wss.external.keyfile = /etc/emqx/certs/privkey.pem
listener.wss.external.certfile = /etc/emqx/certs/fullchain.pem
listener.wss.external.cacertfile = /etc/emqx/certs/chain.pem

melgo-tb avatar Jul 14 '22 05:07 melgo-tb

@melgo-tb thank you for the solution. @bbhxwl could you check if the suggested configurations work for you?

zmstone avatar Aug 09 '22 11:08 zmstone

@melgo-tb thank you for the solution. @bbhxwl could you check if the suggested configurations work for you?

I don't know the recommended configuration. I use the emqx deployed by docker, and then use the nginx reverse proxy to set the WSS

bbhxwl avatar Aug 09 '22 11:08 bbhxwl