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
  • 67,791
  • 32
  • 179
  • 269
waldyrious
  • 2,197

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,092
  • 1
    Thanks, this was very comprehensive, but my original question was not how to install it, but rather why it wasn't giving me any feedback that it was running. I suppose it's been changed to provide the helpful "BitTorrent Sync forked to background" bit, so thanks for pointing that out. Also, your suggestion to use --help is a valid one; I should have tried that (although I was more curious about the out-of-the-box experience). For these reasons, I'll upvote your answer, but will accept mine (which I had forgotten to do, sorry if that gave you the impression that the question wasn't answered). – waldyrious May 17 '13 at 12:44
  • 4
    @waldir When i was writing the answer my aim was there is nothing should be left for you to say anything about "BitTorrent Sync", I always try to write additional information, may be it will not help you ( or an exact answer to your question ) but it will help others and 2nd i don't want to gather all the information again & again for every time..now if some one ask question about installing / configuring "BitTorrent Sync" i will duplicate to this answer ... i hope you understand what i m trying to say ... – Qasim May 17 '13 at 12:55
  • Yes, I understand perfectly, and I agree that it's a good thing to do. I just wanted to let you know that I was going to accept my answer instead of yours merely for accuracy (considering what the question explicitly asked for), rather than because of any selfish motivation :) – waldyrious May 19 '13 at 01:13
  • 2
    While adding the ppa I saw that there is a btsync and btsync-user package. I bit of research showed that btsync is more for server usage and btsync-user for desktop usage. btsync-user also automatically adds it to start-up and a launcher to the dash. Just mentioning so that you can improve the answer as you feel is needed. – chesedo Jul 27 '13 at 09:37
  • What @Pieter mentioned is key for the average Ubunutu Desktop user, and therefore @Qasims answer is actually incorrect (for the typical dektop install). In short, don't install sudo apt-get install btsync, but rather do this: sudo apt-get install btsync-user – mike stewart Sep 28 '13 at 04:57
  • Modified @Qasim's answer slightly to include btsync-user instructions. – Dave Sep 29 '13 at 10:08
  • 2
    @Dave or Qasim you might want to add an entire section for desktop and server install respectively. The reason, btsync-user is on port 9999 and not 8888 as with btsync, and does not use authentication. Btsync can also run on multiple daemons if I remember correctly. See btsync and btsync-user – chesedo Sep 30 '13 at 16:19
  • For me, the port was 8999 for a btsync-user install. – black_puppydog Jan 07 '14 at 15:39
  • apt-get update gives 404 errors for http://ppa.launchpad.net/tuxpoldo/btsync/ubuntu/dists/wheezy/main/source/Sources and http://ppa.launchpad.net/tuxpoldo/btsync/ubuntu/dists/wheezy/main/binary-amd64/Packages. What should I do? – lindhe Mar 18 '14 at 20:12
  • What is the difference between "desktop" and "server"? I don't get it – Karel Bílek Oct 01 '14 at 17:14
  • 1
    That didn't work for me. http://127.0.0.1:8888/gui/ yields nothing. – Costa Michailidis Apr 29 '15 at 19:23
  • What is the package of BtSync? I cannot find it in apt-get. Have you declared the source? – Léo Léopold Hertz 준영 Jul 07 '15 at 15:07
  • @Masi did you add the ppa ? – Qasim Jul 08 '15 at 03:32
  • 1
    The listed PPAs are not working right now, unfortunately. – Karel Bílek Oct 11 '15 at 23:14
  • 1
    if you are configuring btsync remotely on linux, you can ssh into the box and run ./btsync --webui.listen 0.0.0.0:8888 to override the config file. This will run btsync where you can remotely configure it. Once you have everything configured with the directories you want to sync, kill btsync and run btsync again without the flags. The default will not allow remote UI, but you can sync directories to other peers you've allowed via key. – Sun Apr 18 '16 at 17:10
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,672
waldyrious
  • 2,197
  • 3
    There is now a Linux GUI for btsync: btsync-gui. – Will May 10 '14 at 20:35
  • 3
  • How would you access a remote computers btsync instance? If you try the IP of the remote computer and the port it doesn't work for some reason. – Klyn Oct 18 '14 at 04:12
  • For security reasons the default behaviour is to only listen on the loopback interface, this prevents remote computers from being able to remote connect to the web interface.

    To enable remote access you need to edit the config file and set the IP to listen on to 0.0.0.0, I recommend a good password and to use HTTPS if you're doing this.

    – wjdp Mar 08 '15 at 15:04
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
  • 197,895
  • 55
  • 485
  • 740
Tim
  • 141
  • The armhf part does not make sense - if you're on a x86* system, the armhf packages are useless and if you're on armhf, then that's the default and you don't need to specify it explicitly. – muru Jun 27 '17 at 06:12
  • Thanks @muru, copy and paste error. Should be fixed now. – Tim Jun 27 '17 at 07:41
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
    Please, could you provide more details from the link that you've posted? Pasting a simple link is not a sufficient answer. You can read how to reference external material here: http://askubuntu.com/help/referencing – Danibix May 02 '16 at 09:53
  • I believe you should be able to change the two http: urls with https: The key works from https, and the repo is on the same server, so would presume it should work. – Tracker1 Dec 19 '16 at 22:20
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;
            }
    }
Skylar Ittner
  • 179
  • 1
  • 12
nicoX
  • 1,142
  • 3
  • 13
  • 25
  • 1
    Nice addition, but you might want to explain it more ;) (Also, letting newbies get into vi without warning? Ouch! :P) – Gerhard Burger Feb 11 '14 at 08:43
  • The first code is a start up script for automating BTSync to start up after a reboot. The Nginx configuration is configuring access to BTSync. Access so you can reach and securly log in to your BTSync WebGUI from outside your local network. – nicoX Feb 26 '14 at 15:27
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,339
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,904
  • This seemed to work, but it's asking for a username and password of which I can't remember setting any. – Costa Michailidis May 01 '15 at 13:51
  • And there's no way to exit. Even killing the process doesn't work. (kill -1 and kill -9) – Costa Michailidis May 01 '15 at 14:16
  • Try the app on your phone? I think you can do some sort of identity setup with it – Jonathan May 02 '15 at 18:27
  • Don't run random Internet scripts in your shell. – Andrew Ensley Aug 17 '16 at 19:09
  • @Andrew Technically running scripts from the internet is safer than running any installer binary, because you can actually SEE what it does in advance. Therefore, under your logic, you should never install any binary. – Jonathan Aug 26 '16 at 17:20
  • @JonathanLeaders. I agree that binaries are more dangerous. My warning is for newbies who may not realize they are running arbitrary commands coming from an unknown, third-party server. I don't know who runs yeasoft.net or if I can trust them. Therefore, I would never perform the steps in your answer as-is. I would download the script myself, and - as you suggested - read through it. Then run it if it's safe. An explanation about where that script comes from might be appropriate. Don't run random binaries from the Internet either! – Andrew Ensley Aug 26 '16 at 17:57