How to Install 3CX v20 on Debian 12 Linux on KVM Cloud

 

 

 

Open a Terminal Session

Access your Debian 12 cloud instance or VPC or VPS and open the terminal. This can usually be done by searching for ‘Terminal’ in your applications menu.

Gain Root Privileges

Gain Root Privileges

If not logged in as the root user, switch to the root user by executing:

SSH Config

sudo -i

Enter your password when prompted.

Root is the default administrator account on Linux that has full system privileges. Use sudo -i to switch to the root user, which allows you to execute commands with administrative privileges. Enter your regular user’s password when prompted.

Update Your System

Update and Upgrade your Debian 12 System

Ensure that your system is up to date with the latest packages and security updates:

SSH Config

 

apt update && apt upgrade -y

 

Confirm any prompts that come up during the upgrade process.

Keeping the current version is safe if you have made custom configurations on your Debian 12

If you’re asked about keeping or replacing configuration files, choose according to your requirements (usually keeping the current version is safe if you have made custom configurations).

Updating the system ensures you have the latest security patches and software updates.

  • apt update: Refreshes the list of available packages and their versions, but it does not install or upgrade any packages.
  • apt upgrade -y: Upgrades all updatable packages to the latest version. The -y flag automatically confirms the installation of packages.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Install Required Packages for 3CX v20

Install Required Packages for 3CX v20 on Debian 12

Install some prerequisite packages with the following command:

SSH Config

apt install sudo wget gnupg2 dphys-swapfile

Some packages are necessary for 3CX to run or to perform the installation.

  • sudo: Allows a permitted user to execute a command as the superuser.
  • wget: A utility for non-interactive download of files from the web.
  • gnupg2: GNU Privacy Guard is a replacement for the original PGP cryptographic software, allows encrypting and signing data and communications.
  • dphys-swapfile: A swap file manager which sets up a swap space if there is none.

Add the 3CX v20 Repository

Download 3CX v20 Repository on Debian 12

To add the GPG key for the 3CX repository to your system, use:

SSH Config

 

wget -O- https://repo.3cx.com/key.pub | gpg --dearmor | sudo tee /usr/share/keyrings/3cx-archive-keyring.gpg > /dev/null

Add 3CX v20 repository to your APT sources

Add the 3CX repository to your APT sources:

SSH Config

 

echo "deb [arch=amd64 by-hash=yes signed-by=/usr/share/keyrings/3cx-archive-keyring.gpg] http://repo.3cx.com/3cx bookworm main" | tee /etc/apt/sources.list.d/3cxpbx.list

 

For the testing repository, execute bookworm-testing

For the testing repository, if needed, execute:

SSH Config

 

echo "deb [arch=amd64 by-hash=yes signed-by=/usr/share/keyrings/3cx-archive-keyring.gpg] http://repo.3cx.com/3cx bookworm-testing main" | tee /etc/apt/sources.list.d/3cxpbx.list

 

Repositories are servers which contain sets of software that your system can install.

  • wget: Retrieves the signing key for the 3CX repository.
  • gpg --dearmor: Converts the downloaded key into a format that APT can understand.
  • tee: Takes the output from the previous command and writes it to a file while also displaying it.
  • /usr/share/keyrings/3cx-archive-keyring.gpg: The location where the APT keyring is stored.
  • echo: Prints out its arguments as a string of text.
  • |: A pipe that takes the output from one command and inputs it into another.
  • sudo tee /etc/apt/sources.list.d/3cxpbx.list: Writes the 3CX repository source list to APT’s list of sources.

Update Package Lists Again

Update Package Lists Again

After adding new repositories, it’s important to refresh your package lists to make APT aware of the new packages available.

SSH Config

apt update

Install 3CX v20 Software

Install 3CX v20 Software on Debian 12

Begin the installation of 3CX with:

SSH Config

 

apt install 3cxpbx

 

Accept the 3CX License Agreement

Accept the 3CX License Agreement

During the installation, you will be prompted to accept the 3CX License Agreement. Read the agreement carefully, and if you agree to the terms, continue with the installation.

Configure 3CX v20

Upon completion of the installation, you will be presented with options to configure 3CX. You can choose to run the configuration tool from a web browser or the command line.

  • Choosing (1) will allow you to configure 3CX via a web interface.
  • Choosing (2) will allow you to configure 3CX from the command line.

Choosing option 1 will allow you to configure 3CX via a web interface.

If choosing (1), you’ll be provided with a URL to access the configuration tool from a browser. It’s important to use the correct IP address that corresponds to your machine’s network setup. (ensure that you replace the local IP with your public IP if you are setting this up on a cloud machine).

SSH Config

http://172.31.28.41:5015/

Access the URL from your browser and follow the instructions to complete the 3CX configuration.

 

Ref: How to Install 3CX v20 on Debian 12 Linux on KVM Cloud - roosho.

 

 

 

 

uninstall 3CX manually installed on Debian 9 or 10 

 

 

To remove the package 3cxpbx, we need to know the 2 ways. 

The first one is just to remove from the server with the command as root: apt remove 3cxpbx -y 

The Second, is for remove the package and all the files of 3CX. WARNING, all the files, i mean, the reports and recordings calls. So, backup the file if they are in the default folder. The default folder is: /var/lib/3cxpbx/Instance1/Data/Recordings 

Run the command if you want to backup: mkdir $HOME/3cx-bkp-recordings && cp -vr /var/lib/3cxpbx/Instance1/Data/Recordings $HOME/3cx-bkp-recordings 

Finally, remove 3CX: 

apt remove --purge 3cxpbx -y 

 

 

 

Troubleshooting tips. 

Restart the installation wizard.  

sudo /usr/sbin/3CXWizard --cleanup 

 

 

 

 

Most of the time service went down because of the server disk space.  

 

 

To stop/start all services.  

 

sudo 3CXStopServices 

sudo 3CXStartServices 

 

Was this answer helpful? 4078 Users Found This Useful (7360 Votes)