Back to My Mac was a feature introduced with Mac OS X Leopard (10.5) that uses Wide-Area Bonjour to securely discover services across the Internet and automatically configure ad hoc, on-demand, point-to-point encrypted connections between computers using IPsec. The current version of the feature requires users to have iCloud set up, as well as an Apple ID.
Due to its generality, Back to My Mac can work for many Bonjour-enabled services, not just Screen Sharing (similar to Apple Remote Desktop) and File Sharing. Users must have a router that supports either Universal Plug and Play (UPnP) or NAT Port Mapping Protocol (NAT-PMP) with either of those features enabled in their connected router. It uses UDP port 4500 for point-to-point IPsec connections (which may be mapped to different UDP ports on the public side of a NAT router).[1][2]
As of October 12, 2011, Apple has included Back to My Mac in its iCloud service rather than the previously used MobileMe, thus making it free to use.[3]
On August 9, 2018, Apple updated a support document to note that Back to My Mac would not be part of the macOS Mojave (10.14) release.[4] The support document was updated again on May 31, 2019, to indicate that Back to My Mac services would be discontinued for all other versions of macOS as of July 1, 2019.[5]