Use a shared folder with Time Machine
You can set up a shared folder on your 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
Choose Apple menu > System Preferences, then click Sharing.
Select the File Sharing checkbox.
Click Options, then make sure “Share files and folders using SMB” is selected.
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.