Here’s the info on how to do the OTA on an ESP8266:
http://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html
Scroll down to the HTTP Server section.
I use a free web hosting account from hostinger.co.uk.
In my ESP code I specify the path as follows:
http://xxxxxxxxx.com/A0-B0-C0-D0-E0-F0/updater.ino.bin
where A0-B0-C0-D0-E0-F0 is the MAC address of the ESP to be updated. That makes it easier to manage multiple devices running different firmware.
The only bit that took me a while to figure-out was the Hostinger file structure. When you use their File Manager 2 app you have to navigate to /public_html and that’s where you create your folders with the MAC addresses for your devices, so in the path in the Hostinger file manager would be:
/public_html/A0-B0-C0-D0-E0-F0/updater.ino.bin
You don’t need any scripts running on the server side to do the basic HTTP OTA updates.
Pete.