You are here

Setting up Syncthing on an Ubuntu 16.04 server

Resources

Install package from PPA (from apt.syncthing.net)

# Add the release PGP keys:
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -

# Add the "release" channel to your APT sources:
echo "deb http://apt.syncthing.net/ syncthing release" | sudo tee /etc/apt/sources.list.d/syncthing.list

# Update and install syncthing:
sudo apt-get update
sudo apt-get install syncthing

Setup Syncthing (from digitalocean guide)

  • Run syncthing and note the device key
  • Ctrl-C to abort it
  • vi ~/.config/syncthing/config.xml
    • change <address>127.0.0.1:8080</address> to <address>0.0.0.0:8080</address>

Enable and start with systemd

USER=root #or whatever
sudo systemctl enable syncthing@$USER.service
sudo systemctl start syncthing@$USER.service
  • Immediately go to https:url:8080 and set up GUI Authentication User and Password
  • to use ssh tunnel:
ssh -N -L 8385:localhost:8384 root@server
visit: http://127.0.0.1:8385/

Other operating systems

Enable and start with older init-based systems

runlevel #find runlevel
ln -sfn /opt/bin/syncthing /etc/rc5.d/S65syncthing /opt/bin/syncthing #for runlevel 5
/opt/bin/syncthing --no-browser

More advanced scripts can be found here: forum.syncthing.net/…nit-d/402

Topic: