That's right. The other piece of the puzzle is that you have to either show that you're a resident of a foreign country, or that you're physically outside of the USA for 330 days of the year. (as mentioned in the linked article)
You must either be a bona-fide resident for an uninterrupted period covering the whole tax year[0] or have been out of the US for at least 330 full days in the year[1] although in the latter case your presence in a foreign country must also be legal according to US law.