“When do I buy her engagement ring?”

I’m planning on proposing to my gf after a year of travelling, and I don’t know whether to buy the ring before leaving or while away. If bought while we’re away and something goes wrong with the ring once we’re home it could be complicated to fix and get sorted.

If I buy it before we go and we’re staying in hostels, it could be risky, as it could get lost or she could even find it. Even if I bought it here, taking it away could be difficult in my luggage, or on my person with the metal detector lol! Anyone have any advice on what to do?