Skip to content

Installing to Servers

Note: Depending on using license key or license file, please see the related manuals! In licensing point of view, there is no differrence between a server and a desktop application. The only differrences come from in the hosting and operation. This page serves only additional information of those manuals

If the licenses are installed later, when a web application is already running, it is not necessary to restart the web server (e.g. Tomcat), the License Manager will automatically and repeatedly check if a license file was installed in the meanwhile.

Hosting servers with Docker

Generally, if you run the application in a Docker container, you should attach the license as follows. This applies regardless of whether you use Docker Compose or build and run the image directly from a Dockerfile.

with license file

If you have license file then mount that to $HOME/.chemaxon

If the license file is changed, you can replace the old license file with the new one (using the same name) in your local filesystem, without having to rebuild the image.

Examples

docker run --name marvin -d \
-v /home/user/license.cxl:$HOME/.chemaxon/license.cxl \
-p 8080:8080 chemaxon.jfrog.io/cxn-docker-release/chemaxon/marvinws
version: "3.8"

services:
  app:
    image: chemaxon.jfrog.io/cxn-docker-release/chemaxon/marvinws
    environment:
    volumes:
      - ./license.lic:$HOME/.chemaxon/license.cxl

with license key

If you have a license key it's enough to inject your license key with CHEMAXON_LICENSE_SERVER_KEY as environment variable.

If the license key value should be changed (e.g. because of rotation of the license key), rebuild of the image is needed with the new CHEMAXON_LICENSE_SERVER_KEY. Otherwise, runtime can be kept untouched. App communicates with license server automatically, meaning any change in the underlying license will be reflected in the app, after the next license server communication round.

Examples

docker run --name marvin -d \
-e CHEMAXON_LICENSE_SERVER_KEY="your-license-key-here" \
-p 8080:8080 chemaxon.jfrog.io/cxn-docker-release/chemaxon/marvinws
version: "3.8"

services:
  app:
    image: chemaxon.jfrog.io/cxn-docker-release/chemaxon/marvinws
    environment:
      - CHEMAXON_LICENSE_SERVER_KEY=your-license-key-here

However, each application may have its own instructions, so please check those as well.

Hosting servers with Kubernetes

using a license key

To license the application, the CHEMAXON_LICENSE_SERVER_KEY environment variable must be supplied at runtime, ideally using a secret. If the license key value should be changed (e.g. because of rotation of the license key), re-applying it might be needed. Otherwise, the configuration during runtime can be kept untouched. App communicates with license server automatically, meaning any change in the underlying license will be reflected in the app after the next license server interaction.

apiVersion: v1
kind: Pod
metadata:
  name: mypod
spec:
  containers:
    - name: mypod
      image: chemaxon-application
      env:
        - name: CHEMAXON_LICENSE_SERVER_KEY
          valueFrom:
            secretKeyRef:
              name: licensekey
              key: license_server_key

using a license file

In Kubernetes, administrators have the option to use the secrets API. You can use a license file, which can be mounted as a volume. Chemaxon products use $CHEMAXON_HOME to store temporary files, not just license files, so using a mounted secret can cause read only file system errors. It is recommended that administrators use a combination of secret volumes and the environment variable $CHEMAXON_LICENSE_URL.

# An example podspec that assumes that a license file was added as
# kubectl create secret generic licensefile --from-file=license.cxl
apiVersion: v1
kind: Pod
metadata:
  name: mypod
spec:
  containers:
  - name: mypod
    image: chemaxon-application
    # The full path depends on the file added as a secret
    env:
      - name: CHEMAXON_LICENSE_URL
        value: "/run/secrets/license/license.cxl"
    volumeMounts:
    - name: licensefile
      mountPath: "/run/secrets/license/"
      readOnly: true
  volumes:
  - name: licensefile
    secret:
      secretName: licensefile

For Windows server administrators:

In some setups, when a Chemaxon product runs as a Windows service under the SYSTEM profile, environment variables may still not be visible to the application, even after you configure them correctly. In this case our license check falls back to search the license in C:\Windows\System32\config\systemprofile\chemaxon\ folder, which is the user home of the System Profile. In this folder you can place a license.cxl file or create a licenses folder and copy all your .cxl files here, as described in point number 2. above.