Upgrading OpenVidu CE deployment


Be careful when upgrading your version of OpenVidu:
  • Never upgrade across multiple major versions: to upgrade from 2.13.0 to 2.15.0, you must first go through 2.14.0.
  • Read carefully the Release Notes of any new version you plan to upgrade. Sometimes there are breaking changes that will require you to update your application.
Instructions below are only suitable for OpenVidu CE >= 2.13.0. Unfortunately upgrading OpenVidu CE to 2.13.0 from any past version will require you to completely wipe out your past version, as the installation procedure has completely changed to a Docker deployment. If you are going to install 2.13.0 in the same machine, make sure to backup any data you want to keep (basically the recordings folder) and uninstall all of OpenVidu services before installing 2.13.0.

Upgrading OpenVidu CE deployment (AWS Cloudformation) 🔗

If you have deployed using Cloudformation we strongly recommend to update by deploying a brandly new OpenVidu Cloudformation template corresponding to the version you want to update.

By deploying a new Cloudformation for each version you update, you can benefit of updated AMIs in your deployment and you can ensure that the upgrading process is not degraded by infrastructure changes that may be applied to the Cloudformation definition.

To do it, you just need to: - Deploy the OpenVidu Cloudformation template of the version you want to deploy. - If you have recordings, move the recording at /opt/openvidu/recordings to the new deployment. - If you have your app deployed next to OpenVidu, move your app to your new deployment.

However, if you don't want to deploy a new Cloudformation, you can follow the next section with instructions to upgrade OpenVidu CE On premises deployments if you wish, but you should know that the upgrading process may have some breaking changes if something in the Cloudformation template has changed between versions.

Upgrading OpenVidu CE deployment (On premises) 🔗

Connect to the server hosting OpenVidu CE through SSH. Log with root permissions and go to OpenVidu installation path, by default /opt/openvidu. From this point, instructions will assume the installation path of OpenVidu CE is /opt/openvidu.

sudo -s
cd /opt/openvidu # Recommended and default installation path

Then you can run the upgrade script with the following command. Change the desired version in the URL: instead of install_openvidu_VERSION.sh use for example install_openvidu_2.29.0.sh

curl https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_openvidu_VERSION.sh | bash -s upgrade

The installation steps will output their progress as they run. If everything goes well, at the end you will see a message with the final instructions to successfully complete the upgrade process:

================================================
Openvidu successfully upgraded to version VERSION
================================================

1. A new file 'docker-compose.yml' has been created with the new OpenVidu VERSION services.

2. The previous file '.env' remains intact, but a new file '.env-VERSION' has been created.
Transfer any configuration you wish to keep in the upgraded version from '.env' to '.env-VERSION'.
When you are OK with it, rename and leave as the only '.env' file of the folder the new '.env-VERSION'.

3. If you were using Openvidu Call application, it has been automatically updated in file
'docker-compose.override.yml'. However, if you were using your own application, a file called
'docker-compose.override.yml-VERSION' has been created with the latest version of Openvidu Call.
If you don't plan to use it you can delete it.

4. Start new version of Openvidu
$ ./openvidu start

If you want to rollback, all the files from the previous installation have been copied to folder '.old-2.28.0'

For further information, check readme.md


Some notes on upgrading OpenVidu CE 🔗

  • The upgrade process will restart all OpenVidu services. That means that all ongoing sessions will be destroyed.
  • Persistent data is preserved when upgrading. This means that all of your recordings will be available in the new version.
  • Old Docker images will take up valuable disk space of your machine. If you don't plan to reuse them again, delete them to reclaim your GBs. docker system prune command is very useful for doing so.
  • Remember to update openvidu-browser library in your clients. Comply version compatibility according to Releases page.
  • In case you have mobile applications: the previous minor version of openvidu-browser is always compatible with the next minor version of openvidu-server. This way you can upgrade your openvidu-server while giving your clients time to update their applications. Applications using the previous and the new version of openvidu-browser can coexist in the new openvidu-server version. For example, if you upgrade openvidu-server to 2.16.0, it will work fine with applications using both openvidu-browser 2.15.0 and 2.16.0. Of course, you must notify your users to update their applications until all of them are using openvidu-browser 2.16.0.