Flashing ESPhome

My system consists of a hassIO in an unRAID VM.
I want to flash a nodemcu using the hassIO version of ESPhome.

I have tried and failed getting an error that it can not connect over OTA.

Is there a procedure for doing this. Where I do not have to plug in the device to the unRAID server.

Thanks