BitTorrent Sync (BTSync) is a file sharing system that relies on the BitTorrent protocol, and differs from other file sharing software in the connection type between devices. Instead of uploading the files to an online server, and then each device fetching them from the server itself, the file transfer is done directly from peer to peer, and therefore there is no limit on data storage and/or transfer speed.
BitTorrent Sync encrypts the traffic between devices with AES cypher and a 256-bit key created on the base of the secret — a random string (20 bytes or more) that is unique for every folder to be synchronized.
BitTorrent Sync uses a specific method for folder sharing, the 'secret': a random 21-byte key Base32-encoded.
When a device adds a folder for synchronization, a secret is generated. From now on, every device that wants to synchronize that folder must know the secret key.
The synchronization has no speed or size limits, as long as both devices have enough disk space.
AUR. The package includes systemd service definitions for managing the btsync daemon. This package creates a default /etc/btsync.conf for system/root operation. Before enabling with systemctl review this file and make desired changes, e.g. to the login id and password.AUR can be installed from the
Alternatively, the bare 'tar.gz' packaged executable is downloadable from the official website. The rest of this guide assumes that you are using the btsync AUR package.
The Linux client of BTSync does not use a typical GUI, instead it sets up a WebUI server accessible at
localhost:8888. Shared folders can also be configured statically in a configuration file, but doing so disables the WebGUI.
Once installed, you'll first need to create a configuration file at
~/.config/btsync/btsync.conf, see #Configuration. You will also need to create the
storage_path directory. When that is done, start and (if you want it to start on boot) enable the service:
$ systemctl --user start btsync $ systemctl --user enable btsync
The service will run as the user invoking the command.
You can also run it as the
btsync system user, just leave the
--user part out:
# systemctl enable btsync # systemctl start btsync
Configuration for this user is located at
/etc/btsync.conf, and metadata is saved in
/var/lib/btsync/ by default. You should review the configuration settings especially user and password, see below.
A sample configuration file can be created using
btsync --dump-sample-config. You'll probably want to change some of the settings, including:
Automatic config file creation
btsync-autoconfig.service) which, if enabled, triggers when a user's
btsync.service starts and creates a config file with default values if it does not already exist. The install script enables the service for all users by default. Although disabling it defeats most of its purpose, it can be disabled using
# systemctl --global disable btsync-autoconfig.service
Individual users can then enable it if they like:
$ systemctl --user enable btsync-autoconfig.service
~/.config/btsync/btsync.conf if it does not exist, and guesses some default values of the settings:
The script also creates the
storage_path directory set in the config file if it does not exist. This is done intependently from the creation of the config file.
TheAUR package provices an unofficial clone of the GUI interface for BTSync available for Windows. By default it disables the WebGUI interface for security reasons. If you want to migrate your existing BTSync setup - move the contents of your current storage folder (probably ~/.config/btsync) to ~/.btsync and disable the btsync@user Systemd service, that you're using currently.
Missing storage path
If you start the service but can't reach the WebUI, check the status of the btsync by entering
systemctl --user status btsync (or
systemctl status btsync for the system-wide instance).
A common error is
Storage path specified in config file does not exist.. This is easily fixed by
mkdir ~/.btsync, or whatever your
storage_path is set to.
WebUI is not running on port 8888
If the config file was generated by
btsync will be
7889 + $UID. If your
$UID is "1000", the port will be 8889.
Ignore some files/folders syncronization
If you have files in your sync folder that you don't want BitTorrent Sync to track, you can use .SyncIgnore. .SyncIgnore is a UTF-8 encoded .txt file that helps you specify single files, paths and rules for ignoring during the synchronization job. It supports '?' and '*' wildcard symbols.
Note that .SyncIgnore is applied only to the folder where it is contained and will not work with the files that have already been synced. If you add indexed files to .SyncIgnore, they will be deleted on other syncing devices. In order to avoid this:
- Remove the folder from sync on all the devices.
- Modify .SyncIgnore file on all of them so that it contains same info.
- Re-add the modified folders.
ARM alignment error
Add the line
w /proc/cpu/alignment - - - - 2 to
/etc/tmpfiles.d/btsync.conf. (You need to create the file).
Note that this may lead to performance degradation.