Syncthing Ubuntu

broken image


  1. Syncthing Ubuntu 20.04
  2. How To Setup Syncthing
  3. Syncthing Ubuntu Service
  4. Syncthing Ubuntu -

Another way to backup mobile photos to a headless server, besides using Google Photos.

I am running a Ubuntu 20.04 server on a Raspberry Pi 4 and trying to use Syncthing (supports Windows, Mac, Linux, and Android) to backup my mobile photos. Following is notes on steps:

I'm running syncthing on a headless Ubuntu Server. I do all work on this server via SSH from my local PC on the same home network. The problem I'm having is syncthing only works while the SSH tunnel is active. Syncthing is a free, open-source peer-to-peer file synchronization application available for Windows, Mac, Linux, Android, Solaris, Darwin, and BSD. It can sync files between devices on a local network, or between remote devices over the Internet. Data security and data safety are built into the design of the software.

Installing Syncthing

20.04

Ref: https://apt.syncthing.net/ and https://www.linuxbabe.com/ubuntu/install-syncthing-ubuntu-desktop-server

Configuring to allow external access

Ubuntu

Ref: https://docs.syncthing.net/users/faq.html#how-do-i-access-the-web-gui-from-another-computer

The syncthing systemd service creates configuration files under /home/username/.config/syncthing/ and a folder /home/username/Sync as the default sync folder. The main config file is /home/username/.config/syncthing/config.xml.

Now we need to modify the config.xml file

to change 127.0.0.1:8384 to 0.0.0.0:8384

Enable the service at system start

Ref: https://docs.syncthing.net/users/autostart.html#using-systemd

There are two types of services that can be enabled: system service and user service.

Syncthing Ubuntu 20.04

Running Syncthing as a system service ensures that Syncthing is run at startup even if the Syncthing user has no active session. Since the system service keeps Syncthing running even without an active user session, it is intended to be used on a server.

Running Syncthing as a user service ensures that Syncthing only starts after the user has logged into the system (e.g., via the graphical login screen, or ssh). Thus, the user service is intended to be used on a (multiuser) desktop computer. It avoids unnecessarily running Syncthing instances.

I am planning to set up the system service:

How To Setup Syncthing

  • (NOT necessary for Ubuntu >=18.04) From git location mentioned above copy the Syncthing/etc/linux-systemd/system/syncthing@.service file into the load path of the system instance. [/lib/systemd/system/]

  • Enable and start the service. Replace 'ubuntu' with the actual Syncthing user after the @:

Then we can check the status of the servie:

Ubuntu
Syncthing ubuntu download
Syncthing Ubuntu

Ref: https://apt.syncthing.net/ and https://www.linuxbabe.com/ubuntu/install-syncthing-ubuntu-desktop-server

Configuring to allow external access

Ref: https://docs.syncthing.net/users/faq.html#how-do-i-access-the-web-gui-from-another-computer

The syncthing systemd service creates configuration files under /home/username/.config/syncthing/ and a folder /home/username/Sync as the default sync folder. The main config file is /home/username/.config/syncthing/config.xml.

Now we need to modify the config.xml file

to change 127.0.0.1:8384 to 0.0.0.0:8384

Enable the service at system start

Ref: https://docs.syncthing.net/users/autostart.html#using-systemd

There are two types of services that can be enabled: system service and user service.

Syncthing Ubuntu 20.04

Running Syncthing as a system service ensures that Syncthing is run at startup even if the Syncthing user has no active session. Since the system service keeps Syncthing running even without an active user session, it is intended to be used on a server.

Running Syncthing as a user service ensures that Syncthing only starts after the user has logged into the system (e.g., via the graphical login screen, or ssh). Thus, the user service is intended to be used on a (multiuser) desktop computer. It avoids unnecessarily running Syncthing instances.

I am planning to set up the system service:

How To Setup Syncthing

  • (NOT necessary for Ubuntu >=18.04) From git location mentioned above copy the Syncthing/etc/linux-systemd/system/syncthing@.service file into the load path of the system instance. [/lib/systemd/system/]

  • Enable and start the service. Replace 'ubuntu' with the actual Syncthing user after the @:

Then we can check the status of the servie:

Accessing the Web interface (GUI) from another computer

The address is by default: [server IP]:8384

Syncthing Ubuntu Service

Should set a password and enable HTTPS.

Syncthing Ubuntu -

More to read: the FAQ of Syncthing





broken image