You could run a WebDAV server, like Nextcloud.
On windows it supports thin sync (meaning that it keep a reference to the file instead of the whole file), on Linux not yet, as it is still in alpha (but you can just connect it as a remote disk and be done with it. That's how I do with mines).
If you don't want the whole Nextcloud, there are standalone cli WebDAV servers.