Reach the container from another device on my local network

Hi team!
so i'm trying to access my web UI from another device all on LAN:
what i can do:

  • i can reach/display the web UI of traefik from another device at # this is the IP of my host, not the container
  • i can curl my app1(whoami): curl -H Host:app1. # i receive the correct answer
    what i can't do:
  • i can't reach the web UI of app1. in my browser nothing happen

if i'm on the host ( i can reach web UI from both

  • app1.localhost = display tthe web UI of whoami
  • localhost = display the web UI of traefik

the point for me it's to close all my port and let traefik manage all my port, basic stuff but i'm blocked
if some mastermind have some free time for help :slight_smile:

    restart: unless-stopped
    container_name: traefik
    hostname: traefik
    image: traefik:v3.0
      - --api.insecure=true 
      - --api.dashboard=true
      - --api.debug=true
      - --providers.docker.exposedByDefault=false
      - "--providers.docker.defaultRule=Host(`localhost`) || (Host(``))"
      - --entrypoints.http.address=:80
      - --providers.docker=true
      - "80:80"
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - "traefik.enable=true" # active la gestion de ce container par Traefik
      - "traefik.http.routers.traefik.rule=Host(`localhost`)  || (Host(``))"
      - "traefik.http.routers.traefik.service=api@internal" 
    image: containous/whoami
      - "traefik.enable=true"
      - "traefik.http.routers.app1.rule=Host(`app1.localhost`)  || (Host(`app1.`))"
      - ""

Can you explain again what does not work?

Is that a URL you try to reach?

exactly !
i'm on the same network but from another computer, trying to reach app1. = nothing then trying to reach display the web UI of traefik
if i'm behind the concerned computer( and go to app1.localhost in my browser , it display something

What is that supposed to mean? A regular IPv4 has x.x.x.x. You can not add a sub-domain to an IP address.

Either you use an IP and port (x.x.x.x:y) or you use a domain name (

Note that some browsers will resolve something like app.localhost always to localhost IP, even if you have something different in your local hosts or DNS.

thx for your help! i was confused and thought the docker.sock could work like dns!