Installing Joget as a Windows Service

Setting up Joget as a service allows you to run it continuously in the background, meaning it will always be available without manually opening the application. Ensures quick and reliable access to your Joget application, enhancing the user experience.

The application's optimal performance is ensured by configuring MySQL as a service and making Tomcat dependent on MySQL. This is particularly important if the Joget application relies on MySQL for database operations, as it guarantees that both components are available and running when required.

Installation process

Below are the detailed steps for installing Joget as a service on a Windows system.

  1. Download the desired version of Tomcat from its official site. Click on the Tomcat 9 version to obtain it.
  2. Ensure that you pick the bundle meant for Windows as highlighted below.


    Compatibility with Java
    Ensure that the version of Tomcat matches your version of Java to ensure smooth functionality and avoid compatibility issues.
  3. Extract the content and put it into the Joget's installation directory.
    This article assumes that the Joget installation directory is C:\Joget-DX8\Joget 8.0.5 ENT, and the downloaded version of Apache Tomcat is apache-tomcat-9.0.80. However, these details may vary depending on the specific system configuration and the current Joget and Apache Tomcat versions. Be sure to adjust file paths and versions as necessary during installation.


  4. Copy the jw.war from the existing Tomcat's web apps folder into the new one, i.e., from \apache-tomcat-9.0.76\webapps to \apache-tomcat-9.0.80\webapps.
    Existing code
    set CATALINA_HOME=.\apache-tomcat-9.0.76
    New code
    set CATALINA_HOME=.\apache-tomcat-9.0.80
    Optional
    If you plan to start Joget manually next time, either by running the usual batch file or through the Windows Start Menu, you can make the following modification:
    Update the joget.start file to point to the new Tomcat directory.
  5. Open up \apache-tomcat-9.0.80\bin in your command prompt.
  6. Run service.bat install service_name Tomcat9JogetDX.
    C:\Joget-DX8\Joget 8.0.5 ENT\apache-tomcat-9.0.80\bin>service.bat install service_name Tomcat9JogetDX
    Installing the service 'Tomcat9JogetDX' ...
    Using CATALINA_HOME:    "C:\Joget-DX8\Joget 8.0.5 ENT\apache-tomcat-9.0.80"
    Using CATALINA_BASE:    "C:\Joget-DX8\Joget 8.0.5 ENT\apache-tomcat-9.0.80"
    Using JAVA_HOME:        "C:\Program Files\Java\jdk-11"
    Using JRE_HOME:         "C:\Program Files\Java\jdk-11"
    Using JVM:              "C:\Program Files\Java\jdk-11\bin\server\jvm.dll"
    The service 'Tomcat9JogetDX' has been installed.
  1. Verify the service configuration in Computer Management -> Services.
  2. Return to the \apache-tomcat-9.0.80\bin folder. Then, run the command tomcat9w.exe //ES/Tomcat9JogetDX from the command prompt.

 

  1. Go to the Log On tab. Note that the default value Local Service does not provide sufficient permissions to run Joget.
  2. Change this value by selecting a local system or user account to run the service. For more information, see Java -Tomcat Logging While running as a windows service
  3. Go to the Logging tab. Verify that the Log path is pointing to the correct location. By default, it should point to the logs folder of the current Tomcat installation.
  4. Select the desired level of logging from the Level drop-down list.

 

  1. Go to the Java tab.
  2. Change the Java Virtual Machine file path to the one in the image below.
  3. Append the following lines in the Java Options field.
    -Dwflow.home=C:\Joget-DX8\Joget 8.0.5 ENT\wflow
    -javaagent:C:\Joget-DX8\Joget 8.0.5 ENT\wflow\aspectjweaver-1.9.7.jar
    -javaagent:C:\Joget-DX8\Joget 8.0.5 ENT\wflow\glowroot\glowroot.jar

This is to define the wflow home folder from where Joget will run. At the same time, configure the maximum memory pool accordingly (i.e., 1024).

  1. Go to the Startup tab.
  2. Set the Working Path to your Joget's installation folder.
  3. Set the Mode to Java.
  4. Repeat the same steps for the Shutdown tab.

 

Now, you can start Joget as a service on your system.

After successfully adding Tomcat as a service, you may also consider adding MySQL. This can be beneficial if your application relies on MySQL for its database operations. Additionally, you can configure Tomcat to depend on MySQL, ensuring that Tomcat starts only after MySQL runs.

For instructions on how to install MySQL as a Windows service and add it as a dependency to the Tomcat service, see the Apache Tomcat 9 - Windows service HOW-TO guide.

Created by Julieth Last modified by Aadrian on Dec 13, 2024