Skip to main content

Set License Key for Java RESTful Engine in Docker Container

There are three ways you can pass the license key to the Java RESTful Engine on the container:

  1. Set the license environment variable when starting the container

  2. Passing the license key as a header with your requests

    • You can use the header X-WINDWARD-LICENSE to pass the license with your POST requests
  3. Setting the license in the config using Vim. This requires a few more steps, but you don't have to worry about including the license in the header:

    1. Install Vim:

      • In the command line for the container, run
      apt-get update
      apt-get install vim
    2. Edit the WindwardReports.properties file using Vim

      • Locate the WindwardReports.properties file on the container by running the following command:
      cd /usr/local/tomcat/webapps/ROOT/WEB-INF/classes
      • In there you will find the properties file. To edit it, run:
      vim WindwardReports.properties
      • This should open the properties file in Vim:

      • To enter "Insert" mode in Vim, click i :

      • Navigate to the license using the arrow keys, and delete the "[[LICENSE]]", and replace it with your own license.

      • Once you have set your license, press the escape key, then :x to save and quit Vim.

      • Lastly, restart your container by stopping it and starting it again. You now have setup your license key in the properties file.

  1. Now just restart the container using the restart button in Docker Container:

And now youre done! Your container should be running with the license key loaded in!

NOTE: In newer versions of Docker Desktop you can edit the file directly in the UI: