Time Machine backups for NAS

Is there a way to have time machine backup straight to my NAS? I don't see a way to select it.
Adding on to Karen's guidance, check to see if your NAS has AFP support. Mine, a QNAP, has a Time Machine backup feature. Enabling Time Machine turns on AFP such that Time Machine sees the volume in Finder that you specify as the TM drive in your NAS.

I should add that I'm backing up my MacBook Air using the setup described above.

Original thread: https://forums.imore.com/threads/time-machine-backups-for-nas.295532/