OTA using different transfer method

We are using 3rd party SIM with own IP address pool and security policy. Therefore it is not possible to connect our devices to the particle cloud. The manual transport is not a big deal over TCP. So my question is: Where do i need to store the firmware and how to initiate the flash process on my electron?