Hey,

I was wondering what folks use to quickly send a file or a link between your PC and android phone in a lightweight and self hosted way.

Currently I use syncthing to copy files around, but I’m looking for something more immediate, and quick than doesn’t involve searching for folders in a file manager.

Example use case: Send a file from PC to phone. Notification pops up on phone, tap it to access.

(PC runs OpenBSD)

What lightweight software do you guys use?

Stuff I tried so far:

  • syncthing
  • xmpp
  • tox
  • scp and termux.
  • magic wormhole
  • telegram saved messages
  • @[email protected]
    link
    fedilink
    English
    46 hours ago

    I use KDEConnect. I don’t know about iPhone but it works with Android, Linux and Windows.

    • @[email protected]
      link
      fedilink
      English
      35 hours ago

      I have tried to use KDEconnect over and over, It doesn’t work on my work network, it doesn’t work on most of my home network, If my laptop my cell phone come up as different IPs it gets confused. It’s discoverability is just absolutely horrible except for a select number of plain vanilla networks.

      • @[email protected]
        link
        fedilink
        English
        15 hours ago

        Damn that sucks :(. Seems to me I have to disable my VPN in order to discover devices, but I can re-enable it afterwards. I use it mostly for clipboard sharing between devices.

        • @[email protected]
          link
          fedilink
          English
          34 hours ago

          My home network is split between wired and wireless, they’re on different IP ranges. I have every proper forwarding protocol and UDP sniffing everything set up so that devices can talk to each other across subnets.

          It refuses.

          So at home I can set it up on Linux to use a static IP to find my phone. And the phone kind of deals with it and works most of the time. But then I go to work and my IPs are the two devices change. Then I’m SOL.

          Also if I’m home and I’m roaming onto one of my other networks to talk to security cameras or something it’s incapable of talking to my PC.

          Honestly it’s discovery is just bad for me. I really wish that it’s supported a list of IPs, or gave me some kind of client I could run in concert with tail scale or I could move s*** around it’s just absolutely inflexible and for no good reason.

  • @Hawk
    link
    English
    15 hours ago

    Honestly, termux is the easiest:

    • Unison
    • Rsync
    • Git

    If unison you need some fiddling, here from my wiki:

    It can be compiled on termux though ((https://github.com/termux/termux-packages/issues/129#issuecomment-1383006456)) and it's totally painless
    
    >  You can also compile a static binary yourself in Termux. I was first using the sshfs workaround, but it was too slow for very large folders. I ended up doing the following steps to get the latest unison version (which also has backward/forward compatibility) so that I can directly use unison with ssh. It also works without proot:
    
      - Install a proot distro, e.g. alpine:
          * ''proot-distro install alpine''
          * ''proot-distro login alpine''
          * ''apk update && apk add ocaml musl-dev''
      - Download the latest release source code, e.g.:
        * ''wget https://github.com/bcpierce00/unison/archive/refs/tags/v2.53.0.tar.gz''
        * ''tar -xvf v2.53.0.tar.gz''
        * ''cd unison-2.53.0''
      - Compile a static binary using:
        * ''make UISTYLE=text NATIVE=true STATIC=true''
      - Move the binary to the bin folder of Termux:
        * ''mv src/unison /data/data/com.termux/files/usr/bin/unison''
    
     Note that outside the distro environment unison only works with the ''-ignorelocks'' flag for some reason. set an alias with ''alias unison=unison -ignorelocks''
    
     It may also be necessary to set ''-links=false'' ((https://github.com/bcpierce00/unison/issues/590)) and ''-perms=0'' ((https://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#prefs)) ((https://github.com/bcpierce00/unison/issues/590)):
    
     <code bash>
     alias unison=unison -ignorelocks -links=false -perms=0
     </code>
    
     Alternatively the file ''~/.unison/default.prf'' can be modified to contain:
    
     <code bash>
     auto=true
     batch=true
     ignorelocks=true
     links=false
     perms=0
     </code>
    
    
    
    
  • @[email protected]
    link
    fedilink
    English
    38 hours ago

    I mean, the fastest method is likely to just plug the phone into PC and pretend it’s a flash drive?

    • @Hawk
      link
      English
      45 hours ago

      From memory MTP is pretty flaky and quite slow.

      ADB push is pretty good but at that stage rsync is just as easy.

      Put SSH in the phone and you can do it all from the computer too.

      • @[email protected]
        link
        fedilink
        English
        25 hours ago

        MTP’s not bad anymore. It works perfectly well in Windows Linux and Mac these days and is as fast as anything else.

        • @Hawk
          link
          English
          12 hours ago

          Oh good to know.

          It used to be awful but I’m glad to hear it’s improving.

    • @[email protected]
      link
      fedilink
      English
      18 hours ago

      I don’t know if it is always the fastest. I know they said android, but for example on not too old Apple phones (pre-usb c), I had the impression you could get better throughout on wifi compared to a cable connection. Maybe that’s just apple trying to squeeze money on proprietary connectors, but other manufacturers seem to copy their worst takes sometimes though.

  • @[email protected]
    link
    fedilink
    English
    18 hours ago

    I’ll add in Bitwarden Send (including self-hosted vaultwarden), although probably doesn’t make sense if you’re not already using it for password management.

  • Lettuce eat lettuce
    link
    fedilink
    English
    352 days ago

    I love localsend.

    Works on Linux, Android, iOS, Windows, and Mac. It is basically an OS agnostic Airdrop.

    It’s FOSS, so you can go to the Github and build from source for OpenBSD, but I have no idea if that would work.

    • @[email protected]OP
      link
      fedilink
      English
      32 days ago

      Dart (the language it’s written in) doesn’t work on BSD, so sadly that’s out of the question for now.

      • @Hawk
        link
        English
        15 hours ago

        Maybe snapdrop?

        When I was obsd I did FTP and rsync for everything. Syncthing had dinner performance issues for me.

        Maybe Seafile but I had a bad time with that.

  • @[email protected]
    link
    fedilink
    English
    41
    edit-2
    2 days ago

    Here are a bunch of local services I’ve used at one point or another from phone to PC or PC to PC. Not sure if any links are out of date.

    KDE Connect

    Wormhole (Closed Source)

    LocalSend

    SnapDrop

    ShareDrop

    FilePizza

    Original Wormhole

    PeerTransfer

    JustBeamIt

    Send Visee

      • Arkhive (they/she)
        link
        fedilink
        English
        82 days ago

        Another +1 for it here. Use it multiple times a day between Linux, MacOS, android, and iOS.

    • @[email protected]
      link
      fedilink
      English
      152 days ago

      +1 KDE Connect. File transfer works great on Android, Linux, and even on Windows 10/11! Clipboard sync is also a game changer; super easy to copy and paste across devices.

    • @[email protected]
      link
      fedilink
      English
      31 day ago

      PairDrop is a fork of SnapDrop, which at one point had more features and active development. Don’t know, how it is nowadays though.

  • hendrik
    link
    fedilink
    English
    22
    edit-2
    2 days ago

    Kdeconnect. Alternatively NextCloud or sending an email to myself.

  • deadcatbounce
    link
    fedilink
    English
    5
    edit-2
    1 day ago

    Syncthing is fast. I have an IPv6 setup too which seems to help.

    I have my downloads directory on my desktop linked to a downloads directory on my Android; you can’t link to the real Android downloads directory anymore so I use another.

    When the file is removed from the desktop downloads directory it disappears from mobile.

    I tried using Bluetooth between them but it’s more fiddly than Syncthing with my config. Switch Bluetooth on on desktop, connect to desktop, send file, disconnect, move file. Whereas Syncthing is always on.

    However, before I started using Obsidian notes I used to transfer URLs using Signal’s Note-to-self thing. Signal on both desktop and mobile.

    Obviously, I sync between mobile and desktop Obsidian using Syncthing.

  • @[email protected]
    link
    fedilink
    English
    12
    edit-2
    2 days ago

    https://pairdrop.net/

    open source, can be self hosted or you can use the official instance.


    Personally I have been using KDE connect most of the time when I am at home.

    Pairdrop I use more when sharing with other people across the internet.

    • @[email protected]OP
      link
      fedilink
      English
      11 day ago

      pairdrop

      I like this a lot.

      A question. Docs say:

      Your files are sent using WebRTC, encrypting them in transit. Still you have to trust the PairDrop server. To ensure the connection is secure and there is no MITM there is a plan to make PairDrop zero trust by encrypting the signaling and implementing a verification process. See issue #180 to keep updated.

      Does this mean if you self-host on your LAN for personal use without https, then nothing is encrypted, or does WebRTC negotiate its own crypto?