Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Patrick van Kemenade 101 posts 339 karma points
    Dec 27, 2023 @ 10:49
    Patrick van Kemenade
    0

    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();

  • Patrick van Kemenade 101 posts 339 karma points
    Dec 27, 2023 @ 17:05
    Patrick van Kemenade
    0

    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.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Dec 27, 2023 @ 22:50
    Huw Reddick
    0

    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/

  • Patrick van Kemenade 101 posts 339 karma points
    Dec 27, 2023 @ 23:14
    Patrick van Kemenade
    0

    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.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Dec 28, 2023 @ 07:18
    Huw Reddick
    1

    Yes, that's correct

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Dec 28, 2023 @ 08:23
    Huw Reddick
    100
Please Sign in or register to post replies

Write your reply to:

Draft