If you are talking about a residency certificate from your local Camara, and assuming you are an EU resident at the moment, then there is no need to have your NIF number registered to your Portuguese address (or even your bank account registered to a PT address); the NIF address and residency certificate are not related. For a residency certificate you only need to have proof of an address in PT (deeds of your house or a rental agreement etc) and possibly proof of money to support yourself or healthcare depending on your local council (though that was never mentioned in my local Camara). Get an atestado (certificate) de residencia from your Freguesia using proof of your PT address (or statements from witnesses) and use that atestado at your Camara to get the residency certificate. You will need an NIF number to do that, but you obviously have one of those already.
Changing the address for your NIF number to PT implies tax residency in PT as far as the Portuguese tax system seems to work (which means filling in a tax return in PT each year, but that is different from having a residency certificate); you would do that at your local Financas office (takes minutes, depending on the queuing system status), but there is no need to do that to get a 5-year temporary residency certificate.