natemcmaster / LettuceEncrypt

Free, automatic HTTPS certificate generation for ASP.NET Core web apps
https://nuget.org/packages/LettuceEncrypt
Apache License 2.0
1.55k stars 152 forks source link

[Question] Certificates aren't persisted on disk #282

Closed dadyarri closed 1 year ago

dadyarri commented 1 year ago

I'm running application in linux docker container with this Lettuce's config on .net 7:

builder.Services
        .AddLettuceEncrypt()
        .PersistDataToDirectory(
            new DirectoryInfo(builder.Configuration["Certificates:Path"]!),
            builder.Configuration["Certificates:Password"]
        );

    builder.WebHost.UseKestrel(k =>
    {
        var appServices = k.ApplicationServices;
        k.Listen(
            IPAddress.Any, 443,
            o => o.UseHttps(h =>
            {
                h.UseLettuceEncrypt(appServices);
            }));
    });

Account info are saved in specified location, whereas certificates doesn't: image

Because of it i'm exceeding certificates generation limit on production server each time i'm restarting application

What should i do to avoid it and reuse already generated certificates?

TheDevelolper commented 1 year ago

What was the solution?

dadyarri commented 1 year ago

What was the solution?

I forgot to add a volume

qcjxberin commented 8 months ago

Without docker, it seems that there is no saving