I use to install 3CX on a bare Debian then switching to the Web wizzard.
The installation process on bare Debian is well described on installing-3cx-pbx-on-debian-10 and just for archive purpose (in case the source website is disabled), I paste the main steps here
wget -O - http://downloads-global.3cx.com/downloads/3cxpbx/public.key | apt-key add -
echo "deb http://downloads-global.3cx.com/downloads/debian buster main" | tee /etc/apt/sources.list.d/3cxpbx.list
dpkg-reconfigure locales
Then absolutely choose en_US.UTF-8
apt update && apt install 3cxpbx
Now we are going to the web Interface and after entering the licence and some other informations:
Huh!
Not a problem: in fact, you must first generate your server certificate with "certbot".
Note that "certbot" will need to bind to the port 80 for this to work: temporarily stop "nginx" for that, with:
systemctl stop nginx
You can do it another way, but it is the easiest to me
certbot certonly --standalone -d 3cx.rktmb.org
Of course, 3cx.rktmb.org must be an existing DNS record. Create it then run the command, and you have your certificate.
Start "nginx" back with:
systemctl start nginx
You will have to upload 2 files:
- The "cert.pem" file first
- The "privkey.pem" file in the next screen