After flashing a clean EDGEHOG OS, the gateway must be restarted so that it can connect to Server again. The Server will notice that the gateway was already registered and, if you have used the Reinstall OS button, will allow the re-registration. A new MQTT certificate will then be issued.