Starting Syncthing Automatically
Ubuntu 26.04 LTS
sudo mkdir -p /etc/apt/keyrings
sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable-v2" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo vim /etc/apt/preferences.d/syncthing
Package: syncthing
Pin: origin "apt.syncthing.net"
Pin-Priority: 600
sudo apt update
apt policy syncthing
sudo apt install syncthing
syncthing --version
sudo loginctl enable-linger USER
loginctl show-user USER -p Linger
systemctl --user enable --now syncthing.service
systemctl --user status syncthing.service
pgrep -a syncthing
journalctl --user -u syncthing -n 30 --no-pager
Ubuntu 24.04.1 LTS
sudo apt update && sudo apt upgrade -y
sudo apt install syncthing
sudo systemctl enable syncthing@username.service
sudo systemctl start syncthing@username.service
sudo vim /home/username/.local/state/syncthing/config.xml
Ubuntu 22.04 LTS
sudo apt update && sudo apt upgrade -y
sudo curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list #Import Syncthing Stable
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing candidate" | sudo tee /etc/apt/sources.list.d/syncthing.list #Import Syncthing Candidate (Pre-Release)
sudo apt update
sudo apt install syncthing -y
syncthing --version
sudo systemctl enable syncthing@username.service
sudo systemctl start syncthing@username.service
vim /home/username/.config/syncthing/config.xml
FreeBSD
# wget https://github.com/syncthing/syncthing/releases/download/v1.18.2/syncthing-freebsd-amd64-v1.18.2.tar.gz
# tar zxvf syncthing-freebsd-amd64-v1.18.2.tar.gz
# cd ./syncthing-freebsd-amd64-v1.18.2
# mv ./usr/local/bin/syncthing ./usr/local/bin/syncthing-bak
# cp ./syncthing /usr/local/bin/
# cd ./syncthing-freebsd-amd64-v1.18.2/etc/freebsd-rc
# mv ./usr/local/etc/rc.d/syncthing ./usr/local/etc/rc.d/syncthing-bak
# cp ./syncthing /usr/local/etc/rc.d/
FreeBSD 14.1
# pkg update && pkg upgrade
# pkg install syncthing
# mkdir /var/syncthing
# chown -R syncthing:syncthing /var/syncthing
# chmod -R 750 /var/syncthing
# cp /usr/local/etc/syncthing/config.xml{,.bak}
# portsnap fetch update
# cd /usr/ports/net/syncthing
# make install clean
# ee /usr/local/etc/syncthing/config.xml
# ee /usr/local/etc/rc.d/syncthing
syncthing_user=username
syncthing_group=groupname
# sysrc syncthing_enable=YES
# service syncthing restart
CentOs 7 & 8
sudo yum update -y
sudo vi /etc/yum.repos.d/syncthing.repo
[copr:copr.fedorainfracloud.org:daftaupe:syncthing]
name=Copr repo for syncthing owned by daftaupe
baseurl=https://download.copr.fedorainfracloud.org/results/daftaupe/syncthing/epel-7-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/daftaupe/syncthing/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
sudo wget https://github.com/syncthing/syncthing/releases/download/v1.18.3/syncthing-linux-amd64-v1.18.3.tar.gz
sudo tar xzvf syncthing-linux* && rm -rf syncthing-linux*.tar.gz
sudo cd /root/syncthing*
sudo cp ./syncthing /usr/local/bin/
sudo cd /root/syncthing*/etc/linux-systemd/system/
sudo cp syncthing@.service /etc/systemd/system/
sudo syncthing --version
sudo vim /etc/systemd/system/syncthing@.service
ExecStart=/usr/local/bin/syncthing -no-browser -no-restart -logflags=0 -gui-address="0.0.0.0:8384" -home=/home/%i/syncthing
sudo vim /.config/syncthing/config.xml
<gui enabled="true" tls="false" debugging="false">
<address>192.168.2.200:8384</address>
sudo systemctl daemon-reload
sudo systemctl enable syncthing@aaa
sudo systemctl start syncthing@aaa
sudo syncthing -upgrade
Windows 10
> syncthing.exe -no-console -no-browser -home="D:\Program Files\syncthing-windows-amd64-v1.6.1"
> syncthing.exe -no-restart -gui-address=localhost:8384
MacOs
Firewall
UFW
sudo ufw allow syncthing
sudo ufw allow syncthing-gui
OR
sudo ufw allow 22000/tcp
sudo ufw allow 80/tcp
IPTables
sudo firewall-cmd --zone=public --add-service=syncthing --permanent
sudo firewall-cmd --zone=public --add-port=8384/tcp --permanent
sudo firewall-cmd --reload