Running the Nexus IQ Server as a Service on Windows


This knowledge base article provides instructions for running the Nexus IQ Server as a service under Windows using a free edition of Java Service Wrapper.  If you want to run the Nexus IQ Server as a service on Linux please see our installation guide.

New Nexus IQ Server Install as a Windows Service

  1. Ensure you have already installed the latest JDK from Oracle on the target system and the system meets our other system requirements.
  2. Download and extract the file attached to this article into a directory path that does not contain spaces.
  3. Replace the extracted conf/config.yml with the config.yml file from current Nexus IQ server installation (be sure to check the "sonatypeWork" property in the copied version to make sure it is correct).
  4. Copy the nexus-iq-server-<version>.jar file from your installation into the "lib" directory.
    • There should only be one jar file - the IQ server versioned jar file you intend to start the server with - in the lib directory at any given time.
    • Do not copy the nexus-iq-cli-<version>.jar file into the lib directory. That is the command line scanner, and it cannot be on the class path of IQ Server.
    • Do not leave any old nexus-iq-server-<version>.jar file in the lib directory. This will cause class conflicts and may damage your instance.
  5. The service will run as the SYSTEM user. IQ server requires use of a temporary directory to perform some work.

    The SYSTEM user will use "%systemroot%\System32\config\systemprofile\Temp" as it's temporary directory.

    On some versions of Windows this directory does not exist by default. Make sure that this directory exists. Create it manually if it does not.
  6. Using an administrative user, run ".\bin\clm install".
  7. Using an administrative user, run ".\bin\clm start" to start the windows service, or start it through the services UI.
  8. Verify that on restarting the host, that the application will successfully restart itself.

Changing the Java Executable Used to Launch IQ Server

To explicitly specify the path to the java.exe executable to use to launch IQ Server, instead of just relying on the location in the JAVA_HOME environment variable:

  1. Edit ./bin/jsw/conf/wrapper.conf
  2. Find the uncommented line containing and change its value to include the absolute path the java executable, using forward slashes as path separators even on Windows.
    See Java Service Wrapper documentation.

Editing Java Program Arguments Used to Lauch IQ Server

You may want to edit the Java.exe arguments used when IQ Server is launched. These are not parameters to IQ Server, but rather parameters for the Java Virtual Machine. 

To change arguments passed to the java.exe program launching IQ Server:

  1. Edit ./bin/jsw/conf/wrapper.conf
  2. Find the references to<n> properties - add or remove lines with new properties according to the java service wrapper documentation.

Example: Configure a custom outbound truststore

In order to override the default Java truststore IQ Server uses:

  1. Edit ./bin/jsw/conf/wrapper.conf
  2. Specify<n> properties defining the trustStore and its password. Make sure all paths specified use forward slashes, even on windows and if the value requires a space, then the entire value must be in quotes.<replace_with_absolute_full_path>/nexus-iq-server-outbound.jks


Have more questions? Submit a request


Article is closed for comments.