Skip to main content

Linux Installation

Prerequisites

Our current supported operating systems include:

  • Ubuntu (versions 22 and 24)
  • Debian (versions 11 and 12)
  • CentOS 9
  • AlmaLinux 9
  • Rocky Linux 9

In many installations, there is a service running on the standard HTTP ports (80 and 443). If you wish to continue running the service on the host, you need to assign different ports to the PBX. You can do this by adding --http-port <port> and --https-port <port> to the startup parameters.

The PBX needs to have access to the public Internet for the activation of the license key and for installing software updates https://license.vodia.com for the license and https://portal.vodia.com for software updates). If you need to disconnect Internet access after installation, you will need a permanent key which is available upon special request.

tip

In cloud environments like AWS or Azure, where public IPs are typically associated with network resources (e.g., load balancers, network interfaces) rather than directly assigned to virtual machines, configure the IP Routing List to private public to enable proper traffic flow. Find more information here.

Installation

In order to start the installation, you need to be logged in as system administrator to a shell (typically bash).

Download and run the install script for your operating system. Before running the install script, edit the install script if necessary and read the comments. You may choose to install different languages and make other modifications to the installation script that fit your purpose.

If you need to write a pidfile, you may do so by editing the OPTIONS variable in the installation script. You need to add --pidfile <filename> to the list of options. For normal installations, this is not neccessary.

Please note that you will might have to configure your firewall (iptables). Otherwise, you will not be able to access the web interface of the PBX and register phones.

After the PBX service is installed by the script, the username and password will be shown in the bash terminal.

We recommend that you reboot the server after the initial installation. This will make sure that everything will come up automatically in the case you have to restart the server. It will also make sure that there is only one PBX process running on the server.

tip

For CentOS ,AlmaLinux and Rocly Linux please run yum install -y wget first

Steps to Install the PBX Service:

  • Download the universal Linux installation script.
  • Set the appropriate permissions for the script.
  • Run the script with available options for monitoring and backup
wget https://vodia.nyc3.cdn.digitaloceanspaces.com/builds/install-linux.sh
chmod a+x ./install-linux.sh
./install-linux.sh --monitor-sip 5060 --backup

Installation Options:

Basic Installation

To perform a basic installation without monitoring or backup:

./install-linux.sh

Monitoring Features

The installer includes a robust monitoring system that can check HTTP, HTTPS, and SIP ports. If any of these services become unresponsive, it will automatically restart the PBX.

Monitoring Options

./install-linux.sh --monitor-http 80 --monitor-https 443 --monitor-sip 5060

You can use any combination of these monitoring options:

--monitor-http PORT: Monitors the HTTP service on the specified port

--monitor-https PORT: Monitors the HTTPS service on the specified port

--monitor-sip PORT: Monitors the SIP service on the specified port

--tolerance SECONDS: Sets how long a service can be down before restarting (default: 300 seconds). Valid values: 60, 120, 180, 300, 600 seconds

--cooldown SECONDS: Sets how long to wait after a restart before resuming monitoring (default: 300 seconds). Valid values: 120, 300, 600, 900, 1800 seconds

--warmup SECONDS: After initial installation, monitoring won't restart services until the warm-up period ends (default: 86400 seconds or 24 hours). Valid values: 0, 300, 3600, 14400, 43200, 86400, 172800

--restart-server: Upon detecting a failure, only the PBX service is restarted. However, you have the option to configure a full server reboot instead.

Example with custom tolerance and cooldown:

./install-linux.sh --monitor-sip 5060 --tolerance 120 --cooldown 600

Backup Features

The system can perform automatic daily backups of the PBX directory:

./install-linux.sh --backup

This will:

  • Create daily backups at 12:05 AM
  • Maintain a 3-day rolling backup history
  • Store backups in /var/backups/pbx as zip files

Restore from Backup To restore the system from a previous backup:

./install-linux.sh --restore 2025-05-13

This will:

  • Stop the PBX service
  • Rename the current PBX directory with a timestamp
  • Extract the specified backup
  • Start the PBX service

If you're not sure which backups are available, check:

ls -l /var/backups/pbx/

Restart Mode

tip

In most cases, restarting the service should be sufficient (default behaviour)

Choose how to handle service failures i.e restart service (default) or reboot server:

#Restart only the PBX service (default)
./install-linux.sh --monitor-sip 5060 --restart-service --backup

# Reboot the entire server
./install-linux.sh --monitor-sip 5060 --restart-server --backup

Combining Features

You can combine all options to create a complete installation:

./install-linux.sh --monitor-http 80 --monitor-https 443 --monitor-sip 5060 --tolerance 300 --cooldown 600  --warmup 43200 --backup

PBX Login Credentials

  • Upon successful installation, the following message will be displayed, containing the version, URL(s) to access the PBX, and the credentials.
=== Vodia PBX Installation Complete ===
PBX Directory: /usr/local/pbx
Version: 69.5.8

Your PBX URL is:
http://127.0.0.1
http://134.199.148.82
http://10.49.0.6
http://10.126.0.9
http://134.199.148.82 (Public IP)

You can access the PBX web interface with:
Username: vodia
Password: 482ba12d-3d53-4b4a-9ffb-45ee79cad88c

Important notes:
- Make sure to change the default credentials after first login

Setting up monitoring for Vodia PBX...
Created initial warmup timestamp at 2025-05-13 13:55:09
Running initial monitor check...
Monitoring script installed at /usr/local/bin/pbx-monitor.sh
Cron job setup to run every minute
Service failure tolerance set to 300 seconds
Cooldown period after restart set to 300 seconds
Initial warm-up period set to 86400 seconds
Warmup period: 24 hours
Restart mode: service
Monitoring logs stored in /var/log/pbx-monitor/
Setting up backup for Vodia PBX...
Backup script installed at /usr/local/bin/pbx-backup.sh
Cron job setup to run at 12:05 AM daily
Backups will be stored in /var/backups/pbx with 3-day retention

=== Enhanced Vodia PBX Setup Complete ===
Monitoring enabled for:
- SIP port: 5060
- Failure tolerance: 300 seconds
- Cooldown period: 300 seconds
- Initial warm-up period: 86400 seconds
(24 hours)
- Restart mode: service
Automated backup enabled:
- Schedule: Daily at 12:05 AM
- Retention: 3 days rolling
- Backup location: /var/backups/pbx

To restore from backup in the future:
./install-linux.sh --restore YYYY-MM-DD

Log Files and Directories

Main Monitoring Log: /var/log/pbx-monitor/monitor.log

Backup Files: /var/backups/pbx/pbx-backup-YYYY-MM-DD.zip

PBX Directory: /usr/local/pbx/

State Files: /var/log/pbx-monitor/ (contains monitoring state)

Monitoring cron job: /etc/cron.d/pbx-monitor

Backup cron job: /etc/cron.d/pbx-backup

Monitoring script: /usr/local/bin/pbx-monitor.sh

Backup script: /usr/local/bin/pbx-backup.sh

Need to reset your main admin password ?

tip

Use this script only if the main PBX administrator (superadmin) has no configured email address and you cannot use the password reset function on the login page.

  • Create a script named pw_reset.sh with the following content. Then, set the appropriate permissions and execute it.
#!/bin/bash
# Reset the password for the pbx admin user if no admin email is set
PBX_DIR=/usr/local/pbx
pw_pass=$(cat /proc/sys/kernel/random/uuid)
echo "Your new Vodia pbx admin password is: $pw_pass"
md5_pass=$(echo -n "$pw_pass" | md5sum | awk '{print $1}')
sed -i "s/<pw_pass encrypted.*>.*<\/pw_pass>/<pw_pass>$md5_pass<\/pw_pass>/g" $PBX_DIR/pbx.xml
systemctl restart pbx
exit
chmod +x pw_reset.sh
./pw_reset.sh

Expected Output

Your new Vodia pbx admin password is: 21870523-1921-485d-9063-dc2da8f660bd

Something went wrong? Re-run the install script?

Before running the install script again, ensure you've cleaned up any existing PBX installation files.


##stop the service
systemctl stop pbx
OR
service pbx stop

## remove the working directory and other relevant pbx files
rm -rf /usr/local/pbx
rm -rf /var/log/pbx-monitor/ /etc/cron.d/pbx-* /usr/local/bin/pbx-*

## remove the service startup file
##Ubuntu and Debian
rm -rf /etc/init.d/pbx

## CentOS, AlmaLinux, and Rocky Linux
rm -rf /etc/systemd/system/pbx.service

You can now re-run the install script to install the Vodia PBX

Raspberry Pi:

  • Navigate to http://www.raspberrypi.org/downloads and download the Raspbian IMG and follow the installation process on this thread.
  • After the IMG has been installed SSH into your raspberry PI. The default login for Raspbian is "root" and password "raspberry".
$ wget http://portal.vodia.com/downloads/pbx/install-mini3.sh
$ chmod a+x install-mini3.sh
$ sudo ./install-mini3.sh

Follow the directions after the .sh script has been initiated.

Useful Commands

After the installation you can check if the PBX is running using the following command:

ps -C pbxctrl

You can start , stop and restart the service using the following command:

systemctl start pbx
systemctl stop pbx
systemctl restart pbx

You can also check the staus of the PBX service

systemctl status pbx
● pbx.service - LSB: Vodia PBX
Loaded: loaded (/etc/init.d/pbx; generated)
Active: active (running) since Mon 2025-04-07 15:43:20 UTC; 3s ago
Docs: man:systemd-sysv-generator(8)
Process: 2326 ExecStart=/etc/init.d/pbx start (code=exited, status=0/SUCCESS)
Tasks: 2 (limit: 1108)
Memory: 87.1M
CPU: 3.123s
CGroup: /system.slice/pbx.service
├─2328 /usr/local/pbx/pbxctrl --dir /usr/local/pbx --respawn
└─2329 /usr/local/pbx/pbxctrl --dir /usr/local/pbx --no-daemon

Software Updates

Once the service is installed, you can update the software through the web interface. The procedure is the same for all operating systems. It is important that the executable has the name "pbxctrl" and can be moved and deleted by the PBX process.

Uninstalling the Software

You can uninstall the software by deleting the working directory of the PBX (usually /usr/local/pbx) and by deleting the script pbx in the /etc/init.d directory.

Next Steps ??

Appropriate backups are critical. Please consult the backup documentation here.