How do I enable spotlight to index my NAS on OSX 12.3.1?

2.7k Views Asked by At

I have a QNAP TS-431XeU. I'd like to have spotlight index my network attached storage. How do I do this?

1

There are 1 best solutions below

0
On

I'll memorialize the answer for myself, as I was unsatisfied with my google-fu on this.

  1. Enable AFP and DHX2 authentication support on your NAS. If you don't, when you run these steps, you'll get an error.

    • On my QNAP, this is Control Panel --> win/mac/nfs/webdav --> apple networking--> check the boxes.
  2. Enable and broadcast AFP over Bonjour.

    • On my QNAP, this is Control panel --> service discovery --> bonjour --> check AFP
  3. Mount your NAS.

    • Go to Network --> find your NAS. Mount the one with AFP in the name. N.b., that it may not say, but just remember to mount the one you enabled AFP for.
  4. Go to your local mac from which you want to add the NAS to spotlight, pop open the terminal, and turn on the spotlight index on the drive with mdutil, where the name in {} is the name of your NAS.

    • sudo mdutil /Volumes/{yourNASwAFP}/ -i on
  5. Make sure that it remounts on restart.

    • System Preferences --> Users & Groups --> Login Items --> '+' and add the volume you want to mount at login. I am not sure if this will login/mount correctly if you change wifi SSIDs, but likely not.

The indexing will take a while. If you want to check that something is working, pop open spotlight with 'Command' + 'spacebar'. Type, literally anything. It should show an indexing progress bar. Depending on the size of your drive and file structure, it may take a long, long, time.

~E