Docker Inter-Server Communication Issue: curl Requests Not Reaching Remote Container

Losuna day ago

I am running Traccar and PostgreSQL in separate Docker installations on different physical servers. I am trying to synchronize data between the servers by sending HTTP requests using curl, but the requests are not reaching the other server. What is the correct way to configure Docker networking, port exposure, and inter-host communication so that containers on one server can successfully send curl requests to services running on another server?

Both servers are on the same LAN.

Ports 8082 and 5055 are exposed on each host.

Curl calls from inside the container return connection errors or 403 Forbidden.

I would like to confirm whether I should use the server’s local IP address, the container name, or a Docker network feature, such as overlay mode.