Design Hub install guide

    Design Hub is a NodeJS based application for hypothesis management and molecule design. It includes an HTTP and WebSocket server to serve multiple clients running the embedded web application. Design Hub releases are made available using docker images, and require a PostgreSQL database as well as JChem Microservices on the backend.

    Installation is only required for the server, clients access the web server through the configured host and port.

    Requirements

    • 4 CPU cores
    • 8GB RAM
    • 2GB disk space
    • Docker runtime compatible with docker-ce 18.03 or newer
    • PostgreSQL 12 or newer (e.g. 11, 12, 13 were all tested)
    • JChem Microservices 23.17 or newer - installation guide
    • Marvin JS services 23.17 or newer - installation guide
    • live internet connection to https://hub.chemaxon.com/ during installation

    Client requirements

    • Latest Chrome, Firefox ETS or newer frequent release, Edge 115 or newer, Safari 17 or newer

    Installing Docker

    You need docker-ce 18.03 or newer version to run Design Hub's docker images. Download the installer from https://www.docker.com/ and follow the installation wizard for your operating system. Linux users may install from their mainline repositories if available. To verify a successful installation, open the terminal and type:

    user:~$ docker -v
    Docker version 19.03.8, build afacb8b

    Installing docker-compose

    To simplify network configuration and provide a configuration file suitable for version control, it is recommended that on local docker engines, you use docker-compose and yml files to manage Design Hub. Download the installer from https://docs.docker.com/compose/install/ and follow the install wizard for your operating system. To verify a successful installation, open the terminal and type:

    user:~$ docker-compose -v
    docker-compose version 1.25.5, build 8a1c60f6

    Installing Design Hub

    Now you need to authenticate your docker engine with the Chemaxon download site. The instructions on the download page provide you with the API key used to access the repository. This is required the first time only. If your firewall requires whitelisting hub.chemaxon.com using its IP address, please reach out to us on our support addresses.

    user:~$ echo <encrypted API key> | \
         docker login -u <email address> --password-stdin hub.chemaxon.com

    Choose an application directory where you want to manage configuration details. Once there, you can install the application with:

    user:~$ mkdir app
    user:~$ cd app/
    user:~/app$ docker pull hub.chemaxon.com/cxn-docker-release/chemaxon/dh:latest

    This will download and install the latest version of the application in the app directory. You can find the full list of recently added features and changes in the History of changes document.

    Installing dependencies of Design Hub

    Design Hub has required dependencies, also available as docker images. Please see the Requirements section and follow the installation guide of JChem Microservices and Marvin JS.

    Upgrading to a new version

    You can upgrade Design Hub with the install command, which will fetch the latest version. To install a specific version, append its version number to the package name with the following syntax: dh:21.1.0

    user:~/app$ docker pull hub.chemaxon.com/cxn-docker-release/chemaxon/dh:latest

    This will check and download any fresh Design Hub images, but leave any configuration, persistence intact.

    Configuration

    This application requires a configuration file to be passed as a command line argument. The configuration file holds all the key settings regarding database connectivity, networking, security, persistence, plugins and more.

    The minimum configuration requires port and license attributes to be specified, but a more general sample of the options is below. Note that some values point to files or other services. These should be changed to match your environment - of course you can store your Chemaxon license files or Design Hub plugins anywhere. See below in the spreadsheet for your full list of options:

    {
     "databaseHost": "localhost",
     "databasePort": 5432,
     "databaseUser": "root",
     "databasePassword": "CHANGETHIS",
     "databaseName": "designhub",
     "jchemMicroServices": "http://localhost:8070/",
     "mjsService": "http://localhost:8071/",
     "port": 8888,
     "license": ["./marvin4js-license.cxl", "./license.cxl"],
     "secretKey": "CHANGETHIS",
     "authentication": {
       "internal": {
         "type": "local",
         "label": "Testing domain",
         "accounts": [{
           "username": "demo",
           "password": "demo"
         }]
       }
      }
    }

    In the Configuration Guide you can find a detailed description for options and further customization instructions.

    Volumes

    Volume location Description
    /config This folder stores the configuration file of Design Hub, and the entrypoint script loads config.json file from this location. It is recommended that you mount your config.json and files it may refer to (e.g. certificates) using this folder.
    /license This folder stores Chemaxon license files required by Design Hub and the default configuration loads all *.cxl files from this location. Path to this folder is configured by the ML_LICENSE environment variable, but it is recommended that it's not overwritten.
    /services This folder stores NodeJS plugins, and the default configuration loads all *.js files (corresponding to the supported plugin types) from this location. Path to this folder is configured by the ML_SERVICES_DIRECTORY environment variable, but it is recommended that it's not overwritten.
    /filestore This folder stores file attachments uploaded by users, if the filestoreImplementation configuration option is set to disk (default). Design Hub requires write access to this volume for uid=2584, gid=1597
    /krb5-credential-caches This folder stores kerberos ticket granting tickets of users with an active session, if Kerberos authentication is enabled. Design Hub requires write access to this volume for uid=2584, gid=1597

    Usage:

    user:~$ docker run --rm -it \
            -p 8888:8888 \
            -v `pwd`/license:/license \
            -v `pwd`/config.json:/config/config.json \
            -v `pwd`/services:/services \
            -v `pwd`/filestore:/filestore \
            hub.chemaxon.com/cxn-docker-release/chemaxon/dh:latest

    Starting Design Hub

    Once a basic config file is available, you can start the server with:

    user:~/app$ docker run --rm -it -p 8888:8888 -v `pwd`/config.json:/config/config.json -v `pwd`/license:/license hub.chemaxon.com/cxn-docker-release/chemaxon/dh:latest

    When the application is ready to use, it prints Listening on http://localhost:8888/.

    To stop a running instance, run

    user:~/app$ docker kill -9 <container id>

    Given the IP or hostname of your server and the port set in the configuration, you may now distribute the web interface link to the users of the application.

    Design Hub behind a proxy

    Design Hub uses a persistent websocket connection between each client and the server for messaging. If you deploy the application behind a proxy, you need to make sure the proxy doesn't interfere with websockets. In case of nginx, please review the websocket module’s configuration options.

    In addition, the default payload size of nginx is limited to 1MB which is an insufficient amount to handle typical workflows, raising this is recommended. See the http core module's configuration options for more details.