This little phrase is more interesting than it looks, and I like picking it apart in my head. If you see 'Be happy, stranger' the most straightforward Indonesian rendering is 'Semoga kamu bahagia, orang asing' or more naturally 'Semoga kamu bahagia, wahai orang asing.' The comma matters: with the comma it reads like a direct
wish to someone you don't know. Without punctuation — 'be happy stranger' — it can sound like a noun phrase (the stranger who is happy) or just sloppy English.
If you want synonyms in Indonesian for the two parts separately, 'be happy' can be swapped with 'bersukacita', 'senang', 'gembira', 'riang', or simply 'bahagia'. 'Stranger' can be 'orang asing', 'orang tak dikenal', 'pelintas', or even 'orang lain' depending on tone. So you get combinations like 'Bersukacitalah, orang tak dikenal' or 'Tetaplah bahagia, orang asing.'
Tone-wise, I’d usually go with the smoothest natural line: 'Semoga kamu bahagia, meski kita tak saling kenal.' It sounds warm without being weird, and I kind of like how it leaves a little mystery—someone wishing well to someone they'll never meet.