Some of the dependencies required for Document Server correct work are not included into Ubuntu 14.04 by default, so they require additional steps for the newer versions of Document Server.
The following dependencies will be installed automatically if you use Ubuntu 14.04 LTS or later when you update Document Server (in case some of them were not installed with Document Server earlier versions for some reason):
Earlier distributions might require their manual installation.
If you want to update version 4.1, you will need to manually add the repository containing the proper nodejs package version (this action is not required when updating version 4.2).
curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
Ubuntu distributions prior to 14.04 LTS might require some other dependencies to be installed.
Installing new version of Document Server
sudo apt-get update
And install the latest version of Document Server:
sudo apt-get dist-upgrade
The database and all necessary files should be picked up automatically from the previous version. Please run Document Server and check it for correct work.