LabKey Server ships with a script for upgrading a LabKey Server running on Linux and OSX, or other UNIX-style operating systems. This script, named, can be used to upgrade your LabKey Server to the latest version.

How to Use this script

Type "" with no parameters in a console window for help on the script's parameters.

The script provides a number of command-line options. The command-line options -l, -d, and -c are required.

Usage: -l dir [-d dir] [-c dir] [-u tomcatuser] [--service|--systemctl|--catalina]

-l dir: LABKEY_HOME directory to be upgraded. This directory contains the
labkeywebapp, modules, pipeline-lib, etc directories for the existing
LabKey Server instance. (Required)

-d dir: Upgrade distribution directory: contains labkeywebapp, lib, and
(default: current working directory)

-c dir: CATALINA_HOME; root of LabKey Apache Tomcat installation.

-u owner: the tomcat user account (default: current user)

--noPrompt: do not require the user to hit enter before proceeding with the install

(Web server startup/shutdown method: select one)
--service: use /etc/init.d/tomcat (default)
--systemctl: use /bin/systemctl
--catalina: use CATALINA_HOME/bin/ and CATALINA_HOME/bin/


For this example, we will assume the following:

  • LABKEY_HOME directory: /usr/local/labkey/labkey
  • Upgrade distribution directory: /usr/local/labkey/src/labkey/LabKey18.1-58484.70-community-bin
  • CATALINA_HOME directory: /usr/local/labkey/apps/apache-tomcat-8.5.34
  • Owner: tomcat
Using these assumptions, the upgrade command would be
cd /usr/local/labkey/src/labkey/LabKey18.1-58484.70-community-bin

sudo sh -l /usr/local/labkey/labkey -d /usr/local/labkey/src/labkey/LabKey18.1-58484.70-community-bin -c /usr/local/labkey/apps/apache-tomcat-8.5.34 -u tomcat --systemctl

Substitute your actual values.

Additional Notes

Rollback to the Previous Version

This script does not keep a backup copy of the LabKey Server java files after the upgrade. In order to install a previous version, you will need to have the LabKey Server distribution files for that previous version available on your file system.

You can then simply execute the script again specifying the previous version's directory containing the uncompressed LabKey Server distribution files

Note: this will not roll back any database upgrades that have occurred and may put your server into a bad state

Backup of LabKey Server Database

This script does not perform a backup of your LabKey Server database.

LabKey recommends that you perform a backup of your LabKey Server database before upgrading your LabKey Server using this script. Learn about backup in these topics:


Was this content helpful?

Log in or register an account to provide feedback

expand all collapse all