# How do I route to http://host.docker.internal:3000?

**URL:** <https://community.traefik.io/t/how-do-i-route-to-http-host-docker-internal-3000/22320>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [April 17, 2024, 4:44am UTC](https://community.traefik.io/t/how-do-i-route-to-http-host-docker-internal-3000/22320 "2024-04-17T04:44:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![1337washington](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/1337washington/32/8562_2.png) [@1337washington](https://community.traefik.io/u/1337washington)\
**Post date:** [April 17, 2024, 4:44am UTC](https://community.traefik.io/t/how-do-i-route-to-http-host-docker-internal-3000/22320/1 "2024-04-17T04:44:28Z")

</div>

Hi, I am trying to trying to switch my setup from nginx to traefik for a more flexible HTTPS web solution. Is it possible to route traffic to an app that is not running in docker? I am able to do that with nginx via proxy\_pass to [http://host.docker.internal:3000](http://host.docker.internal:3000). nginx is running in a docker container with custom conf. However, I don't know how to set up something of sort with traefik.

```auto
services:
  traefik:
    image: traefik:v3.0
    ports:
      - 80:80
      - 443:443
    networks:
      - traefik
    volumes:
      - ./letsencrypt:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro
    command:
      - --api.dashboard=true
      - --api=true
      - --log.level=DEBUG

      - --entrypoints.http.address=:80
      - --entrypoints.https.address=:443

      - --providers.docker=true

      # LetsEncrypt Staging Server 
      - --certificatesResolvers.letsencrypt.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory

      - --certificatesresolvers.letsencrypt.acme.httpchallenge=true
      - --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=http
      - --certificatesresolvers.letsencrypt.acme.email=${EMAIL}
      - --certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
    labels:
      # Dashboard
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard.rule=Host(`traefik.${DOMAIN}`) && PathPrefix(`/dashboard`)"
      - "traefik.http.routers.dashboard.service=api@internal"
      - "traefik.http.routers.dashboard.tls=true"

  whoami:
    image: traefik/whoami:v1.8
    labels:
      - traefik.http.routers.https.rule=Host(`${DOMAIN}`)
      - traefik.http.routers.https.entrypoints=https
      - traefik.http.routers.https.tls=true
      - traefik.http.routers.https.tls.certresolver=${CERT_RESOLVER}

```

Basically, how do I route traffic to DOMAIN from host\_app:3000 with this?

Thanks!  
😀

---

<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:** [April 18, 2024, 8:38am UTC](https://community.traefik.io/t/how-do-i-route-to-http-host-docker-internal-3000/22320/2 "2024-04-18T08:38:37Z")

</div>

Note that `host.docker.internal` is only available with Docker Desktop, not regular Docker.

To route to an external service, you need to create a dynamic config file with `router` and `service`, which is loaded with `providers.file` in static config:

```auto
http:
  routers:
    plex:
      rule: Host(`plex.example.com`)
      service: plex

  services:
    plex:
      loadBalancer:
        servers:
          - url: http://192.168.0.144:32400

```
