First we figure out the provisioning folder, by default which is:

/var/lib/3cxpbx/Instance1/Data/Http/Interface/provisioning/[ProvSupDir]/firmware/

 

Create samba service:

sudo apt-get update

sudo apt install samba

By default 3cx debian don’t have vim installed, I will install vim

sudo apt-get install vim

 

Configure Samba:

We configure the samba by edit the configuration file:

sudo vim /etc/samba/smb.conf

 

The first setting that you’ll find near the top of your general settings is the workgroup. This determines the name of the Windows workgroup that your server will be a part of. The default value is WORKGROUP because that’s also the default value on Windows. If you’re configured something different, change it here too.

workgroup = WORKGROUP

Next, you may want to limit access to your server. If you want to limit which computers can connect to your share, uncomment the interfaces option, and specify an IP or range of IPs and an interface they can connect on.

interfaces = 192.168.1.0/24 eth0
hosts allow = 192.168.1.0/24

The we create share:

create below line to name the share:

[3cx phone provisioning]

comment = 3CX phone provisioning folder

path = /var/lib/3cxpbx/Instance1/Data/Http/Interface/provisioning

browseable = yes

guest ok = no

read only =no

valid users = root, nick

create a samba user, note you will need to create password for each user in the valid users:

sudo smbpasswd -a root

type the new password and retype.

sudo smbpasswd -a nick

Then restart the samba service:

sudo systemctl restart smbd
TFTP service

Install tftpd hpa first:

 

If you encountered error saying package can”t be located, add below two lines to /etc/apt/sources.list:

deb  http://deb.debian.org/debian stretch main contrib non-free
deb-src  http://deb.debian.org/debian stretch main contrib non-free
sudo apt install tftpd-hpa
sudo systemctl enable tftpd-hpa

Now, you have to create a new directory ./tftp. To do that, run the following command:

cd /var/lib/3cxpbx/Instance1/Data/Http/Interface/provisioning

sudo mkdir ./tftp

 

Now, change the owner and group of the ./tftp directory to tftp with the following command:

sudo chown tftp:tftp ./tftp

sudo vim /etc/default/tftpd-hpa

# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/3cxpbx/Instance1/Data/Http/Interface/provisioning/tftp"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure  --create"

Now restart the tftpd:

sudo systemctl restart tftpd-hpa
Change logo

On the 3CX server you will need to enterprise version to change the logo, however, you can change it on the backend. On a linux, the path is:

/var/lib/3cxpbx/Instance1/Data/Http/Interface/provisioning/bftccr32oc/logo

windows is

C:\ProgramData\3CX\Instance1\Data\Http\Interface\provisioning\bftccr32oc\logo

find the logo file and edit it with image editor.