Let's Encrypt with FreeNAS 11.1 and later

I just kinda ran with it and it seems to be working fine. FWIW here is what I did to get things set up:

  1. Followed instructions from Sandboxes (Jail-like Containers) | TrueNAS Documentation Hub to install jailmaker.
  2. Had to add sudo chmod +x /mnt/main/jailmaker/jlmkr.py to make it work.
  3. Then ran jlmkr to follow instructions to create a jail named letsencrypt that runs at startup - use --bind='/etc/certificates' in the systemd_nspawn_user_args setting to ensure the certificates land in the correct place
  4. Ran apt install cron socat git in jail (using jlmkr shell letsencrypt)
  5. Ran curl https://get.acme.sh | sh -s email=you@yourdomain.com in jail
  6. Ran git clone https://github.com/danb35/deploy-freenas in jail
  7. Copied /root/.acme.sh from my old install into jail (same path)
  8. Copied /root/deploy-freenas/deploy_config into jail (same path)
  9. Ran ./acme.sh --force --dns dns_linode_v4 --dnssleep 240 --issue -d <truenas_fqdn> --standalone --reloadcmd "/root/deploy-freenas/deploy_freenas.py" in jail to ensure cert renew works (specific for me, since I use linode_v4 DNS verification)
  10. Ran ./acme.sh --cron --force in jail to ensure cron job will run
  11. Checked crontab -l, entry created by acme.sh was 53 6 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null in my case (YMMV)
  12. Deleted ACME Cert renewal cron job from Truenas UI

Hope this all continues to work now!

1 Like