Differences

This shows you the differences between two versions of the page.


Previous revision
fuss:syncthing [2022/04/19 08:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Rescanning ======
 +
 +Although syncthing has a rescan button, sometimes it is necessary to trigger a full rescan. A most common error message is the following:
 +<code>
 +[GRXBW] 17:53:20 INFO: Puller (folder "nibs", file "Images/Open/wall.png"): dst stat dir: stat /Users/nibs/Images/Open/: no such file or directory
 +</code>
 +
 +In order to do this, the ''index'' directory must be deleted:
 +
 +^ Operating System ^ Folder Location ^
 +| Windows          | ''%AppData%/Syncthing/index'' |
 +| Unix             | ''~/.config/syncthing/index'' |
 +| OS X             | ''~/Library/Application Support/Syncthing/index'' |
 +
 +After the removal of the file, restart syncthing and it will perform a full rescan of the folders.
 +
 +====== Synchronising Home Folder ======
 +
 +The following sync patterns will prevent synchronising items that have a local state and they are best used for synchronising user home folders.
 +===== OSX =====
 +
 +<code>
 +// ignore dot files
 +.**
 +// ignore folders
 +Library/**
 +Desktop/**
 +Public/**
 +Downloads/**
 +Applications/**
 +Music/iTunes/**
 +AppData/**
 +</code>
 +
 +===== Windows =====
 +
 +<code>
 +// include folders
 +!AppData
 +!Contacts
 +!Documents
 +!Favorites
 +!Music
 +!Pictures
 +!Videos
 +
 +// ignore all the rest
 +*
 +</code>
 +
 +====== Files that Should Not Be Synchronised ======
 +
 +The following files are junk, temporary, trash or state files that should generally not be synchronised:
 +<code>
 +// Firefox Downloads
 +*.part
 +// Chrome Downloads
 +*.crdownload
 +// Safari Downloads
 +*.download
 +
 +// Temporary / Backup
 +*~
 +.*.swp
 +*.pst
 +~*
 +*.tmp
 +*.bak
 +
 +// OSX
 +.DSSTORE?
 +.DS_Store
 +.Spotlight-V100
 +.Trashes
 +.Trash
 +Icon?
 +._*
 +.TemporaryItems
 +
 +// Linux
 +.directory
 +.Trash-*.
 +
 +// Windows
 +desktop.ini
 +ehthumbs.db
 +Thumbs.db
 +$RECYCLE.BIN
 +
 +// BTSync
 +.sync
 +*.bts
 +*.!Sync
 +.SyncID
 +.SyncIgnore
 +.SyncArchive
 +*.SyncPart
 +*.SyncTemp
 +*.SyncOld
 +
 +// Synology
 +@eaDir
 +</code>
 +====== Setting a Different Listen Address and Port ======
 +
 +A different listening address and port can be set for syncthing by editing the ''config.xml'' file (usually to be found under the user's home directory at ''~/.config/syncthing/'').
 +
 +The relevant part of code that refers to the web-interface is the following:
 +<code xml>
 +    <gui enabled="true" tls="false">
 +        <address>127.0.0.1:8384</address>
 +        <apikey>pBiQ3691PGcxqeOSLz101qML0188H1P5</apikey>
 +    </gui>
 +</code>
 +
 +where ''127.0.0.1'' is the listening address and ''8384'' is the port that syncthing listens on.
 +
 +====== Limiting CPU and RAM Usage ======
 +
 +Unfortunately, syncthing is unbelievably inefficient on most platforms such that is consumes a very large amount of CPU and RAM. Since RAM can be considered in most personal circumstances relatively cheap, the CPU consumption is relatively prohibitive, especially if you are running syncthing on highly optimised and minimal systems. For example, running syncthing (at version v0.11.25, at the time of writing) on an Macbook Air will keep your CPU constantly at about 20-30%. Since this is rather much, one can use ''cpulimit'' to forcibly allow syncthing to only use up an agreeable amount of CPU.
 +
 +To use ''cpulimit'', first install it via homebrew as you are used to:
 +<code bash>
 +brew install cpulimit
 +</code>
 +
 +Assuming that syncthing is already installed, you will find the launcher in ''~/Library/LaunchAgents/homebrew.mxcl.syncthing.plist''.
 +
 +First, change directory to the launch file:
 +<code bash>
 +cd ~/Library/LaunchAgents/
 +</code>
 +
 +and stop syncthing by typing:
 +<code bash>
 +launchctl unload homebrew.mxcl.syncthing.plist
 +</code>
 +
 +Next, edit ''homebrew.mxcl.syncthing.plist'' with your favourite editor to change some things. Find the subsection ''ProgramArguments'':
 +<code bash>
 +    <key>ProgramArguments</key>
 +    <array>
 +      <string>/usr/local/opt/syncthing/bin/syncthing</string>
 +      <string>-no-browser</string>
 +      <string>-no-restart</string>
 +    </array>
 +</code>
 +
 +and change it to this:
 +<code bash>
 +    <key>ProgramArguments</key>
 +    <array>
 +      <string>/usr/local/bin/cpulimit</string>
 +      <string>--limit=5</string>
 +      <string>/usr/local/opt/syncthing/bin/syncthing</string>
 +      <string>-no-browser</string>
 +      <string>-no-restart</string>
 +    </array>
 +</code>
 +
 +where:
 +  * ''/usr/local/bin/cpulimit'' is the path to the ''cpulimit'' binary installed by homebrew.
 +  * ''--limit=5'' means that only $5%$ CPU consumption is allowed at any time for ''syncthing'' and all child processes.
 +
 +and the rest are default launch parameters for syncthing.
 +
 +
 +
 +
  

fuss/syncthing.txt · Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.