3CX for Linux: do-it-yourself cloud PBX
- Tutorial
Beta version 3CX for Linux
Introducing the Linux Version of 3CX! From now on, 3CX is available on Linux and Windows - of your choice! Both versions are identical in their capabilities and are built on a single technology.
Version 3CX for Linux allows you to create off-the-shelf server systems (appliance) and cloud installations - now you can become a virtual telephone exchange operator yourself!
3CX for Linux currently only runs on Debian Linux. Soon our own ISO image and versions for other distributions will appear.
The following features are not available in the beta version:
- FAX server
- Call reports
- Office 365 contact integration
- Fault tolerance system
We think you will want to try the new version! Therefore, we prepared a guide for installing 3CX on the largest European hosting OVH on a VPS server.
Infrastructure preparation
Before installing 3CX in the cloud, pay attention to the fact that in this case the server is on the public network, and your SIP devices are on the local one. Therefore, to simplify the connection of phones, we recommend using the free 3CX Session Border Controller. Learn more about this technology here .
Also note that installing 3CX on a cloud hosting abroad (especially when providing services to third parties) may be contrary to local law. In addition, some telecom operators use a higher tariff when connecting systems (i.e. making calls) from abroad.
And the last - right after installation, add your IP addresses (from which you connect to the 3CX console and connect SIP devices) to the white list to avoid accidental blocking of access by the 3CX security system.

Creating an OVH Account
We chose ovh.ie service due to the use of OpenStack open technology and very reasonable prices for VPS SSD servers.
- Follow the link https://www.ovh.ie and select your (or the closest to you) region in the upper right. You can select the World region.
- Go to Web Control Panel > Create your account .
- Enter the user data required by the system.
- To add billing information, you will need to send documents confirming your name and address (for example, a scan of your passport and utility bill) to [email protected] , indicating your OVH ID.
- Wait for an email notification about the full activation of your account. Additional information on working with the service is available in OVH online guides .
Creating a VPS server
After creating an account and logging in, create a new server.
- Follow the link https://www.ovh.ie/vps/vps-ssd.xml
- Select the VPS SSD server that matches your load.
- For a 3CX system for 4-8 calls, the VPS SSD 1 option is suitable. For larger systems, select VPS SSD 2 or VPS SSD3, respectively.
![image_thumb [2] image_thumb [2]](https://habrastorage.org/getpro/habr/post_images/5a0/560/963/5a05609636fd1f9bb29aa7fbdd5c071d.png)
- Specify the server location region closest to you in the My Location section .
- In the My OS section, select Debian 8 (Jessie) 64 bits.
![image_thumb [5] image_thumb [5]](https://habrastorage.org/getpro/habr/post_images/771/ed9/ed0/771ed9ed0759c48e8fe0e2eb2d800e26.png)
- Click Continue . Complete the process of creating a VPS server by specifying the necessary parameters and billing information.
- After creating the server, you will receive an e-mail with credentials and IP address for connecting to the Linux console. Creating a server takes about 6 hours.
Connection to the VPS server
- On Windows, download the putty utility and run putty.exe .

- In the Host Name field, specify the name (for example, vps343564.ovh.net) or the IP address of the server that was received in the e-mail message from OVH.
- Select SSH and click Open .
- On the certificate warning, click Yes .
- Specify connection credentials from e-mail from OVH.
- You are connected to the VPS server. Set your time zone using the tzselect command, as described here .
- Now the system is ready to install 3CX, or transfer your working system to the cloud!
Install 3CX for Linux
- In the console, enter the following commands:

wget -O- http://downloads.3cx.com/downloads/3cxpbx/public.key | apt-key add - echo "deb http://downloads.3cx.com/downloads/3cxpbx/ /" | tee /etc/apt/sources.list.d/3cxpbx.list apt-get update apt-get install 3cxpbx - When asked about the installation, press Y. 3CX will be downloaded and installed. After that, the following message will appear.

- Select option 2. The 3CX web configuration utility starts.

- Launch a browser on your computer and open the 3CX web interface at the link http: // IPADDRESS: 5015

- Use the 3CX Configuration Tool utility to complete the server setup.
- After setup is complete, a message similar to this appears

- If you have moved your Windows PBX to the cloud, be sure to resend the welcome messages to all users.
Using 3CX V14 Backup
To restore a 3CX V14 backup from a Linux command prompt, type:
cd /usr/lib/3cxpbx/
./RestoreCmd -f /var/lib/3cxpbx/Instance1/Data/Backups/yourbackupfile.zip -c /var/lib/3cxpbx/Instance1/Bin/RestoreCmd.exe.configRestoring a backup of 3CX V14 must be done at the very beginning of the installation of the system on Linux!
Uninstall 3CX V15 for Linux
To remove 3CX, enter the command
apt-get --purge remove 3cxpbx