Question:
Is it possible to use dynamic DNS (eg. duckdns.org) and Let's Encrypt for truecharts apps?
If yes, what is preferred way?
I don't necessarily want to expose the TrueNAS UI, so just the apps for now.
Background:
For some years I've been running OMV, running some apps like Jellyfin and Nextcloud using docker-compose behind a caddy reverse-proxy for generating Let's encrypt certificates using this: https://github.com/lucaslorentz/caddy-docker-proxy . Caddy uses ACME HTTP challenge in this case.
This takes place in my home network behind NAT and I don't have a static public IP from my ISP. Hence I use duckdns.org which is running on my router. Ports 80 and 443 are forwarded to the box.
So far so standard, one would think.
Now I'm currently evaluating TrueNAS SCALE as a replacement for the OMV box, having all the goodies like ZFS and the very compelling kubernetes with the truecharts catalog. I've followed the truecharts guide to the point where we need to register a ACME DNS-Authenticator with a public domain from Cloudflare or route53.
This is where I'm stuck, because I don't see official support for dynamic DNS users.
Edit: I first didn't realize that DDNS is possible with a custom domain in Cloudflare. I guess purchasing a domain and setup Cloudflare is a viable way.
Option 1: Use Traefik
Now I've seen similar posts, but this is about a situation where we have a static IP, so we can point a public domain to it: https://www.truenas.com/community/threads/use-traefik-to-generate-lets-encrypt-certificates.100881/
My intuition was also to just let Traefik handle the Let's encrypt part but apparently that's not easily possible as it's an Ingress controller etc.
I've found these instructions for Traefik + kubernetesCRD + TLS but it seems complicated and I have no idea if it would work with truecharts.
doc.traefik.io
Option 2: Wait for more ACME DNS-Authenticators to be enabled by TrueNAS SCALE.
There is a ticket open for this reason: https://jira.ixsystems.com/browse/NAS-115350
Lego would support DDNS providers such as DuckDNS: https://go-acme.github.io/lego/dns/duckdns/
Option 3: Workaround to run acme.sh locally and import the cert via truenas API
This blog describes how it would be possible to do the whole ACME challenge separately (in a shell script, could be docker too I guess), somehow push the cert to the TrueNAS using the API, automate the process via cron jobs etc:
However this seems like a maintenance hell to me, hence I'm reluctant to go this route. There must be a better way...
Unfortunately I'm stuck here and as of now TrueNAS is not viable for me as a NAS for this reason. Which is a shame because I like the concept and the package a lot.
And I have to say I'm a bit surprised to be stuck at this point, because I would consider my situation very common for home users.
Is it possible to use dynamic DNS (eg. duckdns.org) and Let's Encrypt for truecharts apps?
If yes, what is preferred way?
I don't necessarily want to expose the TrueNAS UI, so just the apps for now.
Background:
For some years I've been running OMV, running some apps like Jellyfin and Nextcloud using docker-compose behind a caddy reverse-proxy for generating Let's encrypt certificates using this: https://github.com/lucaslorentz/caddy-docker-proxy . Caddy uses ACME HTTP challenge in this case.
This takes place in my home network behind NAT and I don't have a static public IP from my ISP. Hence I use duckdns.org which is running on my router. Ports 80 and 443 are forwarded to the box.
So far so standard, one would think.
Now I'm currently evaluating TrueNAS SCALE as a replacement for the OMV box, having all the goodies like ZFS and the very compelling kubernetes with the truecharts catalog. I've followed the truecharts guide to the point where we need to register a ACME DNS-Authenticator with a public domain from Cloudflare or route53.
This is where I'm stuck, because I don't see official support for dynamic DNS users.
Edit: I first didn't realize that DDNS is possible with a custom domain in Cloudflare. I guess purchasing a domain and setup Cloudflare is a viable way.
Option 1: Use Traefik
Now I've seen similar posts, but this is about a situation where we have a static IP, so we can point a public domain to it: https://www.truenas.com/community/threads/use-traefik-to-generate-lets-encrypt-certificates.100881/
My intuition was also to just let Traefik handle the Let's encrypt part but apparently that's not easily possible as it's an Ingress controller etc.
I've found these instructions for Traefik + kubernetesCRD + TLS but it seems complicated and I have no idea if it would work with truecharts.
Traefik CRD TLS Documentation - Traefik
Learn how to use Traefik Proxy w/ an IngressRoute Custom Resource Definition (CRD) for Kubernetes, and TLS with Let's Encrypt. Read the technical documentation.
Option 2: Wait for more ACME DNS-Authenticators to be enabled by TrueNAS SCALE.
There is a ticket open for this reason: https://jira.ixsystems.com/browse/NAS-115350
Lego would support DDNS providers such as DuckDNS: https://go-acme.github.io/lego/dns/duckdns/
Option 3: Workaround to run acme.sh locally and import the cert via truenas API
This blog describes how it would be possible to do the whole ACME challenge separately (in a shell script, could be docker too I guess), somehow push the cert to the TrueNAS using the API, automate the process via cron jobs etc:
Unfortunately I'm stuck here and as of now TrueNAS is not viable for me as a NAS for this reason. Which is a shame because I like the concept and the package a lot.
And I have to say I'm a bit surprised to be stuck at this point, because I would consider my situation very common for home users.
Last edited: