Skip to content

Instantly share code, notes, and snippets.

View SamuelWhittle's full-sized avatar

Samuel Whittle SamuelWhittle

View GitHub Profile
@xprilion
xprilion / Python Websockets SSL with Let's Encrypt
Last active April 19, 2024 12:11
Python Websockets SSL with Lets Encrypt
## Python Websockets SSL with Lets Encrypt
This code uses the `python-websockets` library.
You'll need to generate the certificate and keyfile using Let's Encrypt.
After generating the files correctly, you need to make them accessible to the current user who runs the script, my way of doing this was to copy it to the home directory of the current user and change the owner to the current user, set the permissions of the files to 400.
To know more about this process, read the blog here - https://xprilion.com/python-websockets-ssl-with-lets-encrypt/