Install Bit Torrent Sync on Ubuntu

Install Bit Torrent Sync on Ubuntu
by Janeth Kent Date: 15-01-2014 torrent ubuntu sync server share

There are some great tools for syncing files over the internet available to us, but one stands out from the rest in regards of technology used and possible use cases.

A public beta version was released in June this year and now it’s available for Windows, Mac, Linux, FreeBSD, Android and iOS. Today we are going to setup BitTorrent Sync on Ubuntu Server. You may need btsync on your server for Backing up configuration and database files, Access code repositories or Create a synchronized documents network folder for your company.



  1. Go to a temporary folder
    $ cd /tmp
  2. Download the correct version of BitTorrent Sync, depending on your system (i386 or x64)
    $ wget -O btsync.tar.gz
    $ wget -O btsync.tar.gz
  3. Unpack the downloaded compressed tar
    $ tar -xf btsync.tar.gz
  4. Now we move the executable to our /usr/local/bin directory
    $ sudo mv btsync /usr/local/bin/
  5. Create a default sync folder
    $ mkdir ~/.sync
  6. We need to create a confguration file for btsync by dumping a sample configuration file
    $ btsync --dump-sample-config > ~/.btsync
  7. Edit the configuration file with
    $ nano ~/.btsync
    and change "storage_path" to reflect the sync folder we created above (Eg /home/yourusername/.sync) and add a username and a password to secure btsync admin panel. Make sure you uncomment the lines containing login information so they are read by btsync
  8. To be able to easily control btsync daemon we need to create a service init.d script and make it executable
    $ sudo touch /etc/init.d/btsync
    $ sudo chmod +x /etc/init.d/btsync
  9. Paste the following content in our /etc/init.d/btsync script and make sure you change the user variable with your username.
    $ sudo nano /etc/init.d/btsync


    #! /bin/sh
    # Provides:   btsync
    # Required-Start: $syslog $remote_fs
    # Required-Stop:  $syslog $remote_fs
    # Should-Start:   $local_fs
    # Should-Stop:    $local_fs
    # Default-Start:  2 3 4 5
    # Default-Stop:   0 1 6
    # Short-Description:  btsync - Bittorent SyncApp
    # Description:    btsync - Bittorent SyncApp
    user="yourusername" # YOU MUST REPLACE THIS BY YOUR USER
    group=`id -ng "$user"`
    # the full path to the filename where you store your btsync configuration
    config="`su -c 'echo $HOME' $user`/.btsync"
    # set of options to run with
    DAEMON_ARGS="--config $config"
    test -x $DAEMON || exit 0
    if [ -r /etc/default/$NAME ]
      . /etc/default/$NAME
    set -e
    case "$1" in
      echo -n "Starting $DESC: "
      mkdir -p $RUNDIR
      touch $PIDFILE
      chown $user:$group $RUNDIR $PIDFILE
      chmod 755 $RUNDIR
      if [ -n "$ULIMIT" ]
        ulimit -n $ULIMIT
      if start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --chuid $user:$group --exec $DAEMON -- $DAEMON_ARGS
        echo "$NAME."
        echo "failed"
      echo -n "Stopping $DESC: "
      if start-stop-daemon --stop --retry forever/TERM/1 --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
        echo "$NAME."
        echo "failed"
      rm -f $PIDFILE
      sleep 1
      ${0} stop
      ${0} start
      echo -n "$DESC is "
      if start-stop-daemon --stop --quiet --signal 0 --name ${NAME} --pidfile ${PIDFILE}
        echo "running"
        echo "not running"
        exit 1
      echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
      exit 1
    exit 0
  10. Lets make our init.d script start with the server
    $ cd /etc/init.d/ && sudo update-rc.d btsync defaults
  11. Start btsync daemon with the following command and go to http://yourserverip:8888 to add folders you want to synchronize
    $ sudo service btsync start


by Janeth Kent Date: 15-01-2014 torrent ubuntu sync server share hits : 10302  
Janeth Kent

Janeth Kent

Licenciada en Bellas Artes y programadora por pasión. Cuando tengo un rato retoco fotos, edito vídeos y diseño cosas. El resto del tiempo escribo en MA-NO WEB DESIGN AND DEVELOPMENT.


Related Posts

How to set up your own free web server with XAMPP

Nowadays anyone can create their own website easily and free of charge. Whether through a CMS (such as WordPress) or by hand with HTML, CSS and JavaScript, in a few…

How To Use Varnish As A Highly Available Load Balancer On Ubuntu 20.04 With SSL

Load balancing with high availability can be tough to set up. Fortunately, Varnish HTTP Cache server provides a dead simple highly available load balancer that will also work as a…

Matrix. An open network for secure and decentralized communication that you can install in your Ubuntu server

Imagine to have an open platform that is as independent, vibrant and evolving as the Web itself, but for communication. As of June 2019, Matrix is out of beta, and the protocol…

Linux For Dummies: Permissions

In the previous articles I made a short introduction to the Unix world and in the following article I have dealt with the basic commands for the file system management. Today we are…

Linux for Dummies: Ubuntu Terminal

I introduced in the previous article, available here, the basic concepts concerning the Linux world. Today we are going to have a look to some basic operations that we can perform…

How to setup Free Let’s Encrypt SSL certificates with ISPConfig 3

Let’s Encrypt is an initiative to provide a better way of enabling encryption on websites. It is open, automated and above all: it offers free SSL certificates. Obtaining SSL certificates was always…

The Best RSS Readers for Ubuntu

Even if most of the tech experts actively claim that RSS (Rich Site Summary) is dead especially after Google Reader was discontinued 5 years ago but it isn’t yet as…

Async/Await how they really work: an example

Promises give us an easier way to deal sequentially with asynchrony in our code. This is a welcome addition, given that our brains are not designed to deal efficiently with…

Configuring DNS-over-TLS and DNS-over-HTTPS with any DNS Server

The new DNS-over-TLS (DoT) and DNS-over-HTTPS (DoH) protocols are available for enabling end user's privacy and security given the fact that most DNS clients use UDP or TCP protocols which…

How to install Letsencrypt Certificates with Certbot in Ubuntu

In this article we will explain how to install, manage and configure the SSL Security certificate, Let's Encypt in NGINX server used as proxy. This certificate is free but does…

How to Set up a Fully Functional Mail Server on Ubuntu 16.04 with iRedMail

Setting up your own mail server from scratch on Linux is complex and tedious, until you meet iRedMail. This tutorial is going to show you how you can easily and…

GIMP 2.10 released: Features 32-bit support, new UI and A Ton Of Improvements

It's been over a half-decade since the GIMP 2.8 stable debut and today marks the long-awaited release of GIMP 2.10, its first major update in six years. And among other…