Sitecore – Run SOLR as a Service

Solr is a version which has been derived from Lucene. A brief introduction to Solr is that it makes use of a single server where all indexes are rebuild. If you decide to use Solr with Sitecore, you will need to setup the Solr server.

In this blog post, I will explain the different steps to setup the Solr server and how to run it as a service. The main reason is that, whenever you restart your machine, you need to have Solr to start running in order for your Sitecore instance to work.

So, please follow the below steps in order to install the Solr server.

Step 1

Install Java Runtime Environment if you do not have it. You may check the following link:

Step 2

Add a system environment variable called JAVA_HOME that points to your java installation:

  • Variable Name: JAVA_HOME
  • Variable Value (set as necessary): C:\Program Files (x86)\Java\jre1.8.0_77

Step 3

Install the NSSM. You may download it from its official website at . Set the directory to “C:/nssm” or the directory of your choice.

Step 4

Create and unzip your Solr Package ( into C:/solr

NOTE: Remove any intermediary folders to avoid a folder structure like “C:/solr/solr-5.4.1/server”. This should now be a valid path on your file system: “C:/solr/server”.

Step 5

Open Powershell and use NSSM to set Solr up as a service as follows:

Use either 64 or 32 bit version according to your computer:

cd C:\nssm\win64
./nssm install SOLR

Step 6

The NSSM Service Installer application window will open.  Set the following values:

  • Path: C:\solr\bin\solr.cmd
  • Startup Directory: C:\solr\bin
  • Arguments: start -f -p 8983
  • Display Name: SOLR {solr-version here}
  • Description: C:\solr\bin\solr.cmd start -f -p 8983
  • Startup type: Automatic

Step 7

Open your services and start the newly created Solr {solr-version} service.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s