Page Contents

OMERO

Downloads
Feature List
Licensing

Previous topic

Grid configuration

Next topic

Configuration properties glossary

This Page

Note

This documentation is for the new OMERO 5.3 version. See the latest OMERO 5.2.x version or the previous versions page to find documentation for the OMERO version you are using if you have not upgraded yet.

Setting the OMERO_HOME environment variable

Warning

OMERO_HOME should be considered strictly internal to OMERO and be reserved for development or “power usage”.

Rationale

OMERO_HOME defines the root deployment directory to be used by OMERO command line tools.

Setting it allows to switch between different versions of applications or libraries during development.

Note

Despite a familiar-sounding name, OMERO_HOME does not denote the server installation directory.

Caveats

As a “power switch”, OMERO_HOME will override the directory layout as detected by the bin/omero family of utilities.

This could cause hard-to-detect problems at runtime. Environments hosting multiple OMERO versions would be particularly prone to such side effects, as illustrated below.

# Installation directory layout:
# /opt
#   +-- OMERO.server-version-4.4.10
#   +-- OMERO.server-version-5.0.0

# OMERO-4 was first installed, and is conveniently referenced through OMERO_HOME
$ echo $OMERO_HOME
> /opt/OMERO.server-version-4.4.10

# Update the configuration for OMERO-4
$ /opt/OMERO.server-version-4.4.10/bin/omero config set omero.db.name 'omero_4_database'
$ /opt/OMERO.server-version-4.4.10/bin/omero config get omero.db.name
> omero_4_database

# Update the configuration for OMERO-5
$ /opt/OMERO.server-version-5.0.0/bin/omero config set omero.db.name 'omero_5_database'
$ /opt/OMERO.server-version-5.0.0/bin/omero config get omero.db.name
> omero_5_database

# Double check the OMERO-4 configuration...
# Using OMERO_HOME has taken precedence over the current directory
# The OMERO-4 server instance has been mistakenly updated to point at
# a version 5 database schema.
# Furthermore, the issue might go unnoticed until the next OMERO-4 restart.
$ /opt/OMERO.server-version-4.4.10/bin/omero config get omero.db.name
> omero_5_database

Recommendations

  • If you are using an environment variable to define the server installation root, choose a different name, as represented by OMERO_PREFIX in this documentation.
  • If you are nevertheless using OMERO_HOME in your local environment, it is worth checking for potentially lingering global definitions (eg. .bashrc, .profile, /etc/profile.d).