Run as a Windows Service - Documentation topics on: running as a service,service,startup,windows,.

This documentation is a static copy for this version. For current documentation, see:

Run as a Windows Service

As of version 3, the Tanuki Service Wrapper is no longer included with dotCMS. This allows users to use their own preferred service wrapper more easily.

One example of a Java service wrapper for windows is “Yet Another Java Service Wrapper”, or YAJSW for short. It is an open source project, supports 64 bit java out of the box, and requires no additional costs or licensing fees to use it.

Steps to Install dotCMS Windows Service Using YAJSW

  1. Download the service wrapper (from
  2. Unpack the archive to a folder (e.g. yajsw).
  3. Start dotCMS normally and query the port tomcat is running on to get the pid.
    netstat -aon | findstr "<tomcat_port>"
    • In the above command, the PID is in the rightmost column.
  4. In your yajsw/bat subfolder, execute genConfig.bat <pid>
    • This will generate a default config file based upon the current running parameters of dotCMS.
  5. Edit the generated configuration in conf/wrapper.conf:
    • Change the following values to show the name as dotCMS rather than yajsw
      wrapper.ntservice.description=dotCMS Server
    • If necessary (depending on your configuration), update the values of and
    • If desired, suppress error messages: Some messages are expected during the run of the system and by default the wrapper is configured to send those messages as a notification on screen. You should be able to monitor error messages on the server log files. If you wish to suppress these messages then comment out these lines:
    • Change the location of the wrapper working directory to the Tomcat root folder:
  6. Test your wrapped application as a console application by calling runConsole.bat.
  7. Check that dotCMS is running by logging in to the system.
    • You should get a message on the your desktop as a bubble notification stating that the service is running.
  8. Stop dotCMS by clicking on the wrapper icon.
  9. Run the installService.bat.

At this point dotCMS should appear as part of the Windows services in the Service Management Window. The service may be stopped and started using startService.bat and stopService.bat.

For more information on YAJSW, please see the following: