Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - fragrance744

#1
Quote from: Patrick M. Hausen on June 23, 2026, 08:56:28 AMI'll ask again: why not use SSH with public key authentication to execute the midclt command on TrueNAS from OPNsense?

Because it makes no sense to permit the whole SSH access when the feature is already available via WS API.

And, yes, you can setup permitted commands for SSH connection, but that means additional works.

Quote from: Creat on June 26, 2026, 10:42:47 AMI'm sorry but that makes no sense. This has already worked after I had swapped the automation to the new websocket API, it just stopped working at some point. How could it have worked if that tool is needed?

midclt is required by acme.sh in truenas_ws since its first commit, https://github.com/acmesh-official/acme.sh/blob/413a91646c03b0cd4ab6dace1bdabe78d702a710/deploy/truenas_ws.sh

Quote from: Creat on June 26, 2026, 10:42:47 AMAlso, midclt isn't what you linked on github. You linked to a script that calls `midclt` LOCALLY, which in turn is present by default on any TrueNAS install. The whole point of a (websocket) API is that you don't need to install anything locally to use it. And installing it locally doesn't seem possible (as it supposedly talks to a local truenas install). Even then, there's NO chance I'm installing `midclt` on my firewall as that wouldn't survive a config backp/restore AND this is the firs thing the GitHub page says: Software in ALPHA state, highly experimental.

It is the repository for midclt, https://github.com/truenas/api_client/tree/master/truenas_api_client is midclt's source code, and, you are right, it is in alpha.




In fact, this has been a long-standing issue since 2025.
https://github.com/acmesh-official/acme.sh/issues/6337#issuecomment-3494264075
https://github.com/acmesh-official/acme.sh/issues/6804#issuecomment-4012429657
The solution is the same, to install midclt.
#2
midclt, https://github.com/truenas/api_client, is required for using TrueNAS websocket API.
The script may work after installing it.

However, I'll never install any 3rd party software on my firewall.
I'd rather have TrueNAS run the script itself and set a firewall rule to allow the connection.
#3
I ended up setting up ACME in TrueNAS instead.