have you tried using a vpn, e.g. tailscale?
extremely easy to set up, if you are a selfhost purist, there’s headscale as a direct alternative.
only really good at doing stuff in a personal workspace, not really made for exposing to the public internet, still very possible tho
nowadays, might be worth looking into nix flakes
tons of super performant nextcloud flakes being uploaded to github, difficulty is understanding nix, but it’s worth it