I managed to get a letsencrypt signed certificate to enable SSL for my domain on the host properly. Now I do not understand how to bind it to my application running on ubuntu:
I used the following to set-up the private key:
webBuilder.UseKestrel((hostingContext, options) =>
{
options.ListenAnyIP(443, loptions => loptions.UseHttps("/etc/letsencrypt/live/mydomain.com/privkey.pem"));
});
The server mode SSL must use a certificate with the associated private key
It is not clear to me how to bind the public and private keys and use it remotely without the use of apache or nginx.