badon Posted March 20, 2014 Report Share Posted March 20, 2014 (edited) I'm able to run BTSync with this: ./btsync But when I try this: ./btsync --config btsync.conf It does not run, but instead gives me this message: To use BitTorrent Sync you should specify shared directories in config file or enable Web UI or API, or enable built-in tracker This is what my config file looks like:{ "device_name": "My Sync Device", "listening_port" : 0, // 0 - randomize port/* storage_path dir contains auxilliary app files if no storage_path field: .sync dir created in the directory where binary is located. otherwise user-defined directory will be used*/// "storage_path" : "/home/user/.sync",// uncomment next line if you want to set location of pid file// "pid_file" : "/var/run/btsync/btsync.pid", "check_for_updates" : true, "use_upnp" : true, // use UPnP for port mapping/* limits in kB/s 0 - no limit*/ "download_limit" : 0, "upload_limit" : 0,/* remove "listen" field to disable WebUI remove "login" and "password" fields to disable credentials check*/ "webui" : { // "listen" : "0.0.0.0:8888", "login" : "admin", "password" : "password" }/* !!! if you set shared folders in config file WebUI will be DISABLED !!! shared directories specified in config file override the folders previously added from WebUI.*//* , "shared_folders" : [ {// use --generate-secret in command line to create new secret "secret" : "33_RANDOM_ALPHANUMERIC_CHARACTERS", // * required field "dir" : "/usr/home/someuser", // * required field// use relay server when direct connection fails "use_relay_server" : true, "use_tracker" : true, "use_dht" : false, "search_lan" : true,// enable SyncArchive to store files deleted on remote devices "use_sync_trash" : true,// specify hosts to attempt connection without additional search "known_hosts" : [ "192.168.1.2:44444" ] } ]*/// Advanced preferences can be added to config file.// Info is available in BitTorrent Sync User Guide.}As you can see above, the webui is disabled because I don't want the hassle of trying to get it to work securely with HTTPS on a remote system. Everything looks configure correctly as far as I can tell. I did a diff with WinMerge and I see that a lot of trailing whitespace was deleted in my text editor, but that shouldn't matter, right? Other than that, I have no idea why BTSync is rejecting this config file. I've tried running it like this, to get some more clues with a log: ./btsync --config btsync.conf --log btsync.log But no log file is generated, and there's no specific information about what isn't working. Ideas? Edited March 20, 2014 by badon Quote Link to comment Share on other sites More sharing options...
denis4inet Posted March 24, 2014 Report Share Posted March 24, 2014 (edited) Dear badon, Due to error message you need specify shared folder/folders in configuration file. Try this config:{ "device_name": "FreeBSD BtSync", "listening_port" : 0, // 0 - randomize port/* storage_path dir contains auxilliary app files if no storage_path field: .sync dir created in the directory where binary is located. otherwise user-defined directory will be used*/// "storage_path" : "/home/user/.sync",// uncomment next line if you want to set location of pid file// "pid_file" : "/var/run/btsync/btsync.pid", "check_for_updates" : true, "use_upnp" : true, // use UPnP for port mapping/* limits in kB/s 0 - no limit*/ "download_limit" : 0, "upload_limit" : 0,/* remove "listen" field to disable WebUI remove "login" and "password" fields to disable credentials check*/ "webui" : { // "listen" : "0.0.0.0:8888", "login" : "admin", "password" : "password" } , "shared_folders" : [ { // use --generate-secret in command line to create new secret "secret" : "AENBFDU4C3TRJGNXWBYSBMDCLEPSESAPO", // * required field "dir" : "/home/", // * required field "use_relay_server" : true, // use relay server when direct connection fails "use_tracker" : true, "use_dht" : false, "search_lan" : true, "use_sync_trash" : true // enable SyncArchive to store files deleted on remote devices } ]} And change "dir" : "/home/",to path to desired folder. I uncommented array "shared_folders" in your JSON configuration file. Edited March 24, 2014 by denis4inet Quote Link to comment Share on other sites More sharing options...
badon Posted March 25, 2014 Author Report Share Posted March 25, 2014 I didn't notice that the entire shared_folders section was commented out of the config file by default. I turned on syntax highlighting in my text editor and I could see it clearly then. I seem to have it working now. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.