[Linux] Can't install syncthing properly on a kubuntu20 machine

Hi, i’ve read that old OSes are supported as far as 18.04, yet I can’t manage to get it installed on a 20.04 KDE desktop…

First I tried this github com/zocker-160/SyncThingy , but compiling from source generated the error : No package ‘libportal-qt5’ found

Then I tried using flathub, didn’t work somehow.

Then I learned about github com/Martchus/syncthingtray/blob/master/README.md#download , it worked like a charm : extracted the .zip release, double-clicked on the executable, icon popped. Except initially I had to right click the taskbar icon and then hit “open syncthing” for it to launch the webUI. Pairing worked, but it wasn’t persistent at reboots :frowning: tray icon was grayed out after that, and service wasn’t active. So as written on docs.syncthing net/users/autostart#how-to-set-up-a-user-service :

$ cp packages/syncthing-linux-amd64-v1.27.12/etc/linux-systemd/user/syncthing.service .config/systemd/user/

$ systemctl --user enable syncthing.service

$ systemctl --user start syncthing.service

$ systemctl --user status syncthing.service

Active: failed ??

So I tried searching autostart in the app menu ( docs.syncthing net/users/autostart.html#using-the-desktop-environment-kde-gnome-xfce-cinnamon ) but only start syncthingTRAY was listed, not the syncthing original instance that I installed with the same process, extracting the github release and double-clicking on the executable that’s not a symlink.

So I removed the 2 extracted folders, as well as

~/.local/state/syncthing

(which I believe are the data of the pairing?)

Then,

$ sudo apt install syncthing -y

$ sudo systemctl start syncthing@$USER

$ sudo systemctl enable syncthing@$USER

$ sudo systemctl status syncthing@$USER

(It’s indeed active, but smh listening on port 44215 instead of 8830 or whatever the standard is ?)

So now syncthingtray always stay grayed out at reboots, as if it was wanting to listen on expected port. When manually right clicking on it and trying to launch syncthing I get thrown the error window : Could not connect to host 127.0.0.1: Connection refused.

Why does this distrorepo install won’t be set on the right port ? Where is the config file to edit ?

Why isn’t there any damn guide/yt tutorial for installing syncthing on KDE ?

By thanking you for your help

Used the tray wizard assistant, it updated itself to the right port, but now the old pairing “Backup of primary instance (created by wizard” is unspawnable somehow, and the primary instance is blank.

How to switch the backed up instance on the new port ?

Alternatively, how to erase the defunct backed up instance that won’t work no more ? So that I pair again from scratch and end up with a single instance?

You’ve provided quite a lot of detail to digest, so I thought I’d start with the question above first because I believe it’ll help with the rest.

The Syncthing documentation (https://docs.syncthing.net/) is a go-to reference. It doesn’t cover every possible scenario – there have been some very interesting use cases posted on this forum – but for a typical installation, it’ll likely all that’s needed.

There are some excellent YouTube tutorials that have been mentioned on this forum, including this one: Syncthing Made EASYhttps://youtu.be/PSx-BkMOPF4 (posted: Sep 18, 2022)

For Debian and any Linux distros based on it (including KUbuntu), as mentioned on the downloads page, Synthing provides an APT repo for the latest versions: https://apt.syncthing.net/

Whether it’s KDE, GNOME, Xfce, LXDE, Enlightenment, or some other desktop environment, installing Syncthing is exactly the same process.

SyncThingy is what’s referred to as a wrapper. It’s a separate program from Syncthing, and functions as a control panel and system tray/toolbar indicator. Syncthing can be installed and functions perfectly fine without SyncThingy, but SyncThingy is basically useless unless Syncthing is also installed.

Note, it might caused by the copying-and-pasting, but in your posts all of the URLs / file paths are missing characters. For example “docs.syncthing.net” appears as “docs.syncthing net” (missing a dot/period before “net”), “github.com” appears as “github com” (again, missing the dot/period). Pathnames are almost missing spaces and/or other characters. It’s difficult to know if they should be taken literally or not – i.e. if you used the wrong commands, paths… which then could be part of the problems you’ve been having.

You’ve tried a bunch of different approaches, which individually can work fine, but you’ve mixed and matched wrappers, packages, autostart methods, etc. to a point where it’s likely only going to cause more confusion, so I recommend starting over.

Once you’ve got a clean slate, before downloading a single thing for Syncthing, answer this one question…

How important is it to have a system tray / toolbar indicator and control panel for Syncthing versus using Syncthing’s web-based GUI?

Thank you, I used it yes, very straightforward tutorial indeed, it’s the only one that puts the executable in usr/bin/ or whatever. Tho as said in OP, I then end up with a blank instance listening on port 44215 and it doesn’t erase old paired instance (from what syncthingtray can see).

I wish the github zip/source install could work easily though, for offline installs in segregated LANs…

$ sudo apt purge --auto-remove syncthing

$ sudo apt update

$ sudo apt install syncthing -y

After this operation, 17,4 MB of additional disk space will be used.

E: You don’t have enough free space in /var/cache/apt/archives/.

$ sudo baobab

I still see 2 GB available for / …

Thanks, I wish Syncthing could provide a tray icon to see its status at a glance, instead of having to fire up a web browser, which in my case is annoying with the dozen browsers I have, plus the fact that it somehow randomly chooses which one it’ll be spawned in, each time… That’s why i need one of these wrappers unfortunately

Sorry it’s either a discourse limitation or an admin choice but new users can’t write more than 2 URLs

You’re right I’d like to start fresh, what to remove if I fired up the executables contained in syncthing and syncthingtray github repos? Already erased the extracted folders, but it seems ashes remain, unless the apt syncthing use of port 44215 is hardcoded…

Now after each reboot,

$ sudo systemctl status syncthing@$USER

does show active (running),

but now syncthing tray can’t autolaunch and at each boot an error pops saying :

Unable to load certificate "/home/$USER/.local/state/syncthing/https-cert.pem" when restoring settings.

Probably because I manually deleted this folder before reinstalling syncthing core, not knowing that old instances are deleted through the syncthingTRAY settings GUI, and that deleting the backup is useless as it endlessly checks/creates one anyway.

Unfortunately I cannot post issue on GitHub - Martchus/syncthingtray: Tray application and Dolphin/Plasma integration for Syncthing , since github and all major email providers ally to prevent users from using proxies… I’d appreciate if y’all could create an issue on my behalf or reach out to @Martchus for them to come answering here

I’m also active on the forums and this is more a request for help - so no need to create an issue on GitHub.

Just remove the path of the certificate in the connection settings to get rid of that error.

To start from scratch with Syncthing Tray, read the README section about the config file location. However, that’s probably not necessary.

You may also generally read the README a little bit further because it tells you what options you have for setting up things. Probably it makes most sense to use systemd in your case like you already did. Note that systemd also allows to use user units (managed using --user) which can be better than using a system unit with @username.

Note that you can simply delete connection settings like backups created by the wizard if you don’t need them. The connections settings in Syncthing Tray are really just settings in Syncthing Tray and do not mean that there are really that many instances of Syncthing actually setup on your system.

I’m assuming you’re referring to Syncthing Tray or one of the other wrappers. Syncthing itself only has a single binary executable which can be placed wherever you’d like.

It’s not unusual to have multiple partitions / volumes on a Linux system, so /var might be running out of space even if the root filesystem still has 2 GB free.

What does the command df -hT show?

That, unfortunately, is much harder than it seems because Linux, macOS and Windows all have different desktop environments. Then including the variety of choices for Linux (KDE, GNOME,…), it’s a lot of environments without a universal system tray interface or notifications interface.

Syncthing’s REST and Event APIs strike a great balance by opening up access for 3rd-party tools to handle the individual nuances of the various desktop environments and user use cases. There are dozens of tools and wrappers to choose from: https://docs.syncthing.net/users/contrib.html

KDE has a setting for choosing the default web browser. If the setting is unconfigured, whichever web browser is currently open might be chosen instead. Regardless, Syncthing doesn’t randomly choose a web browser, it merely provides a URL for opening and the desktop environment takes it from there.

Ah, yes, I think it’s part of a defense against spam posts.

Instead of a blank space, try the common technique of [.] (e.g. server[.]com) because the intent is more recognizable and won’t be affected by word wrapping.

You’re right I’d like to start fresh, what to remove if I fired up the executables contained in syncthing and syncthingtray github repos? Already erased the extracted folders, but it seems ashes remain, unless the apt syncthing use of port 44215 is hardcoded… [/quote]

No, 44215 isn’t hard-coded into Syncthing. Syncthing just automatically picks another network port if the default 8384 is already in use.

There is a single-binary download for Syncthing Tray available - also for GNU/Linux and the binary can of course also be placed in any directory. (@f0b was also able to use it according to the initial post. The problematic part was to launch Syncthing itself - downloaded also as single-binary - via systemd. The problem was probably that @f0b didn’t ensure that the systemd unit points to the path where the syncthing executable was downloaded to but without full error message it is not possible to tell what went wrong for sure.)