Installing Docker on same server as FreePBX distro

(D E) #1

Anybody done this? I basically need to create a sandbox for a remote trusted user to login to and don’t want to allow them to roam all over the server or make changes accidentally.


Alternatively, would this approach ‘damage’ the FreePBX install? Chroot jail

(Tom Ray) #2

Why would you do this? Just make a proper sandbox server for this.

(D E) #3

agreed. am loading a virtualbox now.


provided you have the resources, no problem. I do my TTS STT in one.

(D E) #5

interesting. So you have docker installed on your freepbx distro server and have a docker container doing TTS/STT in/on it?


Not quite, I have several dockers to do various things and they can be started and stopped at whim but it is not a distro server, and that might be a problem when you need to compile their res_speech_vosk module if you don’t have full knowledge of how 'The Distro" builds asterisk.

If you want an economy SST engine, it takes about half an hour or so but $0 out f pocket.

The RTFM bit

the docker bit

docker run -d -p 2700:2700 alphacep/kaldi-en:latest

and the "asterisk Hook"

I will tell you it takes lots of memory, probably going to need 8G but just one CPU will do

(D E) #7

thanks, Dicko, I’d LOVE to play with this stuff but I don’t have full knowledge (or much at all) of how the distro builds asterisk. I’d hate to mess up my install. Having said that I have just installed freepbx on a virtual machine so maybe I could play there…


That would work fine. For a ‘low stress’ recipe, I suggest you follow @billsimon 's

(or wait for his

which he hasn’t yet posted :wink: )

Then you can do a full on download and build of Asterisk from source following the Vosk recipe . it should then work as advertised.

(D E) #9

OK, thanks. I asked the vosk people and they said

Hello. Sure, you can try vosk-asterisk:

it should work with freepbx too

but I don’t know how I would add the module as it’ll get overwritten, won’t it, when FPBX starts?

I’ll following your advice and look at the wiki post.


No. FreePBX per se is fully respectful of the modules you have installed and loaded in /etc/asterisk/modules.conf when asterisk starts , but you can’t compile the Vosk module without Asterisk source code, and that is not currently available in ‘the distro’ (or @billsimon’s recipe) , so you unfortunately will have to to dig a little deeper Yossarian

You will (currently) loose any ability to use commercial modules, but there is hope that as ‘the distro (>=16)’ moves from Zend to IonCube which supports a lot more ‘things’, up to php 7.4 on linux,windows macos and bsd, using any CPU architecture, then technically commercial modules would be then install-able.

any ‘context’ (which are not ‘modules’) you write that call any speech* extensions should be in extensions_custom.conf to prevent FreePBX (distro or non-distro) from over-writing it, otherwise it JWFM.

(D E) #11

Is there any way I could run vosk as a parallel application, perhaps on another Pi, to avoid messing up my freepbx instance? I’ve hosed it so many times in the last couple of years with faulty SD cards or faulty power supplies to the Pi, that I’m very wary of messing it up again. It’s SO fiddly to tweak to how I want it, even with backups.

(Please don’t shout at me for running it on a Pi.)


The asterisk plugin uses a websocket, so replace the service on with one on for example.


Pi 3 and newer have proper power management and won’t corrupt the card on failure.
Use a ‘high endurance’ card with capacity much larger than the occupied space and it will run reliably for years. Examples:

Of course, you should also use a conservatively rated power adapter and ensure that you aren’t making log entries on every attempted attack.


But you will need at least 8g of ram to run this code , so ‘not yet’ for a raspberry

(system) closed #15

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.