Discussion
I have several systems that I want to synchronize between my phone, my laptop and a tablet. Many of those systems have their own way of synchronization, i.e. Obsidian's Obsidian Sync. Systems like that work fine, but there are two disadvantages: First, I don't want to have to maintain multiple systems if I don't have to. Second, I want to be in control of how I back them up. I realized that if I can sync them to the Raspberry Pi, I can then back them up from there.
After looking a a few alternatives, Syncthing (and syncthing-fork for android) seemed to be the clear winner. It was a bit of a stretch to get my head around how to make it work on all my devices, but the Getting Started page helped.
Please note that this page is only for the initial set-up of Syncthing on the Raspberry Pi. See also the initial set-ups for my Laptop and Phone. I cover the steps to share individual folders in their respective sections, i.e. Self-hosting/4. Note-taking and Laptop/4. Note-taking.
Resources
I used https://pimylifeup.com/raspberry-pi-syncthing/ for much of this section. However, instead of modifying the syncthing config file to allow remote web browsers to change the config, I log into the Pi by Enabling VNC
Installation
NOTE to self: The below is on the Raspberry Pi, not the laptop
sudo apt update
sudo apt upgrade
sudo apt install apt-transport-https
curl -s https://syncthing.net/release-key.txt | gpg --dearmor | sudo tee /usr/share/keyrings/syncthing-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt update
sudo apt install syncthing
sudo systemctl enable syncthing@$USER
sudo systemctl start syncthing@$USER
sudo systemctl status syncthing@$USER
sudo apt install syncthingtray
- Go to the raspberry start icon and then Syncthing Tray. Accept the defaults and it should start. Note that the config wizard hangs, you'll have to exit the dialog box.
You're now ready to set up synchronizing Obsidian with the Laptop
Previous: 2. Raspberry Pi Initial Configuration
Next: 5. Note-taking