Answer the question
In order to leave comments, you need to log in
How to make a global server for esp8266?
I need to make a Web server for esp8266 , but make it not within the router, but accessible from anywhere in the world.
No matter how much I google, instructions are everywhere on how to make a local one.
I want to make an HTML or PHP page so that data is transferred from Arduino to the site, and vice versa.
Answer the question
In order to leave comments, you need to log in
https://radioprog.ru/post/866
/* Настройки IP адреса */
IPAddress local_ip(192,168,1,1); // вставьте белый адрес, На самом деле не стоит
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,255,0);
You need to start with the fact that each device must have its own network address (IPv4, IPv6) and then it can be accessible within a certain subnet. Usually websites are accessed by domain name.
Depending on the goals, you can use access via HTTP (REST API in PHP, for example), MQTT and others.
0. Your ISP gives you a white, or at least gray, but at least some external IP. It won't take off without it.
1. Run according to the instructions that about the local one.
2. In the router settings, forward external connections to port 80 (the standard browser port) to the port of your esp-shki. (google "how to forward port model_router")
That's it, now your esp-box is visible from the Internet, and any Chinese virus can try to hack it.
Optionally, you can buy or register a free domain and link it to your external IP.
fgshfghsdgsdgdgsd.tk
free of charge was just available, for example.
As far as I understand you need an api. Buy hosting or if possible share the server on your machine. I don’t know how Arduino connects, but most likely you will need to specify the address of your api with a key and send POST, GET requests there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question