R
R
Renat8712022-01-17 22:24:14
PHP
Renat871, 2022-01-17 22:24:14

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

4 answer(s)
V
Vladimir Korotenko, 2022-01-18
@Renat871

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);

Just having a white address on the router, do port forwarding
for example 17.17.99.80:8090 -> 192,168,1,1:80 protocol TCP
Or configure NGINX to reverse proxy the local address, the recommended option

R
Roman Mirilaczvili, 2022-01-17
@2ord

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.

S
Stalker_RED, 2022-01-18
@Stalker_RED

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.tkfree of charge was just available, for example.

A
Alexander Sharomet, 2022-01-17
@sharomet

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 question

Ask a Question

731 491 924 answers to any question