It is a solved problem
https://f-droid.org/packages/com.ismartcoding.plain/
There is also localsend, but plainapp needs to run in only one device.
There is also localsend, but plainapp needs to run in only one device.
Can be self-hosted, if that's a concern.