Filemaker published their own sync guide specifically for this purpose:
Also a supplementing KBB article:
There are a number of third party utilities out there that you can pay for to get easy sync integration to your hosted file. Most will handle a full two-way sync like you are looking for, and handle all the things like collision detection and sync tracking.
A simple google search for "filemaker sync" will turn up most third party utilities. Examples include GoZync, MirrorSync, SyncDek, EasySync (open source but no longer supported), RestFMSync.