In order to legally work remotely from Portugal for long periods of time, you’ll have to either become a resident, or apply for the country’s new Digital Nomad Visa.
The Portuguese Digital Nomad Visa is an excellent option for remote workers seeking to settle in Portugal for periods longer than 90 days. There are two streams:
The first is a visa that is valid for stays of up to 12 months (i.e. you don’t get a residency card, just a visa in your passport).
The second is a 2-year residency permit, which features the same requirements as the existing D7 Residency Program, but which accepts active / salaried income, as opposed to passive income.
As a Portuguese Digital Nomad Visa holder, you’ll have the ability to work remotely from within Portugal, and travel visa-free across the rest of the Schengen Area, too.