I’m here on the D8 Visa, which allows for self-employment, remote work and the like - just not taking a local job. I’m a freelance software developer so this was the correct type of visa, as I suspect it would be for a lot of Lemmings.
You can apply by mail within the US, you ultimately send your passport and a bunch of documents like your birth certificate to the Portuguese embassy in DC. In the end, you’ll get a visa in your passport that lets you enter Portugal for six months. Then once you’re here, you’ll ultimately go to the immigration agency and exchange it for a credit card sized residence title, kind of like a green card.