The holder of a resident permit cannot leave the country for more than 6 consecutive months or 8 non-consecutive months during the validity of each residence permit. However, the Digital Nomad Temporary Stay Visa allows to stay for up to one year in Portugal, with the possibility of renewal and can travel freely in and out of Portugal.