Updating an LXC container
Updating MikoPBX in a Proxmox VE LXC container without copying call recordings
This guide is intended for MikoPBX installed in a Proxmox VE LXC container. All operations are performed through the Proxmox and MikoPBX web interfaces.
We recommend updating sequentially without skipping releases or versions. If a release description specifies an intermediate version, update to that version first.
How the update works
In LXC, the MikoPBX system files and user data are stored on separate volumes:
Root Disk
System files for the current MikoPBX version
Remains attached to the old CT
/storage
Call recordings, call history, modules, audio files, and logs
Reassigned to the new CT
/cf
MikoPBX settings and the main database
Reassigned to the new CT
To update, create a new container from the current lxc.tar.gz template. The existing /storage and /cf volumes are not copied: Proxmox reassigns them to the new container using Reassign Owner.
As a result, the new MikoPBX version gets a new root file system while continuing to use the existing settings, history, and call recordings.
Do not update an LXC container with an .img file under Maintenance → PBX update, and do not attach an ISO image. These methods are intended for a full system disk in a virtual or physical machine. For LXC, use a new lxc.tar.gz template.
Before you begin
Schedule a maintenance window. After the old CT is stopped, telephony will remain unavailable until the new container starts.
Make sure you have:
administrator access to Proxmox VE;
administrator access to MikoPBX;
a backup stored outside the container being updated.
Reassign Owner does not create a backup. It only changes the owner of an existing volume. An administrator error, storage failure, or incompatible database change may require restoring from a backup.
Step 1. Record the old container settings
Open the old CT in Proxmox and record its settings.
Resources — CPU, RAM, Swap, and Root Disk size.
Network — bridge, IPv4/IPv6, VLAN, MAC address, and Proxmox Firewall status.
DNS — DNS servers.
Options — whether the container is privileged or unprivileged.
Under Resources, find the entries containing:
mp=/storage— the volume with recordings and user data;mp=/cf— the volume with the configuration.
Record their identifiers. They are usually mp0 and mp1, but the order may differ.
Step 2. Create backups
MikoPBX backup
Open Modules → Module marketplace.

Make sure the Backup module is installed and enabled.
Open the module and click Create backup copy.

Create the archive and download it to the administrator's computer or external storage.

Proxmox backup
In Proxmox, open the old container (CT) → Backup and click Backup now.

Select external or separate backup storage. Start the backup and wait for the TASK OK message.

Step 3. Download the new LXC template
Open the MikoPBX releases page.
Find the required version and copy the link to the file whose name ends with
lxc.tar.gz.

In Proxmox, select the local storage → CT Templates and click Download from URL.

Paste the link into the URL field and click Query URL. Verify the file name and click Download.

Wait for the TASK OK message.

Step 4. Create a new container
Click Create CT in the upper-right corner of Proxmox.
General
Select the same Proxmox node that hosts the old CT:
Specify a new CT ID. Do not use the ID of the old container.
Enter a different name, such as
mikopbx-update-test.Set Unprivileged container to the same value as on the old CT.
Click Next.

Template
Select the downloaded lxc.tar.gz template for the new version and click Next.

Disks
Create a new Root Disk (rootfs). Select suitable storage and set the system disk size to 1 GB.
Click Next.

CPU and Memory
Specify the same number of CPU cores and the same Memory and Swap values as on the old container.

Network
Reproduce the network settings of the old CT. For testing, we recommend using an available temporary IP address and a new MAC address to avoid a conflict with the old container.
If DHCP is used, the new CT may obtain a different address automatically. If the DHCP server reserves the address by MAC address, create a separate reservation for the new MAC address in advance.

DNS and Confirm
Reproduce the DNS settings of the old CT:
Carefully review the settings on the Confirm page.
Clear the Start after created checkbox. The new container must not be started before /cf and /storage are attached. Click Finish and wait for the TASK OK message.
Open the new CT → Resources. At this stage, the list must contain the new Root Disk, but it must not contain /cf or /storage mount points.

Step 5. Reassign the /storage disk
Open the old CT → Resources. Select the Mount Point entry whose settings contain
mp=/storage. Click Volume Action → Reassign Owner.

In the Target field, select the new CT. Leave Mount Point selected in the Add as field. Proxmox suggests an available mount point number, such as
mp0. Make sure the selected number is not already in use.
Click Reassign Volume.

After the operation, the volume disappears from the old CT's Resources section and appears under the new CT. Proxmox changes the volume owner and, if necessary, renames it for the new CT ID. The contents of the disk are neither copied nor formatted.
Step 6. Reassign the /cf disk
Repeat the same procedure for the Mount Point whose settings contain mp=/cf:
Open the old CT → Resources. Select the Mount Point entry whose settings contain
mp=/cf. Click Volume Action → Reassign Owner.

Select the new CT. Leave Add as → Mount Point selected. Choose the next available number, such as
mp1, and click Reassign Volume.

Open the new CT → Resources and check the final configuration:
Root Disk belongs to the new CT;
one Mount Point contains
mp=/storage;the other Mount Point contains
mp=/cf;the
/storageand/cfsizes match the sizes of the old volumes.
The mp0 and mp1 numbers may be in a different order. The mp=/storage and mp=/cf paths are what matter.

Step 7. Perform the first boot
Select the new CT and click Start. Open the Console tab.

Wait for MikoPBX to finish booting and display the web interface address.

Open this address in a browser and sign in with the previous MikoPBX login and password.

Step 8. Switch to the production IP address
If the new CT received the previous production IP address immediately, skip this step.
If a temporary address was used for testing:
Stop the new CT.
Make sure once again that the old CT is stopped.
Open the new CT → Network and select the
net0interface.Enter the previous MikoPBX IPv4/IPv6 address.
If the address is reserved on the DHCP server, move the reservation to the new MAC address or assign the old MAC address to the new CT.
Check the bridge, VLAN, gateway, and Proxmox Firewall settings.
If necessary, switch external NAT, DNS, and firewall rules to the new address.
Start the new CT.
The same IP or MAC address may be used only when the old container is completely stopped.
Verification after the update
Do not delete the old CT until all checks have been completed.
Verify in the web interface that the new MikoPBX version is displayed.
Check the extensions, SIP accounts, providers, and inbound and outbound routes.
Open Telephony → Call history and make sure the previous call history is available.
Play several old call recordings from different dates.
Check the installed modules, their licenses, and settings.
Make sure the phones and providers are registered or have the expected status.
Make an internal, outbound, and inbound test call.
Check that the new call appears in the history and that its recording can be played.
Reboot the new CT through Proxmox.
After the reboot, check the web interface, network, registrations, and a test call again.
Roll back to the old container
If the new version does not work correctly:
Stop the new CT.
Under its Resources, select the
/storageMount Point.Select Volume Action → Reassign Owner and return the volume to the old CT.
Return the
/cfvolume to the old CT in the same way.Verify that
mp=/storageandmp=/cfare present on the old CT again.Restore the old IP, MAC, DNS, and NAT settings.
Start the old CT and verify its operation.
The new version may have changed the database structure on /cf. Returning the volumes therefore does not guarantee compatibility with the old MikoPBX version. If the old CT does not start correctly, restore it from the Proxmox backup or restore the settings from the MikoPBX archive created before the update.
Completing the update
Keep the old CT stopped and retain the backups for several days. Delete the old container only after:
the new version has been running reliably;
inbound and outbound calls have been tested;
new call recordings are created and can be played;
MikoPBX has rebooted successfully;
a new backup of the updated PBX has been created.
Before deleting the old CT, open its Resources once more and make sure that /cf and /storage have actually been reassigned to the new container. The old Root Disk can then be deleted together with the old CT.
With this update method, years of call recordings remain on the original /storage disk. The switchover time does not depend on the volume of recordings because Proxmox changes the volume owner instead of copying its contents.
Last updated
Was this helpful?

