Syncthing is a way to, well, synchronize files across multiple hosts. My mental model is that it’s a self hosted Dropbox, although it’s not an exact 1-1 comparison.

I’ve been playing around with handheld emulation devices for the last few years. One of the most consistently annoying aspects of using these devices is getting files on and off of them. It’s also uniquely awful depending on your device. If you’re lucky, the device offers some kind of usb disk mounting, although filesystem coherency is risky with those. Sometimes you can pop the microsd card out and mount it on a PC, but the same issues arise plus wear and tear on the slot and the card.

Dealing with the filesystem issues was fine for me, I’m technical. But I recently set one of these up for my sister and she asked for a few more games and the idea of walking her through loading more files on sounded daunting. I needed a better way.

Fortunately the community that manages the software ecosystem around these seems to have settled on syncthing as the best way to manage getting games and saves on and off devices and have baked in support in a lot of the custom firmwares and linux based OSes, and there is reasonable android support for syncthing as well.

It hasn’t been perfect so far. Sometimes the nodes seem to lose track of each other (I didn’t grant all the power permissions in android, so probably that) and because my centralized syncthing hosts files on an NFS share on the synology I end up having to “force” re-scan files because inotify gets weird in that scenario. But that’s not a huge deal. I can either wait for an automatic re-scan or I can push the button.

Here’s the docker container setup.

  syncthing:
    image: linuxserver/syncthing:2.0.2
    hostname: syncthing #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - type: volume
        source: synology_shared
        target: /config
        volume:
          subpath: syncthing/config

      - type: volume
        source: synology_shared
        target: /data1
        volume:
          subpath: syncthing/data

    restart: unless-stopped

My one complaint is that there doesn’t seem to be a way to be a STUN-only relay node. I would happily run a coordination server for them that helps nodes find each other through NATs, but I would prefer not to shuttle people’s content around.