Setup VM with Solr i Azure


Since the solution is using Sitecore my guide is written for Windows users in mind.

I started out by creating an Ubuntu Server instance in Azure.
I added http, https and SSH as Public inbound ports.

  1. Connect to the server using Putty

  2. Install Java on the server

     sudo apt-get install openjdk-8-jre
  3. Download the solr tar file (Find the version that works for you Sitecore version here)

  4. Setup the Virtual Machines firewall

     sudo ufw allow 8983
  5. Unpack the Solr tar file

     tar -vzxf solr-5.5.3.tgz
  6. Unpack the Solr tar file

     cd solr-5.5.3.tgz
     bin/solr start
  7. Setup Azure network settings
    Setting up the Azure network setting as shown here will make the server be available publicly for all the world to see. Consider setting up the appropriate CIDR settings to secure your server

  8. Create a Solr Startup script (

  9. Add the following to the file

cd solr-5.5.3
bin/solr start

  1. Save the file and add execute permission to the script.
    chmod +x
  2. You can test the script simply by using this command
  3. Add the shell script to crontab

crontab -e

Add the script to the file as shown below


When done test that your Solr server is started with the OS by restaring the VM.

As you can see it is not that hard to setup a working Solr server in Azure.

Happy Searching…