Hello!
I’m using TrueNAS Scale 24.10.0.2, updated from 24.04 when I started troubleshoot this problem. I’m trying to deploy certificates generated by acme.sh using DNS validation with self-hosted DNS and CA servers. Issuing the certificate was the easier part and I will omit just to be brief: my problem is how to deploy the certificate into TrueNAS. I tried the acme.sh built-in hook and also the deploy-freenas created by the user dan of this forum, and both provided more or less the same error:
With acme.sh truenas deploy hook:
[Thu Nov 28 21:03:53 -03 2024] Testing Connection TrueNAS
[Thu Nov 28 21:03:53 -03 2024] TrueNAS system state: <html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
./html>
[Thu Nov 28 21:03:53 -03 2024] Getting TrueNAS version
[Thu Nov 28 21:03:53 -03 2024] Detected TrueNAS system os: unknown
[Thu Nov 28 21:03:53 -03 2024] Detected TrueNAS system version: unknown
[Thu Nov 28 21:03:53 -03 2024] Getting current active certificate from TrueNAS
[Thu Nov 28 21:03:53 -03 2024] Uploading new certificate to TrueNAS
[Thu Nov 28 21:03:53 -03 2024] Fetching list of installed certificates
[Thu Nov 28 21:03:53 -03 2024] Current activate certificate ID:
[Thu Nov 28 21:03:53 -03 2024] Checking if WebDAV certificate is the same as the TrueNAS web UI
[Thu Nov 28 21:03:53 -03 2024] Updating the WebDAV certificate
/mnt/Storage/user/.acme.sh/deploy/truenas.sh: line 147: [: : integer expression expected
[Thu Nov 28 21:03:53 -03 2024] Unable to set WebDAV certificate
[Thu Nov 28 21:03:53 -03 2024] Error deploying for domain: truenas.domain
[Thu Nov 28 21:03:53 -03 2024] Error encountered while deploying.
With deploy-freenas:
[Thu Nov 28 22:28:35 -03 2024] Installing key to: /mnt/Storage/user/.acme.sh/truenas.key
[Thu Nov 28 22:28:35 -03 2024] Installing full chain to: /mnt/Storage/user/.acme.sh/truenas.crt
[Thu Nov 28 22:28:35 -03 2024] Running reload cmd: /mnt/Storage/user/deploy-freenas/deploy_freenas.py
Error importing certificate!
<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>
[Thu Nov 28 22:28:36 -03 2024] Reload error for: truenas.domain
I tried to change http and https with both, with password or the API in the deploy-freenas, but the result are always the same. The deploy_config at first had only the API and the certificate path enabled, using the default values for the others and later changed some values too. I erased and generated a new API key. Nothing.
Do I need to enable something else besides the API key? The user is a admin, but I tried to run as root too, no luck.
What am I missing here?