pre requisites
- apt-transport-https
sudo apt install apt-transport-httpsInstall syncthing
sudo apt install syncthingCREATE AND EDIT THE CONFIG FILE
syncthing
ctrl-c
nano ~/.config/syncthing/config.xmlNow we need to change the address line to either the IP address of your Pi or to all addresses on your Pi “0.0.0.0”. So replace the address line with for example: <address>0.0.0.0:8384</address>
Set syncthing to start as a service
sudo nano /lib/systemd/system/syncthing.serviceThe paste the following into the file. Replace <YOUR PI USERNAME HERE> with your Pi username.
[Unit]
Description=Syncthing (File synchronisation)
Documentation=man:syncthing(1)
After=network.target
[Service]
User=<YOUR PI USERNAME HERE>
ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0
Restart=on-failure
RestartSec=5
SuccessExitStatus=3 4
RestartForceExitStatus=3 4
# Hardening
ProtectSystem=full
PrivateTmp=true
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true
[Install]
WantedBy=multi-user.targetEnable and run the service.
sudo systemctl enable syncthing
sudo systemctl start syncthingtest out the web interface
Simply open http://<YOUR PI IP ADDRESS>:8384 in a browser and you should see the syncthing GUI. You can customise your install from there. It is highly recommended you set a user and password to enter the GUI.

Leave a Reply