No domain access within the docker network

I have two tunnels running on different devices and in different houses. I use docker compose to run cloudflared, and I register access to services in the cloudflare panel by the name of the container and its port in the panel. On one device it works without problems, but on another it does not work at all.
Moreover, if I enter the IP of the device on which the container is running, everything works without problems, otherwise bad gateway

version: '3.9'
services:
# Cloudflared
  tunnel:
    container_name: tunnel
    image: cloudflare/cloudflared
    restart: unless-stopped
    command: tunnel run
    environment:
      - TUNNEL_TOKEN=MYTOKEN

# Vaultwarden
  vaultwarden:
    container_name: vaultwarden
    image: vaultwarden/server:latest
    volumes:
      - ./vaultwarden/:/data/
    ports:
      - 8182:80
    restart: unless-stopped

In the cloudflare panel I enter:
vaultwarden:8182

What are the logs from the cloudflared container?
docker compose logs -n 50 tunnel

Logs https://pastebin.com/QdzGh9qq

Ah, I see it

You want vaultwarden:80. 8182 is the port that is mapped to port 80 in the container.

on another device I enter exactly the port that is used for redirection and everything works there

I just checked on another device the port matches, I entered port 80 and it worked, thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.