I have a Raspberry pi 4 that is connected to a therm sensor ds18b20. The Raspberry Pi is running a flask application in in port 5000, the app gives the current temperature using the sensor every second.

Then I have a website in html css and javascript in github pages. I my javascript I have a function that uses "fetch" the ip of my raspberry pi to collect the temperature.

But when my github pages website is in the air it gives error in the console saying that it can't connect the ip.

I think that my raspberry pi has a private IP like a home network IP and github pages can't connect to it.

How do I solve this?

I tried changing the port of the flask app but didn't work. I also tried put a static ip and didn't work

  • 2
    Either configure your router to perform “port forwarding” from your public IP to the local IP of your RPi or use reverse tunnelling services like ngrok or equivalent.
    – jcaron
    Aug 10 at 20:14


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.