It is difficult to host a web server with your home internet when the IP keeps changing. To overcome that we can use a free service provided by NoIP.com
Copy the contents below into a file name “update_ip.sh”
myip=$(curl checkip.amazonaws.com)
username='oofnivek'
password='password'
hostname='oofnivek.ddns.me'
curl "http://$username:$password@dynupdate.no-ip.com/nic/update?hostname=$hostname&myip=$myip"
Remember to give your “update_ip.sh” file execute rights by doing
chmod +x update_ip.sh
Lastly configure crontab to execute it say every 5 minutes.