MacOS has built-in file sharing via SMB. It also has built-in VNC for graphically administering the server, built-in ssh/sftp, built-in rsync for backup, etc. etc.
I see thank you. I dream to setup something like iCloud but with open source software and hosted at home :) Not sure if there is anything like that out there.