Syncthing

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. You can help by expanding it.

Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time. Syncthing is available on Linux, MacOS, Android, Windows and other operating systems, making it a good choice for cross platform file sharing.

Installation

USE flags

USE flags for net-p2p/syncthing Open Source Continuous File Synchronization

selinux !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
tools Install stdiscosrv, strelaysrv and other tools to /usr/libexec/syncthing/.

Emerge

root #emerge --ask net-p2p/syncthing

Configuration

To view all available configuration options:

user $man 5 syncthing-config

Files

${HOME}/.config/syncthing
Configuration files and security certificates, if run as a user.
/etc/conf.d/syncthing
Config file for /etc/init.d/syncthing

Service

OpenRC

OpenRC can start Syncthing at startup:

root #rc-update add syncthing default

Usage

Invocation

user $syncthing --help
Usage: syncthing <command>

Flags:
  -h, --help    Show context-sensitive help.

Commands:
  serve
    Run Syncthing

  decrypt <path>
    Decrypt or verify an encrypted folder

  cli
    Command line interface for Syncthing

Run "syncthing <command> --help" for more information on a command.

Running Syncthing

Syncthing can be started as a common user:

user $syncthing

It will create the following directories at first use:

${HOME}/.config/syncthing
Configuration files and security certificates.
${HOME}/Sync
The default folder to synchronize.

Syncthing will also fire up a browser page at http://127.0.0.1:8384 for monitoring and configuration.

Troubleshooting

Changing the user of init service

User and group with which Syncthing creates and modifies the synced files, can be changed by uncommenting the following lines in /etc/conf.d/syncthing:

FILE /etc/conf.d/syncthingChanging the default user of syncthing init service
#SYNCTHING_USER="syncthing"
#SYNCTHING_GROUP="syncthing"

Sycning files with Android

If files are shared with Android, make sure to enable "Ignore Permissions" in the advanced tab. This option disables comparing and syncing file permissions and is useful on systems with nonexistent or custom permissions (e.g. FAT, exFAT, Synology, Android).

More documentation

Syncthing provides a number of man pages:

See also

  • Rsync — a powerful file sync program capable of efficient file transfers and directory synchronization.