You will most likely need an electrical permit to replace an electrical panel. You should check with your local municipality or power company to see what requirements must be met to obtain the necessary permit to connect.