- Joined
- Mar 27, 2018
- Messages
- 2
- Reaction score
- 1
The information in this post is available elsewhere in the forums but I could not find a single document that set out the steps for upgrading an AWS Lightsail V18 installation to V20 that was relatively risk free and, in the end, relatively simple, so thought it would be useful for others, particularly as there is the potential to be locked out after an upgrade.
We needed to create a new AWS Lightsail instance that met the V20 hardware requirements but even if your current instance is enough, the process set out below creates a new Lightsail instance. As such you do not need to do an in-place upgrade and so have the old instance as a fall back. Also the 3cx process creates a new instance, so you do not need to create one yourself in Lightsail and then install 3cx etc.
Of course you could take a snapshot of your current lightsail instance, create a new instance and upload the snapshot to the new instance and turn off the old one, but that has risks, could result in delays in the ‘new’ install becoming functional (more later) and does not give you a nice new clean install.
Do not disassociate the licence from the current Fully Qualified Domain Name (FQDN), e.g. mycompany.3cx.com.au.
Before proceeding we made and downloaded 2 backups of our live installation, one full one with the licence information and everything else and the other without. The one without does not need to have any of the optional data such as voicemail and call recordings as it is only used for testing and education. The full backup with the licence information and everything else can be made later if, for instance, you test one day and upgrade the next.
We already had set multiple users as ‘system owner’ in V18 and were on update 9. However, to ensure there were no issues with logging into V20 and also so we could become familiar with V20 and work out what we needed to change, we obtained the 2 month trial licence from 3cx at https://portal.3cx.com/login. We obtained a V18 (not V20) Pro licence. There is a reason for getting the V18 licence, explained later.
To obtain the trial licence click ‘add system’ and then ‘install’ and follow the sequence. Note “install” is a separate link from ‘switch to hosted’ (as opposed to a single 'switch to hosted install' link, which does put you off a bit) and you can do this 'install' process multiple times if need be.
see https://www.3cx.com/docs/manual/installing-debian-linux-pbx/ for the various steps etc. of the installation process.
We spun up a local virtual machine and installed using the 3cx Debian iso, downloaded from a link on one of the install pages.
We used Virtualbox and when creating a machine you select your install iso and select ‘skip unattended installation’. Make sure you set the hardware requirements to be enough for V20.
As part of the installation process (step 5 of link above) you can restore from a backup.
Upload the V18 backup with no licence info and when prompted use the trial licence information. Do not use the live licence.
This was so that when the test VM is running it is not trying to use the same FQDN as the live installation. A V20 installation did not accept a V18 backup with no licence information. We did not try with live licence information in case that messed with our live installation.
In the past 3cx delayed a change in a 3cx IP address rippling through by 6 hours for all except Enterprise licences. Don’t know if that still applies. Keep this in mind and consider making the actual changeover on the night of last working day of the week so you have all weekend if you need to revert. This is also why using a snapshot onto a new instance may cause issues as the FQDN will initially point to the old (turned off) instance.
All configuration and users etc. are restored.
Check you can log in to the test and then upgrade the test installation to V20. Check you can log into the V20 test installation. If so, when you upgrade the live installation to V20 you should be able to log in.
Our SIP trunks are register/account based and so registered ok. We disabled one of the trunks on the live installation and set up an iPhone with an account on the test installation. This merely required, in the iPhone 3cx app, scanning the QR code on the user’s page in the 3cx admin section. We made sure we could make and receive calls on that trunk.
Note adding an account to an iPhone app connected to a V20 installation overwrites the existing account, rather than adding the account. This may be an issue for those who have multiple accounts on a single iPhone in V18. Something for 3cx to think about.
When finished revert the iPhone back to the live account and enable the live trunk.
Do not bother changing settings in the test installation such as those for departments etc. that are needed for V20, other than for educational purposes.
In V20 as at May 2024 there is no option for a V20 backup to exclude the licence information. We learnt this the hard way after making modifications to the test installation, with the intention of making a V20 backup without the licence information and restoring that to a new machine, so that we would not be making changes on a running live installation. Since you cannot exclude licence information, if you restore using a backup of the test installation the ‘new’ installation is tied to your trial licence. Maybe something for 3CX to think about.
Because you will need to make changes on a live installation it is a good idea to make and document all necessary changes in the test installation so you can go through and make those changes easily and methodically on the V20 live installation.
Apart from testing login is OK and educating yourself about what changes you need to make about V20 there is no further need for the test installation.
Back at the 3cx portal we selected our live installation system and selected ‘install’ and then selected V20 and ‘Amazon LightSail’ as the platform and followed the instructions.
See https://www.3cx.com/docs/amazon-lightsail/ and at step 3, Option 2
Upload the full backup of the live installation with the live licence information and FQDN.
At some point it asks if you need a custom port (5001). If necessary change to whatever you are currently using.
After step 7 and before step 8, go to AWS and stop the current instance. When it has stopped, go back to the 3cx portal, proceed at 8 and give the proposed (new) Lightsail installation a different name to the live instance.
Proceed and when it has finished Lightsail should show both the old (stopped) and the new (running) instances.
The new instance has a new fixed IPV4 address.
Log into the V20 3cx install using the live FQDN, e.g. https://mycompany.3cx.com.au:5001/#/login.
You may need to wait a few minutes whilst the association of the new IP address with the FQDN ripples through the internet’s DNS’s.
All SIP trunks, phones and devices, including SBC’s and phone behind any SBC’s were connected.
Make any changes you need regarding departments etc.
If it does not work, you still have your old instance to fall back on, in which case, stop the new instance and restart the old one. Maybe wait 6 hours for the old IP address to become re-associated with the FQDN.
A stopped instance on AWS incurs charges so as soon as you are happy with the new installation detach the fixed IPV4 address from the old instance and then delete the old instance. Deleting the instance before detaching the fixed ip address may leave you being charged for that IP address. Depending on the paranoia level you may want to take a snapshot before deletion. Note that the 3cx install to AWS process above only installs V20 so you cannot use it to restore a V18 installation.
We needed to create a new AWS Lightsail instance that met the V20 hardware requirements but even if your current instance is enough, the process set out below creates a new Lightsail instance. As such you do not need to do an in-place upgrade and so have the old instance as a fall back. Also the 3cx process creates a new instance, so you do not need to create one yourself in Lightsail and then install 3cx etc.
Of course you could take a snapshot of your current lightsail instance, create a new instance and upload the snapshot to the new instance and turn off the old one, but that has risks, could result in delays in the ‘new’ install becoming functional (more later) and does not give you a nice new clean install.
Do not disassociate the licence from the current Fully Qualified Domain Name (FQDN), e.g. mycompany.3cx.com.au.
Before proceeding we made and downloaded 2 backups of our live installation, one full one with the licence information and everything else and the other without. The one without does not need to have any of the optional data such as voicemail and call recordings as it is only used for testing and education. The full backup with the licence information and everything else can be made later if, for instance, you test one day and upgrade the next.
We already had set multiple users as ‘system owner’ in V18 and were on update 9. However, to ensure there were no issues with logging into V20 and also so we could become familiar with V20 and work out what we needed to change, we obtained the 2 month trial licence from 3cx at https://portal.3cx.com/login. We obtained a V18 (not V20) Pro licence. There is a reason for getting the V18 licence, explained later.
To obtain the trial licence click ‘add system’ and then ‘install’ and follow the sequence. Note “install” is a separate link from ‘switch to hosted’ (as opposed to a single 'switch to hosted install' link, which does put you off a bit) and you can do this 'install' process multiple times if need be.
see https://www.3cx.com/docs/manual/installing-debian-linux-pbx/ for the various steps etc. of the installation process.
We spun up a local virtual machine and installed using the 3cx Debian iso, downloaded from a link on one of the install pages.
We used Virtualbox and when creating a machine you select your install iso and select ‘skip unattended installation’. Make sure you set the hardware requirements to be enough for V20.
As part of the installation process (step 5 of link above) you can restore from a backup.
Upload the V18 backup with no licence info and when prompted use the trial licence information. Do not use the live licence.
This was so that when the test VM is running it is not trying to use the same FQDN as the live installation. A V20 installation did not accept a V18 backup with no licence information. We did not try with live licence information in case that messed with our live installation.
In the past 3cx delayed a change in a 3cx IP address rippling through by 6 hours for all except Enterprise licences. Don’t know if that still applies. Keep this in mind and consider making the actual changeover on the night of last working day of the week so you have all weekend if you need to revert. This is also why using a snapshot onto a new instance may cause issues as the FQDN will initially point to the old (turned off) instance.
All configuration and users etc. are restored.
Check you can log in to the test and then upgrade the test installation to V20. Check you can log into the V20 test installation. If so, when you upgrade the live installation to V20 you should be able to log in.
Our SIP trunks are register/account based and so registered ok. We disabled one of the trunks on the live installation and set up an iPhone with an account on the test installation. This merely required, in the iPhone 3cx app, scanning the QR code on the user’s page in the 3cx admin section. We made sure we could make and receive calls on that trunk.
Note adding an account to an iPhone app connected to a V20 installation overwrites the existing account, rather than adding the account. This may be an issue for those who have multiple accounts on a single iPhone in V18. Something for 3cx to think about.
When finished revert the iPhone back to the live account and enable the live trunk.
Do not bother changing settings in the test installation such as those for departments etc. that are needed for V20, other than for educational purposes.
In V20 as at May 2024 there is no option for a V20 backup to exclude the licence information. We learnt this the hard way after making modifications to the test installation, with the intention of making a V20 backup without the licence information and restoring that to a new machine, so that we would not be making changes on a running live installation. Since you cannot exclude licence information, if you restore using a backup of the test installation the ‘new’ installation is tied to your trial licence. Maybe something for 3CX to think about.
Because you will need to make changes on a live installation it is a good idea to make and document all necessary changes in the test installation so you can go through and make those changes easily and methodically on the V20 live installation.
Apart from testing login is OK and educating yourself about what changes you need to make about V20 there is no further need for the test installation.
Back at the 3cx portal we selected our live installation system and selected ‘install’ and then selected V20 and ‘Amazon LightSail’ as the platform and followed the instructions.
See https://www.3cx.com/docs/amazon-lightsail/ and at step 3, Option 2
Upload the full backup of the live installation with the live licence information and FQDN.
At some point it asks if you need a custom port (5001). If necessary change to whatever you are currently using.
After step 7 and before step 8, go to AWS and stop the current instance. When it has stopped, go back to the 3cx portal, proceed at 8 and give the proposed (new) Lightsail installation a different name to the live instance.
Proceed and when it has finished Lightsail should show both the old (stopped) and the new (running) instances.
The new instance has a new fixed IPV4 address.
Log into the V20 3cx install using the live FQDN, e.g. https://mycompany.3cx.com.au:5001/#/login.
You may need to wait a few minutes whilst the association of the new IP address with the FQDN ripples through the internet’s DNS’s.
All SIP trunks, phones and devices, including SBC’s and phone behind any SBC’s were connected.
Make any changes you need regarding departments etc.
If it does not work, you still have your old instance to fall back on, in which case, stop the new instance and restart the old one. Maybe wait 6 hours for the old IP address to become re-associated with the FQDN.
A stopped instance on AWS incurs charges so as soon as you are happy with the new installation detach the fixed IPV4 address from the old instance and then delete the old instance. Deleting the instance before detaching the fixed ip address may leave you being charged for that IP address. Depending on the paranoia level you may want to take a snapshot before deletion. Note that the 3cx install to AWS process above only installs V20 so you cannot use it to restore a V18 installation.

