68

I am in Ubuntu 12.04 (precise) 64bit and downloaded the btsync executable from http://labs.bittorrent.com/experiments/sync/ but running it doesn't seem to have any effect. Double-clicking the executable does nothing, and running ./btsync in the terminal also exits immediately without any output.

Has anyone successfully ran this under Ubuntu, and if so, is there any special configuration changes that need to be made to make it work?

Braiam
  • 69,112
waldyrious
  • 2,207

8 Answers8

102

There are 2 ways to use BitTorrent Sync , 1st Install it using PPA & 2nd Download

1st PPA

sudo add-apt-repository ppa:tuxpoldo/btsync
sudo apt-get update

For normal desktop use, you only need to install btsync-user:

sudo apt-get install btsync-user

Alternatively, if you're setting up your BTSync server, install btsync:

sudo apt-get install btsync

During the installation just use the default setting and set the administrative password as well ,You can access it by

127.0.0.1:8888     # This will redirect to the 2nd link

OR

http://127.0.0.1:8888/gui/

Username = admin , Password = ( Use have set during installation )


2nd Download

Download the BitTorrent Sync client

cd Downloads
tar xzpf btsync_glibc23_x64.tar.gz # I have downloaded 64 bit. So check your version 
./btsync

The output will be

./btsync 
BitTorrent Sync forked to background. pid = 5771  # some what like this pid will be change

enter image description here

Open any web browser & copy paste the following line

127.0.0.1:8888     # This will redirect to the 2nd link

OR

http://127.0.0.1:8888/gui/

enter image description here


If you type ./btsync --help you can also run it no deamon mode

./btsync --help
 BitTorrent Sync 1.0.132
 Usage:
 btsync [--config <path>] [--nodaemon] [--generate-secret] [--dump-sample-config] [--help] [--get-ro-secret <secret>]
 Options:
--config - location and name of configuration file
--nodaemon - do not use daemon mode
--generate-secret - generate shared secret
--get-ro-secret - get read only secret for existing master secret
--dump-sample-config - dump sample config file
--help - print this message and exit

Help

forum.bittorrent.com

Video tutorial jupiterbroadcasting.com

Please also have look at Peer To Peer (P2P) Sync and Share Ubuntu

Qasim
  • 22,162
32

According to the user guide (pdf), there is (at least for now) no native GUI for Linux. The graphical interface for Linux is browser-based, and can be accessed at http://localhost:8888/gui/.

janot
  • 1,790
waldyrious
  • 2,207
4

As of June 2017 Sync (now owned by Resilio) now provides repositories for many major Linux operating systems, including Ubuntu, Debian, Centos, Red Hat, Fedora, etc.

Install instructions are here, and copied below for Ubuntu. There's a guide on how to use Sync with Linux here.

Ubuntu Install Steps

Create a file called /etc/apt/sources.list.d/resilio-sync.list with the following content to register Resilio repository:

deb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free

Add the public key with the following command:

wget -qO - https://linux-packages.resilio.com/resilio-sync/key.asc | sudo apt-key add -

Install Sync

sudo apt-get update
sudo apt-get install resilio-sync

The page I linked to goes into how to start it and how to have it start automatically.

muru
  • 207,228
Tim
  • 141
3

Official Packages

As of February 18, 2016, there are official Ubuntu/Debian packages. The instructions below are adapted from the blog's announcement post.

Add Apt Repository

sudo sh -c 'echo "deb http://linux-packages.getsync.com/btsync/deb btsync non-free" > /etc/apt/sources.list.d/btsync.list'

It is advised to remove any other 3rd party bt-sync related repositories from /etc/apt/sources.list.d first.

Add Signing Key

Next, you need to add our public key to get the package verified before downloading and installation:

wget -qO - http://linux-packages.getsync.com/btsync/key.asc | sudo apt-key add -

Install

sudo apt-get update
sudo apt-get install btsync

Controlling Sync

Ubuntu 14.10 and Earlier

If your OS uses sysvinit, upstart, control Sync with the following commands:

sudo service btsync (command)

where (command) can be start, stop, or restart

Ubuntu 15.04 and Later

If your OS uses systemd, use the following commands to control Sync:

sudo systemctl (command) btsync

where (command) can be start, stop, enable, disable, or status

Permissions and users

Note, that when you install Sync package it is going to add btsync user to your Linux and run under btsync user. Take care of permissions and groups before you start syncing.

If you are using Ubuntu 15.04 or later it is possible to run Sync under your current user account, if you start it with the command:

sudo systemctl --user (command) btsync

Unfortunately, this option is not available for 14.10 or earlier.

Bozaro
  • 31
2

Create a start-up script and setup Nginx SSL for remote access

nano /etc/init.d/btsync

#! /bin/sh
# /etc/init.d/btsync
#

# Carry out specific functions when asked to by the system
case "$1" in
start)
    /USERACCOUNT/.btsync/btsync --config /USERACCOUNT/.btsync/btsync.conf
    ;;
stop)
    killall btsync
    ;;
*)
    echo "Usage: /etc/init.d/btsync {start|stop}"
    exit 1
    ;;
esac

exit 0
chmod 755 /etc/init.d/btsync
update-rc.d btsync defaults

Start BT Sync

service btsync start

Nginx configuration

/etc/nginx/sites-enabled/btsync.xx.xxx

server {
       listen         80;
       server_name    btsync.xx.xxx;
       rewrite        ^ https://$server_name$request_uri? permanent;
}

    server {
           listen         443;
           server_name    btsync.xx.xxx;

           ssl            on;
            ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
            ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;

            access_log  /var/log/nginx/access.log;

            location / {
                    proxy_pass      http://127.0.0.1:8888;
            }
    }
nicoX
  • 1,160
1

I found a very useful walkthrough here:

https://www.digitalocean.com/community/articles/how-to-use-bittorrent-sync-to-synchronize-directories-in-ubuntu-12-04

I know I am not spelling out the instructions from the blog post here. But it ultimately was more useful to me so wanted to share.

gare
  • 947
1

BitTorrent Sync's unofficial PPA now has a package btsync-gui, which adds GTK GUI (in addition to WebUI). There's a thread about the GUI on btsync's forum.

Charles Green
  • 21,859
saji
  • 111
0

According to the original PPA maintainer tuxpoldo, the new way to do it for version (2.0+) is (must be run in bash):

sh -c "$(curl -fsSL http://debian.yeasoft.net/add-btsync-repository.sh)"
sudo apt-get update
sudo apt-get install btsync-gui
btsync-gui
Jonathan
  • 3,984