Help Center


Launching Sync on Mac without user logged in


Sync is standard OS X application and it always starts up when user logs in, under current user account. If you want to launch it automatically when no user is logged in, you'll need to use launchd framework to force your Mac loading Sync even before user logs in.

Warning. Running Sync as described below requires a knowledge of POSIX permissions of your Mac and may result in non-functioning Sync. Do not proceed with this article unless you are confident you can manage POSIX permissions yourself. You'll also need root permissions to allow launchd running Sync.

This instruction proposes you to create a new user on your Mac, and Sync will run under this user account. Due to specific umask setting it'll create all files with rw- permissions for the group, which will allow all users to access content delivered by Sync. Although, you need to ensure that new files that you create inside synced folders will also get the rw- permissions for the group - otherwise Sync will stop syncing these files.

  1. Install Sync normally. Ensure it is not in launch items for your current user account.
  2. Create a resiliosync user in your Mac's System Preferences. Ensure it has password.
  3. Switch to resiliosync user
  4. Create the folder "~/Library/Application Support/Resilio Sync". Create the config file "myconf.json" there. Here is a sample config file (you can see more details on configuration files here). When creating config file, use some plain text editor. Don't use TextEdit, Pages or alike as they tend to create it in RTF and rend config unusable.
    {
     "device_name": "My Headless Mac",
     "storage_path" : "/Users/resiliosync/Library/Application Support/Resilio Sync/",
     "use_gui" : false,
     "use_upnp" : true,
     "webui" :
     {
       "listen" : "0.0.0.0:8888",
       "login" : "admin",
       "password" : "password"
     }
    }
  5. Switch back to your admin user. Now create the launchd configuration file "/Library/LaunchDaemons/com.resilio.sync.plist". You'll need root permissions to do it. Again, use plain text editor only. Put the next content inside:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "–//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.resilio.sync</string>
    <key>ProgramArguments</key>
    <array>
    <string>/Applications/Resilio Sync.app/Contents/MacOS/Resilio Sync</string>
    <string>--config</string>
    <string>/Users/resiliosync/Library/Application Support/Resilio Sync/myconf.json</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>UserName</key>
    <string>resiliosync</string>
    <key>Umask</key>
    <integer>2</integer>
    </dict>
    </plist>
  6. Open terminal window and start Sync with "sudo launchctl load -w /Library/LaunchDaemons/com.resilio.sync.plist" command

From now on, Sync will start with OS X and does not require user to get logged in. You can access your Sync UI thru the web browser, just type http://<your_mac_ip>:8888 in navigation line.

 

Was the article helpful? Yes / No, send feedback on article Thanks!


Please note that we won't mail you back. This is just purely feedback on the article above. If you need help from our Support Team, please use the "Contact Support" link at the top of the page.