On Linux, you have to be running Gnome or KDE. There is a headless option called mconnect, but (a) it's essentially unmaintained, (b) it's written in Vala, a niche¹ language, (c) either KDE Connect or mconnect can't maintain an association - leaving the LAN and returning always forces a re-authentication.
It's promising, and nice when it works, but the supported linux daemons are - sadly - tightly coupled to two DEs, making it useless for headless and the large number of people running neither KDE or Gnome.
Device Connect, OTOH, works flawlessly, remembers device authorization, and the Linux server is completely headless. It uses standard tooling for desktop integration tasks, like opening links. It lacks many of KDE connect's features, such as using the phone as a touchpad and media control (the latter would be easy to support through MPRIS2, but media control could also be a separate app; it's kitchen-sinking, so I understand leaving it out).
postfix someone wrote another headless (and, hopefully, KDE services-less) connect server, called konnect. It's Python, but that's still better than Vala.