Installing additional software on a TrueNAS box

Obviously considerable work has been done to keep me from doing this, particularly in any way where it might affect the TrueNAS functions. I not only accept that, I think it’s wise, and mostly works to my benefit.

(If I really wanted to override that, I could of course install Debian and use ZFS and Samba over there to provide the same functionality. The first two generations of my home fileserver were based on OpenSolaris and then on Illumos, configuring it all myself is not entirely beyond my comfort zone. But both the GUI, and the curation of versions of all the relevant packages, IS of value to me.)

But there are a few things I’d like to have present when I was doing development on the server. I have to do some of the development directly on the server, because unlike in CORE, I don’t have access to the ZFS pools and datasets from a virtual (in CORE, I did the dev in a jail, and in that jail I could install anything I needed). Even an entirely separate dev server wouldn’t solve this, since it would also be TrueNAS and I wouldn’t be able to install any software packages on it, either.

I notice that using dpkg, a Debian package can be installed into a different prefix directory than what is usual for that package. I’m wondering about installing a few things in the ~ddb/local hierarchy, private copies in my own user directory; that shouldn’t put the rest of the system at risk (unless any of the software runs as root; the stuff I’m wanting doesn’t).

Are there reasons this is a bad idea, a risk to the rest of the server?

And, how do dependencies between packages work when installing to a non-standard location? I don’t imagine it can really check against the system versions of anything.

(The tool I miss most is Emacs, which has been my editor since 1981 (when I first encountered rms’s ITS Emacs, written in ITS TECO, running on TOPS-20 under the Incompatibility Package). And it’s fairly complicated these days, has dependencies and such. The keystrokes are so deeply burned into my spine that using anything else is slow, halting, and error-prone. Some people of course hate it, got that. Plus tools built in Emacs are core to my process.)

I know that the dpkg and apt* tools are linked from the path I get as a user to something that just tells me “no”, but I rather expect I can find the real ones with modest effort. Or just copy the binaries from another Linux box.

Dumb question, but have you looked at lxcs? With bind mounts to your local zfs datasets you should be able to do the same things you did with core jails

I think, when I first went to SCALE, that wasn’t there yet? Or it was described as experimental and provisional? And, if my memory serves, the initial info I saw didn’t explain that there was a way to get direct access to the zpools and datasets. Either that or I read too fast.

If I go find the TrueNAS docs on “lxcs” will it tell me enough to be dangerous? While on the one hand, I don’t really want to learn a whole new toolset, and rebuild everything, to get there, on the other hand, what you say makes it sound like a much better solution and maybe worth it. Or do I have to go outside and find a general introduction to lxcs?

(Not, of course, a dumb question! Possibly a dumb oversight on my part.)

I didn’t know anything about lxcs when i deployed the one i use to run my docker stack. It was as easy as setting up a vm ( it’s almost the same process)
LXC’S got added in 25.04 and are considered “experimental” and there’s a big change comming to them with truenas 26. On 25.10 lxcs use incus as the backend, truenas 26 will switch to libvirt, the same backend the vms in truenas already use.
Even with the experimental status my lxc has been running rock solid since june 2025. The one issue i have in the lxc is related to the incus version truenas uses right now and a bug in docker 29. To fix the bug one would have to update to a newer incus version, but since truenas switches to libvirt in the forseeable future it won’t get fixed in 25.10 and i can live with not updating docker from 28 to 29

Thank you.

I think I’m going to be a relatively early adopter of V26 (beta 3 fixed another big issue I’ve had, described ad nauseam in another thread), so I’ll wait a bit longer rather than start learning “lxcs” just before the big switch. (I was testing V26 beta 3 on a virtual, not my production server; I’m being fairly conservative in software choices there.)

But I won’t expend a lot of effort on other solutions, now.

I’d second the recommendation for LXCs; they’re a pretty close parallel to jails under BSD. Otherwise, if you absolutely need to install software to TrueNAS itself, you can enable developer mode:

Ooh, developer mode? Maybe just as well I didn’t know about that. I shall try to restrain myself – because, as I said, I do see value in the curation and control.

It does sound like LXCs can do what I want with much less risk than invoking developer mode, but it’s nice to know I’ve got a nuclear option if I get blocked badly enough.

I see that install-dev-tools is in the path on 25.10.7, but not in the docs. I hadn’t found it because I hadn’t searched the V26 docs for that sort of thing. (Sounds like V26 is closer, barring the usual risks of “moments of unusual interest”, than I was afraid it might be, too.)

It’s been around for a while, though I don’t recall the exact version where it was introduced–somewhere in 24, I think. And I’m pretty sure it is in the docs, though perhaps at a different path.

I could well have missed it. I could go search other versions now, but I know it’s in the V26 docs, so I can find it if needed, and that will be the main release soon enough.

So to access datasets from the host in an LXC container, what I do is use the “add filesystem” option in the container GUI, and specify a host and a container path? This will create an automatic bind mount when the container runs? (In general it seems to be bad practice to manually edit config files that the GUI messes with; general discussions of LXC talk about altering the config file for the container on the host, but it’s either better, or perhaps absolutely necessary, to use the GUI here?)

Playing with this on my test server. But I admit I’m starting to wonder if, maybe, I should go ahead and create a container on my TN25 server, even if the underlying control software changes in the next release. Because I do see some big wins working in a container for what I want, and hey, maybe that changeover will be transparent!

You got it.

Yes, that’s basically it. If you want to run th lxc as root you may have to add the truenas_container_unpriv_root user to your datasets acl list. That truenas uses gets automatically mapped to the lxcs root user