Run solr 8 on localhost only

Last updated on: Published by: Systems Librarian 0

It is a bad practice to expose your solr instance to the public, your data could be manipulated or worse, deleted. Apart from blocking solr’s port 8983 using the firewall, it is also good practice to run solr on localhost only if the service that consumes solr services is running on the same host, eg dspace. This guide is a record of how you can run solr 8.x on localhost:8983

To ensure that Solr 8.x runs on localhost:8983 only on Ubuntu 22.04, you need to configure Solr to bind specifically to the loopback interface (localhost). Here are the steps to achieve this:

Download solr

wget -c

Extract the archive

tar xzf solr-8.11.3.tgz

cd to the extracted directory

cd solr-8.11.3

Install solr

./bin/ solr-8.11.3.tgz

Edit the file /etc/default/ and add SOLR_OPTS="$SOLR_OPTS"

Restart solr

systemctl restart solr

Related posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.