diff --git a/index.sh b/index.sh
index b5c90f8..0c778d1 100755
--- a/index.sh
+++ b/index.sh
@@ -1,11 +1,14 @@
#!/usr/bin/env bash
+
+HOSTNAME=${1:-localhost}
+
if [ ! -f ./tmdb_solr.json ]; then
unzip tmdb_solr.json.zip
fi
# delete (or wipe) the tmdb index and reindex
-curl http://localhost:8983/solr/tmdb/update --data '*:*' -H 'Content-type:text/xml; charset=utf-8'
+curl "http://$HOSTNAME:8983/solr/tmdb/update" --data '*:*' -H 'Content-type:text/xml; charset=utf-8'
-curl http://localhost:8983/solr/tmdb/update --data '' -H 'Content-type:text/xml; charset=utf-8'
+curl "http://$HOSTNAME:8983/solr/tmdb/update" --data '' -H 'Content-type:text/xml; charset=utf-8'
-curl 'http://localhost:8983/solr/tmdb/update?commit=true' --data-binary @tmdb_solr.json -H 'Content-type:application/json'
+curl "http://$HOSTNAME:8983/solr/tmdb/update?commit=true" --data-binary @tmdb_solr.json -H 'Content-type:application/json'