Add the release PGP keys:
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" | sudo tee /etc/apt/sources.list.d/syncthing.list
printf "Package: *\nPin: origin apt.syncthing.net\nPin-Priority: 990\n" | sudo tee /etc/apt/preferences.d/syncthing
sudo apt update && sudo apt install -y syncthing
run syncthing
from bash to continue setup
Once it is set up the way you want, enable it as a user service, as according to the documentation:
Edit using:
systemctl --user edit syncthing.service
systemctl --user enable syncthing.service
systemctl --user start syncthing.service
Check the status using:
systemctl --user status syncthing.service
stop and disable using:
systemctl --user stop syncthing.service
systemctl --user disable syncthing.service
add syncthing to your firewall rules
sudo ufw allow syncthing
sudo ufw allow syncthing-gui
https://docs.syncthing.net/users/faq.html#how-do-i-reset-the-gui-password