Unifi Protect archiving to Unraid NAS

Unifi Protect supports exporting or archiving recordings to different network and cloud services. One of them is using a SMB share. At home I use Unraid as my network storage, so naturally I wanted to use it for these recordings too.

I created an Unraid user named unifiprotect, and a share in Unraid, named recordings:

After this I tried to connect to the share using unifiprotect user and password:

But no luck. After resetting the password and making sure that everything was spelled correct, I had to enable SMB logging on my Unraid server. To do this you have to stop the array and add the following under Settings -> SMB -> SMB Extra:

[global]
log level = 3

I then tried to connect again, and tail the samba log under /var/log/samba/log.smbd

Notice how it says "Forcing Primary Group to 'Domain Users' for unifiprotect? That's not good, when it also says "mapped user is: [WORKGROUP]\[unifiprotect].. And sure enough, under Settings -> SMB in Unraid, the workgroup is set to WORKGROUP. Adding this to my connection in Unifi Protect immediately fixed the issue:

Now I'm able to export clips, and also enable the new Continuous Archiving feature in Unifi Protect:

That's all! Remember to disable SMB logging again when you're done.

Read more