Coder Social home page Coder Social logo

Comments (5)

qknight avatar qknight commented on June 23, 2024

@erictapen can you please post your nixcloud.TLS.certs configuration.

BIG WARNING

nixcloud.TLS was designed to be used with nixcloud.reverse-proxy and you clearly don't use it as you are using services.nginx on port 80. by definition your services.nginx service has to handle the ACME requests BUT it will only do that if you configure vhost.enableACME || vhost.useACMEHost != null as pointed out here https://github.com/NixOS/nixpkgs/blob/release-18.03/nixos/modules/services/web-servers/nginx/default.nix#L180

BUT maybe you can also use nixcloud.TLS with services.nginx running on port 80 (not using nixcloud.reverse-proxy), we could try this:

  1. readd enableACME = true; to your config and see https://github.com/NixOS/nixpkgs/blob/release-18.03/nixos/modules/services/web-servers/nginx/default.nix#L181

  2. your generated nginx config must contain the .well-known for the respective domain.

     systemctl cat nginx.service
    

    from there search the config file and check if it contains the string .well-known

  3. then reissue the acme certificate target (should be reexecuted after nixos-rebuild switch every time you make changes)

    you can restart it manually using:

     systemctl restart acme-erictapen.de-ACME.service
    

please report your results. i'm curious!

how to configure nixcloud.TLS

https://github.com/nixcloud/nixcloud-webservices/blob/master/documentation/nixcloud.TLS.md#how-to-use-nixcloudtls

should be like this:

nixcloud.TLS.certs = {
  "erictapen.de-ACME" = {
    domain = "erictapen.de";
  };
};

from nixcloud-webservices.

qknight avatar qknight commented on June 23, 2024

update: https://github.com/NixOS/nixpkgs/blob/release-18.03/nixos/modules/services/web-servers/nginx/default.nix#L592 is also exporting security.acme.certs which should contradict the nixcloud.TLS settings as they probably won't merge.

without major rewrites you won't be able to use services.nginx with nixcloud.TLS

that said, you can always hack your nginx.config manually by using https://nixos.org/nixos/options.html#services.nginx.config

and then it will be possible ... but not easy.

from nixcloud-webservices.

qknight avatar qknight commented on June 23, 2024

@aszlig this is one reason we need the stateful nginx backend feature, so ppl can just migrate to nixcloud-webservices without much change at first...

from nixcloud-webservices.

erictapen avatar erictapen commented on June 23, 2024

Oh no, then I completely misunderstood the module, sorry. Will have a look at nixcloud.reverse-proxy asap...

from nixcloud-webservices.

qknight avatar qknight commented on June 23, 2024

i'll be updating the documentation ASAP. seems nixcloud.TLS breaks other assumptions as well.

from nixcloud-webservices.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.