How to install Freepbx Distro on Amazon AWS EC2 machine

Hi Shawn,
Something to be careful of when installing FreePBX or any linux applications in any Linux Azure distros… Azure handles root access and some database handling a little different.

What I did, is I took a prebuilt script this guy made for DigitalOcean VMs ( (Note this is not officially supported by anyone, not sangoma, etc. No claims made. Just a guy on the internet that made a script.)

Download (feel free to modify) and run:


Be careful of db setup:

MariaDB config
Press enter (none current password)
N Do not set root password
Y Remove anonymous
Y disallow login remote
Y remove test db
Y remove privilege tables

Disable selinux

nano /etc/sysconfig/selinux
Change “SELINUX=enforcing” to “SELINUX=disabled” and save the configuration file

Set Freepbx to start on boot.

nano /etc/systemd/system/freepbx.service

ExecStart=/usr/sbin/fwconsole start
ExecStop=/usr/sbin/fwconsole stop

systemctl enable freepbx


cd /usr/src/freepbx
./start_asterisk start
./install -n

Then if you want to enable commercial modules do this stuff:

Also, don’t forget to configure the networking/firewall ports in Azure.


Thanks for the tip. Kind of odd that AWS doesn’t have a free FreePBX distro…

Hi casan,

but there is a vendor who now gives freepbx with supported commercial modules with a little software fee.

you can find that in AWS Marketplace.


That fee is higher than the server we want to rent. This is for a very small group.

ok than try

They provide distro hosting.

We need in Brazil for latency.

check with them.

No datacenter in Brazil unfortunately…

Is there any specific reason for datacenter in Brazil?

otherwise you can consult some vps provider who allow iso installation in brazil.

We need it for latency. FreePBX afterall.

What is your call volume?
How many phone agents you have?
What codecs you will be running?

Boss says he wants in Brazil… Volume will start slow and then build up.

Allright, for the record.

This was kind of easy but time consuming depending on your connection.

Make sure SSH is working and the network interface is set to DHCP.
At the end of the Amazon guide, i had to set the full access for EC2 and S3 for the vmimport role. Because it was showing me not enough permissions.


Can I do commercial modules using the vultr? What have you found in terms of stability of the vultr servers?

If you are using the FreePBX Distro, you should be able to. Wait until you get it installed in the final location before you register it to make sure your Site ID works.

1 Like

I know this topic has been idle for a while, but I just set up FreePBX on an EC2 and it’s working great - one thing I discovered was that the VMDK gave the system about 5 GB of disk space, and it didn’t pick up on more when I created the EC2 instance with 30 GB of EBS. I had to install cloud-utils and then growpart to extend the volume.
Now have plenty of space on my EC2 drive.

Oh that’s also nice.

but I resolved this with adding a secondary disk and then make it primary and primary to secondary then I resize the disk and it worked.

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