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:
# download the GPG key then import the key: should see 'OK' curl -s https://syncthing.net/release-key.txt | sudo apt-key add - # add the official deb repository with the following command. echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list # Because this repository uses https, we need to install the apt-transport-https package sudo apt-get install apt-transport-https # Update local package index and install syncthing on Ubuntu. sudo apt-get update sudo apt-get install syncthing
Configuring to allow external access
The syncthing systemd service creates configuration files under
/home/username/.config/syncthing/and a folder
/home/username/Syncas the default sync folder. The main config file is
Now we need to modify the config.xml file
vi /home/ubuntu/.config/syncthing/config.xml # change 'ubuntu' to your username
127.0.0.1:8384 to 0.0.0.0:8384
Enable the service at system start
There are two types of services that can be enabled: system service and user service.
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
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:
(NOT necessary for Ubuntu >=18.04) From git location mentioned above copy the
Syncthing/etc/linux-systemd/system/syncthing@.servicefile 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 @:
# need to input the user password systemctl enable email@example.com systemctl start firstname.lastname@example.org
Then we can check the status of the servie:
systemctl status email@example.com
Accessing the Web interface (GUI) from another computer
The address is by default: [server IP]:8384
Should set a password and enable HTTPS.
More to read: the FAQ of Syncthing