Step 0: Enable SSH password login for root on TrueNAS. This is a huge security risk, so only do this if the system is completely firewalled from the open internet, and if there is no mission-critical data on the NAS.
First off, you will need a host running docker. Maybe eventually I will figure out a way to run this all natively, but that time is not now.
Create a folder each for your elasticsearch data and fscrawler configuration. They are labeled $ES_DATA
and $FSCRAWL_CONFIG
in this write-up.
Next you will need an fscrawler configuration file. This file will be placed at $FSCRAWL_CONFIG/$JOBNAME/_settings.yaml
. I have included an example below, but you will need to fill in the details for your own system. I disabled the index_content
settings to reduce space usage, but that can be changed for your own usage. You can also enable PDF OCR if desired.
Now deploy the docker-compose file below with the details filled in for your environment. Once deployed you should be able to run docker-compose logs -f fscrawler
and see that it has started indexing.
Finally, add the auxiliary parameters to Services/SMB -> Auxiliary Parameters
and add spotlight = yes
to each Samba share individually.