Can you play Minecraft together with different Internet users?

ir
3

Short question. Me and a friend recently bought Minecraft pe. (Playstore) She has her mobile data and I have Wi-Fi at home. Can you still play together in one place, except online?

Sp

No, you have to be in the same network. Unless you rent a server. Just give her your Wi-Fi password.

Ta

You can both play together with a Microsoft account. I can even play along via my xbox

ir

How does it work? Rent a server?