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 my Linux Mint Laptop. See also the initial set-ups for my Raspberry Pi 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.
Installation
- I opened "Software Manager" and searched for "Syncthing". Several items popped up, including "Syncthing" and "Syncthing Tray". The problem was that, as I looked at them, the "Tray" package (which puts an icon in the tray for management and informational purposes) is using a "Flatpack" that's over 1GB of download and 3.7GB on the disk! For just the tray. Syncthing itself was only 23MB on the disk. So, I went to the command line and looked for syncthing by typing
sudo apt search syncthing. And sure enough, there's a package named syncthingtray, that only needs about 204MB. So I went the 'apt' method instead of the "Software Manager" method. sudo install syncthing syncthingtray -y- After everything finished installing, the Syncthing icons are under the "Internet" start menu.
- Click on "Start Syncthing"
- Then click on "Syncthing Web UI"
- The web UI comes up and asks to set a user name and password for the GUI.
While I'm the only person using the system, it's still a best practice to enable "[defense in depth](https://en.wikipedia.org/wiki/Defense_in_depth_(computing)", so I set it up.In the box on the webpage entitled "GUI Authentication", click the "Settings" button at the bottom rightClick on the "GUI" tabEnter the "GUI Authentication User" and "GUI Authentication Password"I checked the "Use HTTPS for GUI", even though I'm not using a CA-signed certificate. I may have to go back and turn that off later, but I like multiple layers of encryption.Click "Save".
- It turns out that I couldn't get Syncthing Tray to work if I had a password set on the GUI. So I spent the next hour trying to find the way to remove the username and password without breaking Syncthing. I even did a
sudo apt purge syncthing syncthingtraybut that didn't work, it didn't get rid of the configuration file. I finally found the file in ~/.local/state/syncthing/config.xml - In the Syncthing web GUI, find the "Actions" drop-down at the top right and select "Settings". You are going to need the API Key later for Syncthing Tray
- Start SyncthingTray from the Start Menu -> Internet -> Syncthing Tray icon.
- I tried the guided setup, but had problems because of my password. After I cleared the Syncthing GUI username and password, I had to go back into the manual settings for Syncthing Tray.
- Syncthing URL: https://127.0.0.1:8384
- API key: what you copied from Syncthing GUI Settings about two bullet points above.
- Click "Apply" and "OK", and it looks like I'm ready to add folders!
- Next step is to install Syncthing on my Raspberry Pi and my Phone
Previous: 2. VPN
Next: 4. Note-taking