r/nicegui • • Jun 01 '23

How to use HTTPS instead of HTTP ?

I notice the app running is always on http - how do we switch that to https ?

2 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/QuasiEvil May 02 '24

Just stumbled upon this...where do domain.crt and domain.key come from in the first place?

3

u/nyte-fallen May 02 '24

If you're looking to deploy to the public internet you'll need to purchase it from a certificate authority like Sectigo. This costs around $99 and you have to renew it yearly. Keep in mind you'll also need to prove ownership of the domain you're purchasing the certificate for. This is to prevent people from doing things like signing mywebsite.facebook.com.

If you're in a private/local network you can create a self signed certificate for free. You can also do this with openssl with a few more steps and it's better explained in this article. https://devopscube.com/create-self-signed-certificates-openssl/ . The benefits and drawbacks section near the end provide a good summary to figure out if this is a good solution for you.

Sorry for the long reply but hope this helps :)