# Reach the container from another device on my local network

**URL:** <https://community.traefik.io/t/reach-the-container-from-another-device-on-my-local-network/22748>\
**Category:** Traefik v3 (latest)\
**Tags:** docker\
**Created:** [May 15, 2024, 1:04pm UTC](https://community.traefik.io/t/reach-the-container-from-another-device-on-my-local-network/22748 "2024-05-15T13:04:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vesuviennes](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/vesuviennes/32/8723_2.png) [@vesuviennes](https://community.traefik.io/u/vesuviennes)\
**Post date:** [May 15, 2024, 1:04pm UTC](https://community.traefik.io/t/reach-the-container-from-another-device-on-my-local-network/22748/1 "2024-05-15T13:04:59Z")

</div>

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 192.168.1.50 # this is the IP of my host, not the container
- i can curl my app1(whoami): curl -H Host:app1.192.168.1.50 [http://192.168.1.50](http://192.168.1.50) # i receive the correct answer  
what i can't do:
- i can't reach the web UI of app1.192.168.1.50 in my browser nothing happen

if i'm on the host (192.168.1.50) 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 🙂

```auto
services:
  traefik:
    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(`192.168.1.50`))"
      - --entrypoints.http.address=:80
      - --providers.docker=true
    ports:
      - "80:80"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    labels:
      - "traefik.enable=true" # active la gestion de ce container par Traefik
      - "traefik.http.routers.traefik.rule=Host(`localhost`) || (Host(`192.168.1.50`))"
      - "traefik.http.routers.traefik.service=api@internal" 
  app1:
    image: containous/whoami
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.app1.rule=Host(`app1.localhost`) || (Host(`app1.192.168.1.50`))"
      - "traefik.http.services.app1.loadBalancer.server.port=80"

```

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [May 15, 2024, 5:18pm UTC](https://community.traefik.io/t/reach-the-container-from-another-device-on-my-local-network/22748/2 "2024-05-15T17:18:08Z")

</div>

Can you explain again what does not work?

> [@vesuviennes](#):
>
> app1.192.168.1.50

Is that a URL you try to reach?

---

<div class="post-metadata">

**Author:** ![vesuviennes](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/vesuviennes/32/8723_2.png) [@vesuviennes](https://community.traefik.io/u/vesuviennes)\
**Post date:** [May 15, 2024, 5:27pm UTC](https://community.traefik.io/t/reach-the-container-from-another-device-on-my-local-network/22748/3 "2024-05-15T17:27:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [May 15, 2024, 7:19pm UTC](https://community.traefik.io/t/reach-the-container-from-another-device-on-my-local-network/22748/4 "2024-05-15T19:19:20Z")

</div>

> [@vesuviennes](#):
>
> app1.192.168.1.50

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 ([sub.example.com](http://sub.example.com)).

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.

---

<div class="post-metadata">

**Author:** ![vesuviennes](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/vesuviennes/32/8723_2.png) [@vesuviennes](https://community.traefik.io/u/vesuviennes)\
**Post date:** [May 16, 2024, 8:55am UTC](https://community.traefik.io/t/reach-the-container-from-another-device-on-my-local-network/22748/5 "2024-05-16T08:55:38Z")

</div>

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