How to get asterisk to run on TrueNas CE

I have been working on this problem, trying to install asterisk, for almost a week and I’m no closer now than a week ago. I have come to the conclusion that it isn’t possible. While I did manage to get Apache to run in a docker app, that alone took two days. Installing asterisk is apparently not possible.

I already have both asterisk and apache installed and running fine on another machine. To install those, I just issued the necessary “apt” commands and they were installed in seconds. The config took a little longer.

With asterisk, I tried using the yaml file supplied by the docker maker for two different docker versions. One wouldn’t get past “save” and the other installed asterisk, but got stuck on “Deploying.” That one also totally crashed TrueNas once, but TrueNas rebooted and came back OK.

Finally I was told to just install a virtual machine and run asterisk off that. I tried Alpine because its small, but it kept crashing so much that I couldn’t get past the install. Then I tried debian server. That installed, but had no network access beyond my local network - even though TrueNas can access the internet just fine.

Sorry for the rant, but it looks like I’ll have no choice but to be wiping TrueNas and installing Debian or similar on bare metal. If VM’s are possible on TrueNas, they are far too complicated for the average guy to manage.

Seems like a pointless exercise to me ,for all the reasons you mentioned. Dependency hell right off the bat. I haven’t dealt with it in 25 years when I built out a small business system based on it ,complete with zapata card and polycom phones. I did it all on left-handed Redhat at the time ,but to do it again today I’d make it standalone on Debian 12 or 13.

Is asterisk in the app catalog or something?

1 Like

I am going to give it another try next week. I need time to cool down. I really love the TrueNas UI. I talked to some other people and they said not to ever use dockers because they could contain viruses. So I’m going to try another VM using ubuntu-server. Once, and if, I get a reliable OS running in a VM, I can install anything I want on it.

If that fails, I may go with something on bare metal like OpenWRT or some debian flavor. With those, I can install directly on the OS. TrueNas doesn’t allow that.

Maybe those people aren’t the best source of advice.

While Docker containers can contain malware, all Docker containers do not contain malware.
Having said that, I recommend being careful using a public repository like Docker Hub images unless you vet the source extensively.

It’s much better to instead get Docker images from the developer’s github (or similar) directly.

Regarding asterisk specifically though, I would recommend a VM or Jail-like Container/Instance, that software package has no official Docker release from what I can see.

1 Like

I’m running Asterisk in a Ubuntu container on TrueNas 25.04.2.4.
Quite easy to setup and work’s without problems.

1 Like

You have asterisk in a docker container or in an Ubuntu VM?

I’m going to try to install Ubuntu Server since debian server didn’t work out. If that works, is there a way to share config files with the real world? I think TrueNas uses QEMU which I am not familiar with. I use VirtualBox on my desktop and it has several ways to share files with the real world.

There are a lot of config files with asterisk and I don’t want them disappearing if something bad happens to the VM.

Thanks guys for your help, but it appears that Truenas is just too unstable for everyday use. I installed ubuntu server on a TRuenas VM and I had a lot of the same problems I had with debian. It completely refused to work with IPv6. While the Truenas host worked perfectly for “ping google.com” the VM hung every time because it was trying to connect with ipv6. I spent way too much time trying to get it to work and I dont think it ever will. If I use ping -4 google.com" it actually works.

It also took numerous attempts to install ubuntu on the VM because it kept locking up.

The truenas host has no problem with ipv6. Also, if I go to another machine, the vm will not accept ipv6 pings.

So tomorrow I will try reinstalling ubuntu, but I wont be spending any time on it if it doesn’t work because I think the issue is a failure in the truenas ipv6 bridge code. The vm gets its own ip address, it just can’t do anything with it. I don’t have time to wait for a fix.

So its very probable that tomorrow I will have to wipe truenas and replace it with some kind of bare metal server like ubuntu.

I played around with it briefly last night and got it deplyed via yaml, but since i don’t know much about asterisk i did not know that you have to provide a config yaml in a specifig place. So the app launched and was running, but failed to access the config.yaml because it wasn’t there and therefore only had a white screen when i tried to access the web portal (at least i assume it’s a web portal that was bound to port 8080)

I don’t know why it would be unstable, is it a hardware issue or a connectivity issue?

Given that I have relatively little experience with VM’s since the VM-rework and almost no experience with TrueNAS or VM’s in a IPv6 context I am not the right person to comment on that.

I’m running Asterisk in a LXC container.
I simply backup my config files via scp which is sufficient for me because I rarely change my Asterisk configuration.
Again I can confirm this is running smoothly and super stable.

I don’t remember what happened, but when I was playing with the VM, it crashed truenas and suddenly rebooted on its own and then the entire system crashed and hung. I was able to manually reboot and get it back, That should never happen. I did find that Truenas simply doesn’t support ipv6 in VM’s so that is why it wasn’t working.

Another issue is that the <> feature tends to crash a lot. It may be that rather than the VM itself that was crashing. When the VM appeared to hang, I could shut down the display and restart it and it would usually bring it back. When using VM’s in truenas, get SSH working asap because that interface tends to be more stable.

I don’t know anything about LXC containers. I have never used them.

I am trying to get stuff running on a VM. Unfortunately, it wasn’t advertised, but the TrueNas VM engine doesn’t support IPv6. I spent a good bit of time trying to get that to work only to make that discovery. It is odd considering that IPv6 runs just fine one the TRuenas host. I was able to modify the settings in the VM ubuntu to disable ipv6 so that it wouldn’t hang when it tried to access something with ipv6. Ipv4 works fine. I am looking at modifying the router to tunnel ipv6 requests into ipv4 for the VM so the VM can handle them.

UPDATE: I just tried the LXC containers and it was way better than everyting else. I got it up and running in just a few minutes. I haven’t tried to config asterisk yet, but its vastly superior to docker and regular VM’s. It also seems to work fine with IPv6.

1 Like