Firefly III in a TrueNAS jail

Firefly III in a TrueNAS jail 11.2-U6

ngalfas

Dabbler
Joined
Jul 19, 2020
Messages
17
OK, sorted.

As said, Caddyfile v1 is TOTALLY INCOMPATIBLE with Caddy v2.

The main problem was the default use of TLS

It's supposed to automatically set certificates. I want it for local domain.

I started to get to the problem by launching caddy from cli.
It showed
Code:
ERROR   tls.obtain      will retry      {"error": "[firefly.local] Obtain: [firefly.local] creating new order: request             to https://acme-v02.api.letsencrypt.org/acme/new-order failed after 1 attempts: HTTP 400 urn:ietf:params:acme:error:rejectedIdentifier - Error creating new order :: Cannot issue for \"firefly.local\": Domain name does not end with a valid public suffix (TLD) (ca=https://acme-v02.            api.letsencrypt.org/directory)", "attempt": 1, "retrying_in": 60, "elapsed": 1.625859627, "max_duration": 2592000}


So i added in the Caddyfile
Code:
tls internal

(https://caddyserver.com/docs/caddyfile/directives/tls)


To use internal certificate. This now gives
Code:
ERROR   pki.ca.local    failed to install root certificate      {"error": "trust not supported", "certificate_file": "storage:pki/authorities/local/root.crt"}


But at least it works. Oh, Caddyfile also needed
Code:
file_server

to serve the static files (CSS etc)

Hope this is helpfull.

References:

So Caddyfile now is
Code:
firefly.local {
    root * /usr/local/www/firefly-iii/public
    php_fastcgi localhost:9000
    tls internal
    file_server
    log {
        output file /var/log/firefly_access.log
    }
}
 
Top