Page Contents

OMERO

Downloads
Feature List
Licensing

Previous topic

OMERO.server and PostgreSQL

Next topic

OMERO.web WSGI deployment

This Page

OMERO.web deployment

OMERO.web is the web application component of the OMERO platform which allows for the management, visualization (in a fully multi-dimensional image viewer) and annotation of images from a web browser. It also includes OMERO.webadmin for managing users and groups.

OMERO.web is an integral part of the OMERO platform and can be deployed with:

  • WSGI using a WSGI capable web server such as Apache 2.2+ (with mod_wsgi enabled) or nginx and gunicorn,
  • The built-in Django lightweight development server (for testing only; see the OMERO.web deployment for developers page).
  • FastCGI is DEPRECATED as of 5.1.4 and note that support will be removed in 5.2. You can find more information about FastCGI and where to get modules or packages for your distribution on the FastCGI website.

If you need help configuring your firewall rules, see the Server security and firewalls page.

Prerequisites

  • OMERO and its prerequisites (see OMERO.server installation).
  • Python 2 (2.6 or later)
    • Pillow should be available for your distribution
    • Matplotlib should be available for your distribution
  • A WSGI (or FastCGI) capable web server

Deployment

There is a number of good ways to easily deploy OMERO.web. If you have installed Nginx or Apache OMERO can automatically generate a configuration file for your web server, see OMERO.web WSGI deployment (or OMERO.web FastCGI deployment (DEPRECATED)). The location of the file will depend on your system, please refer to your web server’s manual. See Customizing your OMERO.web installation for additional customization options.

Logging in to OMERO.web

Once you have deployed and started the server, you can use your browser to access OMERO.webadmin or the OMERO.webclient:

  • http://your_host/omero OR, for development server: http://localhost:4080
OMERO.webadmin login

OMERO.webadmin login

Note

This starts the server in the foreground. It is your responsibility to place it in the background, if required, and manage its shutdown.

OMERO.web Maintenance

  • Session cookies omero.web.session_expire_at_browser_close:

    • A boolean that determines whether to expire the session when the user closes their browser. See Django Browser-length sessions vs. persistent sessions documentation for more details. Default: True.

      $ bin/omero config set omero.web.session_expire_at_browser_close "True"
      
    • The age of session cookies, in seconds. Default: 86400.

      $ bin/omero config set omero.web.session_cookie_age 86400
      
  • Session engine:

    • Each session for a logged-in user in OMERO.web is kept in the session store. Stale sessions can cause the store to grow with time. OMERO.web uses by default the OS file system as the session store backend and does not automatically purge stale sessions, see Django file-based session documentation for more details. It is therefore the responsibility of the OMERO administrator to purge the session cache using the provided management command:

      $ bin/omero web clearsessions
      

      It is recommended to call this command on a regular basis, for example as a daily cron job, see Django clearing the session store documentation for more information.

      Note

      OMERO.web offers alternative session backends to automatically delete stale data using the cache session store backend, see Django cached session documentation for more details. After installing all the cache prerequisites set the following:

      $ bin/omero config set omero.web.caches '{"default": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", "LOCATION": "127.0.0.1:11211", "TIMEOUT": "86400" } }'
      $ bin/omero config set omero.web.session_engine django.contrib.sessions.backends.cache
      

Note

The generated Nginx and Apache configuration files will automatically display a maintenance page if an attempt is made to access OMERO.web whilst it is not running.

Customizing your OMERO.web installation

By default OMERO.web expects to be run from the root URL of the web server. This can be changed by setting omero.web.prefix and omero.web.static_url. For example, to make OMERO.web appear at http://example.org/omero/:

$ bin/omero config set omero.web.prefix '/omero'
$ bin/omero config set omero.web.static_url '/omero/static/'

and regenerate your web-server configuration (see FastCGI Configuration (Unix/Linux) or WSGI Configuration (Unix/Linux)).

The front-end webserver (Nginx, Apache) can be setup to run on a different host from OMERO.web. You will need to set omero.web.application_server.host to ensure OMERO.web is accessible on an external IP.

All configuration options can be found on various sections of Web developers documentation. For the full list, refer to Web properties or:

$ bin/omero web -h

The most popular configuration options include: