Portugal’s basic long-stay logic: obtain a residence visa abroad and then complete the residence-permit application inside Portugal.
File the long-stay visa or initial residence request before travelling to Portugal.
Enter using the visa or approval that matches the intended purpose of stay.
Complete residence-permit or registration steps after arrival where the system requires it.
Timing varies by consulate and the later AIMA stage.