You should read this :
https://www.orthanc-server.com/resources/2015-02-09-emsy-tutorial/index.html, as well as the general overview supplied in the Orthanc Book at
https://book.orthanc-server.com/Even if it's an old tutorial, it still applies (although if you are not using Windows, things will be slightly different)
In addition to this tutorial, before starting Orthanc, you should open the Configuration.json file and edit the value corresponding to the "StorageDirectory" key and point it to a folder on your NAS that you should have created beforehand to store the Dicom files.
If you do not do this, the files will be stored in the default location on your local disk.
Let us know how it goes