Use a shared folder with Time Machine on Mac
You can set up a shared folder on a Mac that other Mac computers can use as a Time Machine backup destination. The folder must be located on an Apple File System (APFS) volume and shared using the SMB protocol.
Set up a shared Time Machine backup folder
On your Mac, choose Apple menu > System Preferences, then click Sharing.
Select the File Sharing tickbox.
Click Options, make sure “Share files and folders using SMB” is selected, then click Done.
Click the Add button at the bottom of the Shared Folders list.
Navigate to and select the folder you want to use for sharing, then click Add.
Control-click the name of the folder, then choose Advanced Options.
Make sure SMB is selected in the “Share over” pop-up menu.
Important: You can’t use Apple Filing Protocol (AFP) to share a Time Machine backup destination.
Select “Share as a Time Machine backup destination”.
If desired, select “Limit backups to”, then enter a size.