Time Machine to NAS, over internet
Synology does have this walk-through for doing what you want to do.

I will mention that (quite some time ago) I used a Synology NAS as a time-machine target disk, and I did get it to work, but found it to be highly error-prone. Not what you want in a backup. Also slow. I'm using a drive with a direct USB3 connection now and am much, much happier with that.