# Running Traefik and Nginx Proxy Manager on the same Server

**URL:** <https://community.traefik.io/t/running-traefik-and-nginx-proxy-manager-on-the-same-server/15573>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [August 29, 2022, 1:33am UTC](https://community.traefik.io/t/running-traefik-and-nginx-proxy-manager-on-the-same-server/15573 "2022-08-29T01:33:50Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![douglasdtm](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/douglasdtm/32/2002_2.png) [@douglasdtm](https://community.traefik.io/u/douglasdtm)\
**Post date:** [September 12, 2022, 8:16pm UTC](https://community.traefik.io/t/running-traefik-and-nginx-proxy-manager-on-the-same-server/15573/4 "2022-09-12T20:16:27Z")

</div>

Here is an example docker-compose with OSS nginx

```yaml
version: '3'

networks:
  traefik:

services:
  nginx:    
    image: nginx
    environment:
      - NGINX_HOST=nginx.docker.localhost
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik"
      - "traefik.http.routers.nginx.entrypoints=web"
      - "traefik.http.routers.nginx.rule=HostRegexp(`{domain:.+}`)"
      - "traefik.http.routers.nginx.priority=1"
      - "traefik.http.routers.nginx.service=nginx"
      - "traefik.http.services.nginx.loadbalancer.server.port=80"
    networks:
      - traefik

  traefik:
    image: "traefik:v2.8"  
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.api.entrypoints=web"
      - "traefik.http.routers.api.rule=Host(`traefik.docker.localhost`)"
      - "traefik.http.routers.api.service=api@internal"
    command:
      - --providers.docker
      - --entryPoints.web.address=:80
      - --entryPoints.websecure.address=:443
      - --entryPoints.web.forwardedHeaders.insecure
      - --api.dashboard=true
      - --log.level=DEBUG
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - "80:80"
      - "443:443"
    networks:
      - traefik

```

It really doesn't matter what port nginx is listening on but you need to inform Traefik through the service label as seen in he example.

---

_[View the full topic](https://community.traefik.io/t/running-traefik-and-nginx-proxy-manager-on-the-same-server/15573)._
