FREEPBX Sangoma linux 7 as auto root login (POWEROUTAGE)

Hi community I’ve ran into this before with no success.

I am trying to set up a free pbx and I want that if there is some power outage the freepbx is able to restore succesfully so I do not have to enter the command line and login as root and credentials.

Any clues?

If your UEFI (BIOS) is set correctly, the system should power up and boot when power is restored after a failure.

Normally, the file freepbx.service is executed by systemd as part of system startup; it runs ‘fwconsole start’, which (among other things) starts Asterisk.

If this is not working correctly, please provide details including any errors logged by freepbx or asterisk.

Hi Stewart,

I understand the BIOS does power up the pc but when it starts and the Linux comes up then there are root credentials requested. I want it to be automatically logged

That is not normal.

This sounds like a Linux installation problem not a FreePBX one.

Just to be sure, I assume you are not talking about a normal login prompt, which you can ignore, unless and until you actually want to issue a console command.


Sorry if I was not clear enough. I am talking about this login

It’s a terrible idea! But here’s some ammunition for shooting your foot. getty - ArchWiki

1 Like

That’s a normal login prompt. You should not need to do anything, as FreePBX, and Asterisk, should already have been started before this appears.

You can stop it appearing by simply having the system not start a login listener on /dev/tty0, but no-one would ever bother doing that. (And it looks like it may be more difficult on a systemd based system than on a /etc/inittab one.)

Just to clarify, if theres a power cut and the PC auto-powers back on after it has recovered power, the system will boot to this login screen. However, will the FreePBX system work (making phone calls, etc.) without the need to log in? I think it does, I can test it out i guess.

Fernando, can I ask why you want to do this? Logging into the FreePBX terminal is only for servicing the FreePBX server?

It will also boot to that screen, after a controlled shut down and reboot. On a typical workstation configuration it would boot to a graphical login screen.

I know, but it doesnt have to be logged in for people to use the PBX does it?

No. The system (should!) boot to a completely usable state entirely without any user action. Even if for some reason the system was not usable on boot, just logging into the console wouldn’t resolve anything.

Thanks for that will try it

When the system is on that stage(before login) I can not access the Web UI after I login it takes IP and I am able to access the WEB UI and make calls

Hi lgaetz But I am unable to enter the WEb UI when I am on this stage

I don’t know what this means. What takes IP from where and how?

What he means is, if he reboots the PC/server (or there is a power cut, same thing) then he cannot log into the FreePBX server via the GUI.

In order to log into the FreePBX server via GUI/web browser, you must first enter the root username and password into the FreePBX server/terminal. Then after that, it is accessible via the web browser GUI. He wants it to automatically log into the root terminal upon restart, so he does not have to manually do this in order for it to be accessible via web browser GUI.

1 Like

I understood that, but it doesn’t make sense, in terms of how LInux systems start up. Simply logging in will not start FreePBX, or initialise the network win any way. He specifically said that “it takes IP”. The closest I an come to an interpretation of that is that he is saying PC does obtain an IP address from the DHCP server until he logs in, and only does so as a consequence of the login, but the DHCP look up is an automated start of boot up sequence. It would never be done by a login script, and if he is saying he has to manually run a command to do it, he should be stating explicitly that that is what he is doing.

Typically a server would have its first login via ssh or telnet, and might even be headless, so the IP allocation has to be automatic.

If he is doing something more than logging in, we may be talking about a start up sequencing problem, in which the DHCP server is not up at the time it is needed, because it was taken down by the same power failure, or, similarly, DNS service are not up. As this will have an effectively static address, the obvious solution is to hard code the information that would be taken from DHCP. Critical name server information could also be hard coded.


Okay, so you should be able to access the FreePBX GUI via web browser without having to log into the root terminal? Then I am not sure what he is asking.

He will only be able to access the GUI if he knows it’s IP address. If his DHCP service is awarding a different one each time it reboots, he will need to either ‘reserve’ one address for the mac address of his PBX’ ethernet interface or set it statically in the OS.

1 Like