Yea, it's pretty easy if you already have a server. All you need to do is run a docker container, and change the identity.sync.tokenserver.uri setting in about:config. On mobile you have to enable the debug mode by going to "Settings > About Firefox" and tapping the Firefox logo a few times, then go to the new "Sync Debug" settings entry.
The container above only runs the sync-server though, you still have to log into a Mozilla account to use it. There is a replacement that includes the whole stack, but I haven't tried that one yet.
Though if it still requires a Mozilla account I'm not sure its really worth it. If I'm trusting them enough to sign in through their account, then I trust them enough to believe its all e2ee anyways. So I'm not sure I'd be gaining much.
I'll look into the full stack though. If its just a case of a few other containers in a compose file, I'd give it a try.