delegatevoid Posted November 15, 2013 Report Share Posted November 15, 2013 Hi, I've copied the content of the example config and modified the storage_path and api_key properties.I've placed it in the same directory as btsync.exe as btsync.conf { "storage_path" : "./", "use_gui" : false, "webui" : { "listen" : "127.0.0.1:8888", "login" : "api", "password" : "secret", "api_key" : "thesecretapikeythatwehavetosharewitheveryone" }}Of course on my system the api_key corresponds with my own secret api key as received by mail. I then try to launch it from the command like like so:btsync.exe /config btsync.confBut that simply starts btsync like it does normally, with the GUI enabled and the web interface disabledor at least not using the settings as specified in the config file. I have tried various values for storage_path such as: .//p:\btsyncapip:/btsyncapip:\btsyncapi\p:/btsyncapi/And btsyncapi is an empty folder on my 'p' drive, so it does exist. So apparently it btsync seems to ignore the config file and I cannot find any indicationof what's going on in the logs, there is no feedback of any kind. Can someone tell me what I'm doing wrong? System: Windows 8.1 Quote Link to comment Share on other sites More sharing options...
Davidkim Posted November 15, 2013 Report Share Posted November 15, 2013 writen text to C:\Program Files (x86)\BitTorrent Sync\sync.conf -->{ "storage_path" : "/Users/Administrator/AppData/Roaming/BitTorrent Sync", ;// config folder...... "use_gui" : true, ;// false is not GUI mode , true is viewing GUI "webui" : { "listen" : "192.168.10.3:8888", ;// real ip and port "login" : "api", "password" : "secret", "api_key" : "your get e-mail api key" }}---> dos command here C:\Program Files (x86)\BitTorrent Sync>btsync.exe /config sync.conf Enter acess http://your ip:port/api?.....api code writen ie explorer.....accessssss can.. ie 9 is receive code download is api.js... it's api.js type JSON code.... Quote Link to comment Share on other sites More sharing options...
delegatevoid Posted November 15, 2013 Author Report Share Posted November 15, 2013 Hi,That doesn't help me. I've done the exact same thing, but btsync still ignores the config file.For example, I told it not to use a GUI and it does. Also it starts the web server but not with username api/secretbut the default username and password instead. To give you an idea, this is the console/cmd session: E:\Program Files (x86)\BitTorrent Sync>dir Volume in drive E is Program Files Volume Serial Number is 3212-2BC0 Directory of E:\Program Files (x86)\BitTorrent Sync15/11/2013 10:36 <DIR> .15/11/2013 10:36 <DIR> ..31/10/2013 13:12 1 538 920 BTSync.exe15/11/2013 10:33 823 sync.conf 2 File(s) 1 539 743 bytes 2 Dir(s) 400 937 422 848 bytes freeE:\Program Files (x86)\BitTorrent Sync>BTSync.exe /config sync.confE:\Program Files (x86)\BitTorrent Sync>At this point btsync starts, it just doesn't use my config file. Quote Link to comment Share on other sites More sharing options...
Davidkim Posted November 15, 2013 Report Share Posted November 15, 2013 Hi,That doesn't help me. I've done the exact same thing, but btsync still ignores the config file.For example, I told it not to use a GUI and it does. Also it starts the web server but not with username api/secretbut the default username and password instead. To give you an idea, this is the console/cmd session: E:\Program Files (x86)\BitTorrent Sync>dir Volume in drive E is Program Files Volume Serial Number is 3212-2BC0 Directory of E:\Program Files (x86)\BitTorrent Sync15/11/2013 10:36 <DIR> .15/11/2013 10:36 <DIR> ..31/10/2013 13:12 1 538 920 BTSync.exe15/11/2013 10:33 823 sync.conf 2 File(s) 1 539 743 bytes 2 Dir(s) 400 937 422 848 bytes freeE:\Program Files (x86)\BitTorrent Sync>BTSync.exe /config sync.confE:\Program Files (x86)\BitTorrent Sync>At this point btsync starts, it just doesn't use my config file. i'm BTSync to install path : [C:\Program Files (x86)\BitTorrent Sync] install folder list is => BTSync.exe sync.conf config folder path : [ C:\Users\Administrator\AppData\Roaming\BitTorrent Sync] config folder list is => 3DB4B735419B366C322FD10F9817A42973B6091D.db 4DA35176F4656AAAE65F016B52321F4ADA2C8FC6.db 4DA35176F4656AAAE65F016B52321F4ADA2C8FC6.db-shm 4DA35176F4656AAAE65F016B52321F4ADA2C8FC6.db-wal 5793E20B1A00F7AA3685D0DC08EC6A5DC64C697A.db 5793E20B1A00F7AA3685D0DC08EC6A5DC64C697A.db-shm 5793E20B1A00F7AA3685D0DC08EC6A5DC64C697A.db-wal Cache debug.txt settings.dat settings.dat.old sync.dat sync.dat.old sync.lng sync.log sync.pid ie using writen text to [ http://api:secret@192.168.10.3:8888/api?method=get_folders ] Result JSON to { "device_name","MSDN-SPECIAL" "disk_low_priority",1 "download_limit",0 "folder_rescan_interval","600" "lan_encrypt_data",1 "lan_use_tcp",0 "lang",4294967295 "listening_port",49056 "max_file_size_diff_for_patching","1000" "max_file_size_for_versioning","1000" "rate_limit_local_peers",0 "recv_buf_size","5" "send_buf_size","5" "sync_max_time_diff","600" "sync_trash_ttl","30" "upload_limit",0 "use_upnp",1 } http://api:secret@192.168.10.3:8888/api?method=get_folders&secret writen to.. Result [ { "dir","\\\\?\\D:\\adobe" "error",0 "files",7 "indexing",0 "secret","ATGIABCDEFFFF~~~~~~FP4D" "size",361715533 "type","read_write" } { "dir","\\\\?\\d:\\sync_test" "error",0 "files",7451 "indexing",0 "secret","ACUYJ7ABCDEF~~~~~XJNNNK" "size",337319623 "type","read_write" }] sync.conf is----------------------{ "storage_path" : "/Users/Administrator/AppData/Roaming/BitTorrent Sync", "use_gui" : true, ;< ===debug only "webui" : { "listen" : "192.168.10.3:8888", "login" : "api", "password" : "secret", "api_key" : "my api key" }}-------you......writen text [;] is not using..too ex) ;< ===debug only it's text delete .......save Administrator is your login propile folder do you make config folder is ?????? what? Quote Link to comment Share on other sites More sharing options...
Davidkim Posted November 15, 2013 Report Share Posted November 15, 2013 Hi,That doesn't help me. I've done the exact same thing, but btsync still ignores the config file.For example, I told it not to use a GUI and it does. Also it starts the web server but not with username api/secretbut the default username and password instead. To give you an idea, this is the console/cmd session: E:\Program Files (x86)\BitTorrent Sync>dir Volume in drive E is Program Files Volume Serial Number is 3212-2BC0 Directory of E:\Program Files (x86)\BitTorrent Sync15/11/2013 10:36 <DIR> .15/11/2013 10:36 <DIR> ..31/10/2013 13:12 1 538 920 BTSync.exe15/11/2013 10:33 823 sync.conf 2 File(s) 1 539 743 bytes 2 Dir(s) 400 937 422 848 bytes freeE:\Program Files (x86)\BitTorrent Sync>BTSync.exe /config sync.confE:\Program Files (x86)\BitTorrent Sync>At this point btsync starts, it just doesn't use my config file. ............."use_gui" : false, ;< ===debug only"webui" : {[false] set is not using BTSync GUIview can Taskmgr.exe listing on BTSync.exe not view icon/tray......only access web ui..tooooooo.... "use_gui" : true"webui" : {[true] set is can GUI / webui access.... Quote Link to comment Share on other sites More sharing options...
Davidkim Posted November 15, 2013 Report Share Posted November 15, 2013 ah....i'm using Windows 7 64bit...... Quote Link to comment Share on other sites More sharing options...
peterradics Posted November 15, 2013 Report Share Posted November 15, 2013 On Windows XP 32 bit, i can run btsync with this config:{ "storage_path" : "D://btsync_api/", "use_gui" : false, "webui" : { "listen" : "127.0.0.1:7878", "login" : "login", "password" : "passwd", "api_key" : "yourapikey" }}Command line:btsync.exe /config btsync_api.confI'm using version 1.2.68. I used "d:\btsync_api" as "storage_path" but not worked, but with "d://btsync_api" now works perfectly. Quote Link to comment Share on other sites More sharing options...
delegatevoid Posted November 15, 2013 Author Report Share Posted November 15, 2013 Hi, So it turned out I was using an older version and the auto update and manual update features didn't work.I manually installed a newer version and after playing with the storage_path variable a bit I got it working. That settings seems to be a fragile point. Either way, if the BTSync devs are reading this, when the config fileis invalid the application really should dump some information in the log file or provide some feedback on the command line. I'm also wondering, have not tried, will do so later, if it's possible to run multiple instances (with their own storage_path)otherwise if you integrate your software with btsync nobody else can do so on the same computer. Of course at this time, distributing your app is impossible anyway because it requires you redistribute the API keyin plain text. Thnx for the help everyone! Quote Link to comment Share on other sites More sharing options...
avladev Posted November 15, 2013 Report Share Posted November 15, 2013 You can run multiple instances. But they have to be in different storage_path Quote Link to comment Share on other sites More sharing options...
Johnny2Shoes Posted November 15, 2013 Report Share Posted November 15, 2013 Has anyone had any luck running this on Windows 8? Seems like no combination of settings is going to get this API to start. I've followed all the advice above.... Sync.conf is in C:\Users\steve_000\AppData\Roaming\BitTorrent Sync - I've tried setting storage path to that location as well as just a folder in the root directory... I'm thinking I need to run a VM locally running Win 7 or something to get this to work... I echo the previous sentiment - a little logging would take all the guess work out of this... { // path to folder where Sync will store its internal data, // folder must exist on disk "storage_path" : "C:\TestVersion\", // run Sync in GUI-less mode "use_gui" : false, "webui" : { // IP address and port to access HTTP API "listen" : "127.0.0.1:8888", // login and password for HTTP basic authentication // authentication is optional, but it's recommended to use some // secret values unique for each Sync installation "login" : "api", "password" : "secret", // replace xxx with API key received from BitTorrent "api_key" : "My key" }} Quote Link to comment Share on other sites More sharing options...
delegatevoid Posted November 16, 2013 Author Report Share Posted November 16, 2013 @Johnny2Shoes: I got it working on Windows 8.1, so I'm guessing it'll work on 8.0 as well. I did find that using anything other than the 'working directory' as the storage_path fails. The following configuration works for me: { // path to folder where Sync will store its internal data, // folder must exist on disk"storage_path" : "./", // run Sync in GUI-less mode "use_gui" : true, "webui" : { // IP address and port to access HTTP API "listen" : "127.0.0.1:8888", // login and password for HTTP basic authentication // authentication is optional, but it's recommended to use some // secret values unique for each Sync installation "login" : "api", "password" : "secret", // replace xxx with API key received from BitTorrent "api_key" : "" }}The key here is "storage_path" : "./"This will create the storage path in the same directory as the btsync executable, which is probably not a bad thingsince this will be your application directory if you integrate it with your own software. This will also prevent storage_path collisions with other instances of btsync on the computer. Quote Link to comment Share on other sites More sharing options...
Johnny2Shoes Posted November 16, 2013 Report Share Posted November 16, 2013 @delegatevoid: Thanks for the tip - I'm actually running 8.1 as well - Glad someone else has actually got it to work... Where do you put your sync.conf file though? I've got it in Program Files next to the BTSync.exe but no go... Quote Link to comment Share on other sites More sharing options...
Johnny2Shoes Posted November 16, 2013 Report Share Posted November 16, 2013 AHHHHHHHHHHHHHHHHHHHHHH Same problem as you had @delegatevoid... Client version was out of date with Autoupdate reporting as latest. Quote Link to comment Share on other sites More sharing options...
Noel Hibbard Posted November 18, 2013 Report Share Posted November 18, 2013 This worked for me on Win8.1x64. { "storage_path" : "c:/BTSync", "use_gui" : true, "webui" : { "listen" : "127.0.0.1:8888", "login" : "<someusername>", "password" : "<somepassword>", "api_key" : "<someAPIkey>" }}Then save this file in this path (path and filename are important):"%UserProfile%\AppData\Roaming\BitTorrent Sync\sync.conf" Then launch BTSync without any command line options. Quote Link to comment Share on other sites More sharing options...
Elradon Posted January 27, 2014 Report Share Posted January 27, 2014 Hey, "storage_path" : "C:/BTSync" works, while "storage_path" : "C:\BTSync" is not working. So its just about using slash or backslash. Quote Link to comment Share on other sites More sharing options...
Davidkim Posted February 5, 2014 Report Share Posted February 5, 2014 BTSync is Windows 7 64bit on C:\Program Files (x86)\BitTorrent Sync\BTSync.exe remote modewrite conf file... run BTSync.exe /config btsync.conf Quote Link to comment Share on other sites More sharing options...
delegatevoid Posted February 6, 2014 Author Report Share Posted February 6, 2014 You can simply copy the btsync executable anywhere you want and set "storage_path" : "./"This will create the storage path in the same folder as the btsync executable,wherever on your system you have placed it. This is what I use to 'embed' btsync in my own application in order to provide a custom UI. If you are going to build anything on top of btsync you don't want to hardcode the path anyway Quote Link to comment Share on other sites More sharing options...
RomanZ Posted March 26, 2014 Report Share Posted March 26, 2014 ryechz, It is okay to use the Linux sample config in windows, with one little trick. You have to use backslashes in the files and folders paths. And as config file is stored in JSON format, you have to escape backslashes with double backslahses as they are the control character. So the sample path to c:\temp\mystorage should be written as "C:\\temp\\mystorage" in config for windows. Also, there is a known issue which worsens usage of config files on Windows: Win version of BTSync does not display error messages to the console while parsing the config file. Please try correcting your paths and let me know if it helps. Quote Link to comment Share on other sites More sharing options...
GreatMarko Posted April 1, 2014 Report Share Posted April 1, 2014 I cannot set any of the following: "use_relay_server""use_tracker""use_dht""search_lan""use_sync_trash""known_hosts"Whereabouts in your config file are you setting these? - remember they are per folder settings, not global settings. Quote Link to comment Share on other sites More sharing options...
matador84 Posted May 2, 2014 Report Share Posted May 2, 2014 On Windows you have to save the config file for the btsync.exe in ANSI Format. Otherwise btsync.exe will ignore your config file without any comment. 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.