How to install Bittorrent sync 1.1.40 on Debian Linux?


Recommended Posts

At first: thanks to the cool software BitTorrent sync (at the moment release 1.1.40) you provide here, It runs under windows 7, 8 and Server 2008 R2.

But how can I sync my folders via a hosted Linux server, too? I would like to run Bittorrent Sync 1.1.40 on Linux. My system is as follows (and I describe the steps I did):

cat /proc/version

Linux version 2.6.26-2-xen-686 (Debian 2.6.26-27) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Wed Sep 21 09:56:47 UTC 2011

ldd --version

ldd (Debian EGLIBC 2.11.3-4) 2.11.3

Copyright © 2009 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Written by Roland McGrath and Ulrich Drepper.

I copied the package btsync_i386.tar.gz to the path

/home/www/doc/16737/myserver.de/www/bts/btsync_i386.tar.gz

then I uncompressed it:

tar xfvz btsync_i386.tar.gz

then I built the example file sync.conf:

./btsync --dump-sample-config > sync.conf

I edited the file sync.conf as follows:

{

"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",

"storage_path" : "/home/www/doc/16737/myserver.de/www/bts/.sync",

// uncomment next line if you want to set location of pid file

// "pid_file" : "/var/run/btsync/btsync.pid",

"pid_file" : "/home/www/doc/16737/myserver.de/www/bts/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" : "MY_SECRET_1", // * required field

"dir" : "/home/user/bittorrent/sync_test", // * required field

// use relay server when direct connection fails

"use_relay_server" : true,

"use_tracker" : true,

"use_dht" : false,

"search_lan" : true,

// enable sync trash 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.

}

I started the program with

./btsync --config sync.conf

I got

By using this application, you agree to our Privacy Policy and Terms.

http://www.bittorren...m/legal/privacy

http://www.bittorren...al/terms-of-use

BitTorrent Sync forked to background. pid = 23909

The program runs

ps aux |grep btsync

46456 19412 0.0 0.1 49464 1968 ? Ssl 11:49 0:02 ./btsync --config sync.conf

46456 23909 0.0 0.1 41016 1964 ? Ssl 12:36 0:00 ./btsync --config sync.conf

46456 24107 0.0 0.0 5020 764 pts/0 R+ 12:38 0:00 grep btsync

I made a directory "Austausch" to sync my files:

/home/www/doc/16737/myserver.de/www/Austausch/

I found the folder .sync with webui.zip and unzipped it in

/home/www/doc/16737/myserver.de/www/bts/

I called the index.html

/home/www/doc/16737/myserver.de/www/bts/index.html via http://myserver.de/bts/index.html

and got lost. I cannot add a folder or generate a secret or do something else. The website doesn't work as expected.

What do I have to do to get the software sync with my folders on Windows (installed: 1.1.40 and run propper) with that in the folder

/home/www/doc/16737/myserver.de/www/Austausch/

?

Many thanks to any help (perhaps there is a more detailed documentation?)

-merlinuwe

Link to comment
Share on other sites

When you have defined shared folders in the config file supplied with --config you the web UI is disabled. So you need to add another stanza for the second folder similar to what you have with/home/user/bittorrent/sync_test

Careful with the syntax, it goes a little like this:


"shared_folders" :
[
{
"secret" : "Secret1",
"dir" : "/dir1",
"use_relay_server" : true,
"use_tracker" : true,
"use_dht" : false,
"search_lan" : true,
"use_sync_trash" : true
}
,
{
"secret" : "Secret2",
"dir" : "/dir2",
"use_relay_server" : true,
"use_tracker" : true,
"use_dht" : false,
"search_lan" : true,
"use_sync_trash" : true
}
,
{
"secret" : "Secret3",
"dir" : "/dir3",
"use_relay_server" : true,
"use_tracker" : true,
"use_dht" : false,
"search_lan" : true,
"use_sync_trash" : true
}
]

Link to comment
Share on other sites

You don't have to unzip the webui, you can access it like that:

http://192.168.42.15:8888/gui/

replace the IP by yours. Every settings and shared folders can be edited from the webui.

This should work no matter what your IP is:

http://localhost:8888/gui/

But, as I said, it won't work if you have shared_folders defined in config file...

Link to comment
Share on other sites

Thanks for your help.

I edited the sync.conf as follows (and deleted the comment-signs /* */):

,

"shared_folders" :

[

{

// use --generate-secret in command line to create new secret

"secret" : "AxyxxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxxyxyyxyxyxyxyxU", // * required field (this is not the original secret)

"dir" : "/home/www/doc/16737/myserver.de/www/Austausch", // * required field

// use relay server when direct connection fails

"use_relay_server" : true,

"use_tracker" : true,

"use_dht" : false,

"search_lan" : true,

// enable sync trash 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.

}

Then I killed the process with

kill -9 processid

and startet again with

./btsync --config sync.conf

But nothing is synced between the Webserver and my local Bittorent sync.I added new files on the webserver to the directory "Austausch" and on my notebook. The sync is only between the Windows Laptop and the server 2008R2 but not from or to the Webserver with Linux.

Any idea? Perhaps anything else in my sync.conf is wrong?

-merlinuwe

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.