Here is a copy/paste of my own current documentation:
Hikvision cameras recording: save to NAS and MicroSD
To save cameras directly to NAS, first the NAS must be configured, then the cameras. To save to MicroSD, only the last 3 steps are needed. One needs only the last 2 steps plus the NAS program configuration.
I have used the same method for saving to QNAP TS-253A and to Asustor NAS. Here is the QNAP described. I have made my cameras save to folders at USB3 disk connected to my router, but that should never be done in normal usage as it is quite likely this data will get lost.
As for the NAS It is possible to a) make cameras record directly to the NAS folders or b) use QNAP Surveillance Station to both record and review recording. The same applies to any NAS.
Method b) is both better and simpler. One can watch camera recordings on a TVs connected to the QNAP or any computer using any Web browser and also one can watch all the recordings directly on a TV using RPi and Kodi.
Method a) should be used only for cameras over the QNAP 4 free licence limit. HikVision (quite limited) program must be used to watch recordings on a computer.
How to (for both NAS and MicroSD cards)
1. Basically for any NAS or network (remote) disk: Create folders for each camera using the NAS software. Create new users for each of the cameras and assign disk Quota to them. Any NAS must be able to assign User Quota or else it is a gorified external hard drive. This is part of Unix for probably last 50 years. Procedure will differ. but terms will be more or less the same. Since the procedure forces creation of a root folder, to minimise the mess, I use the last segment of the network address in front of the camera name as that User Home folder.
1.1. on QNAP, one must first activate Quotas: Users -> Privilege settings -> Quota -> Enable Quota for all users 100 GB (you can adjust the default quota fore each user independnetly later).
1.2. Add Users: create the user 21Vrata with e.g. 100 or 30 gb quota. I assign 30 GB for cameras with small traffic or smaller fps, and 100 GB for larger needs for 2+ week recordings. Adjust Shared Folder Permission and/or Quota if needed. I do not allow this user access to any other folder than its own.
1.2.1. That should create a home folder 21Vrata if you have default Users -> Home Folder -> Enable turned on. It will likely be in /home or /homes and you may have to adjust a bit some of next steps.
1.2.2. When Home folder automatic creation is turned off: Users -> Privilege settings -> Shared Folders and Create a folder name /21Vrata and edit its Configure access privileges for users to give the user 21Vrata RW rights to this folder and click Create.
Then we switch to the camera Remote conifguraiton (I use iVMS Lite).
2.1. Storage -> NAS: Server address: 192.168.2.5 (adjust as needed), File path: \21Vrata (take care: enter / and not \). Mounting -> SMB/CIFS, enter username (21Vrata from my example) and password you gave to this user. Button Test shows if all is good. If not, Fix it before continuing. If good, click Save.
Note: the camera is called 21Vrata, its User and the root folder, too. This way things are simpler. I have the same password for all cameras. Cameras should be secured with a restrictive firewall on the router (both incoming and outgoing!), so you should not fear their firmware.
2.2. Storage -> General -> Update - click it (several times if needed). When it shows the assigned user quota under Capacity, it will work perfectly. If it shows entire (NAS) hard drive capacity (2713 GB for my system), it will not work (unless the entire disk is used only for this camera). Fix it before continuing!
Note: to save recordings to MicroSD, only the following steps are needed.
2.3. Select (the square in front of) your disk, adjust Quota ratio for Recording and Pictures (I set 100% and 0% respectively; change it for at least 1%!). If using MivcroSD, do the same for MicroSD cards. Then click Format. In few minutes, done. Click Save. If Quota ratio for Recording and Pictures reverted to 75:25 - it will not work. If status is Unformatted, it will not work. Fix it before continuing!
3. On camera, activate alarming. Event -> Motion Detection -> Enable Motion Detection and Enable Dynamic Analysis for Motion and set Sensitivity (trial and error method). There is more precise way for Motion detection if Configuration is changed to Expert. Notify Surveillance Center and Trigger Channel are both of use here but with different functions, click them both. Or set Other Alarm: PIR if you have it..
4. Activate Recording. If using Web interface, it is below Motion settings. In iVMS: Event -> Schedule. Activate it (click Local Recordings on iVMS), and make sure it is set to Alarm Template (not blue All Day Template). Under Advanced Settings, adjust pre and post recording as needed. Lots of differences visually between Web GUI and iVMS. Check Local Recording to save to MicroSD. Click Save.
Note: on my cameras, I was not able to save anything other than the Motion Detected and PIR alarm. Other modes can only send e-mails with pictures. Web interface -> configuration: where a file will be saved when copied from the camera