Running Umbraco 13 on Raspberry PI (arm64) switch from http to https
Hello,
After some struggle (I'm new to Linux) I've got to publish a small Umbraco 13 site on my raspberry PI.
And if I run it (dotnetnet mywebsite.dll) and on a browser goto http://localhost:5000 it is working correctly.
However I set useHttps to true. And on my Windows PC where I developed it when I run it is runs with https://localhost:{port} but doing similar on my PI gets me a non http website.
When changing http to https I get an error ERRSSLPROTOCOL_ERROR that protocoll is not supported. Note I've setup a self signed certificate using SSLEncrypt.
What do I need to change, according to some sources I have to explicitly write code to listen to port 5001 and enable SSL but since it is already working on my Windows PC with SSL I not sure if this is needed.
Let's answer my own question. Seems there is different behaviour when running in VSCode/IISExpress versus on a Linux machine.
So extra code in program.cs to enable Kestrel en specify port and protocoll and link to pfx is needed when running on Linux in this case a Raspberry Pi.
Very interesting Huw, I wanted to use my Pi as a test server only because I didn't want any PC of mine which resides after a router be directly exposed to the internet.
I now have a self signed certificate which works but gives a not safe warning which is ok for a test site.
But if I understand correctly this way I could expose it to the outside world behind cloud flare DNS + tunnel with minimal risks without exposing as maybe the IP of my router.
Running Umbraco 13 on Raspberry PI (arm64) switch from http to https
Hello,
After some struggle (I'm new to Linux) I've got to publish a small Umbraco 13 site on my raspberry PI.
And if I run it (dotnetnet mywebsite.dll) and on a browser goto http://localhost:5000 it is working correctly.
However I set useHttps to true. And on my Windows PC where I developed it when I run it is runs with https://localhost:{port} but doing similar on my PI gets me a non http website.
When changing http to https I get an error ERRSSLPROTOCOL_ERROR that protocoll is not supported. Note I've setup a self signed certificate using SSLEncrypt.
What do I need to change, according to some sources I have to explicitly write code to listen to port 5001 and enable SSL but since it is already working on my Windows PC with SSL I not sure if this is needed.
Note my Program.cs is just the default:
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.CreateUmbracoBuilder() .AddBackOffice() .AddWebsite() .AddDeliveryApi() .AddComposers() .Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseUmbraco() .WithMiddleware(u => { u.UseBackOffice(); u.UseWebsite(); }) .WithEndpoints(u => { u.UseInstallerEndpoints(); u.UseBackOfficeEndpoints(); u.UseWebsiteEndpoints(); });
await app.RunAsync();
Let's answer my own question. Seems there is different behaviour when running in VSCode/IISExpress versus on a Linux machine.
So extra code in program.cs to enable Kestrel en specify port and protocoll and link to pfx is needed when running on Linux in this case a Raspberry Pi.
I would recommend using a cloudfare tunnel to your pi.
This is running on a pi
https://umbtest.themediawizards.co.uk the cloudfare tunnel takes care of the SSL
Checkout Sebastian's blog post (also running on a pi)
https://cultiv.nl/
Very interesting Huw, I wanted to use my Pi as a test server only because I didn't want any PC of mine which resides after a router be directly exposed to the internet.
I now have a self signed certificate which works but gives a not safe warning which is ok for a test site.
But if I understand correctly this way I could expose it to the outside world behind cloud flare DNS + tunnel with minimal risks without exposing as maybe the IP of my router.
Yes, that's correct
This may help to explain why, seems it changed after .net6
https://www.mikesdotnetting.com/article/366/why-doesnt-my-asp-net-core-7-web-app-launch-on-https
is working on a reply...