Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Setting up traefik reverse proxy in docker container with static IP

Featured Replies

I am super new to Unraid and servers in general, I am trying to setup a traefik reverse proxy in docker.

I am following the instructions from this repo https://github.com/duhio/docker-compose-usenet but I don't want to have to move the Unraid webui to a custom port, instead I would like to setup the traefik docker container to have it's own IP and the port forward to the docker container IP on 80 and 443, then I can just access the unraid webui when I VPN onto my home network.

I have modified the docker-compose.yml to suit my needs and added a networks block like so:

---
version: '3'

services:

  traefik:
    image: traefik:latest
    command: --web --docker --docker.watch --docker.domain=${DOMAIN} \
             --docker.exposedbydefault=false --acme.domains=${DOMAIN}
    container_name: traefik
    hostname: traefik
    #ports:
      #- "80:80"
      #- "443:443"
    networks:
      local:
        ipv4_address: 10.0.0.1
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ${CONFIG}/traefik/acme.json:/acme.json
      - ${CONFIG}/traefik/traefik.toml:/etc/traefik/traefik.toml
      - ${CONFIG}/traefik/.htpasswd:/etc/traefik/.htpasswd:ro
    labels:
      traefik.enable: "true"
      traefik.frontend.rule: "Host:monitor.${DOMAIN}"
      traefik.port: "8080"
      traefik.frontend.auth.basic: "${HTPASSWD}"
      com.ouroboros.enable: "true"
    restart: unless-stopped

  ouroboros:
    image: pyouroboros/ouroboros
    container_name: ouroboros
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - PGID
      - PUID
      - TZ
      - CLEANUP=true
      - INTERVAL=86400  # 24hrs
      - SELF_UPDATE=true
      - LABELS_ONLY=true
    restart: unless-stopped

  plex:
    image: linuxserver/plex
    container_name: plex
    hostname: plex
    ports:
      - "32400:32400"
      - "32400:32400/udp"
      - "32469:32469"
      - "32469:32469/udp"
      - "1900:1900/udp"
    volumes:
      - ${CONFIG}/plex:/config
      - ${DATA}/TV:/media/tv
      - ${DATA}/movies:/media/movies
      - ${DATA}/music:/media/music
      - ${DATA}/anime:/media/anime
    environment:
      - PGID
      - PUID
      - TZ
      - VERSION=latest
    labels:
      traefik.enable: "true"
      traefik.port: "32400"
      traefik.frontend.rule: "Host:plex.${DOMAIN}"
      com.ouroboros.enable: "true"
    restart: unless-stopped

  plexpy:
    image: linuxserver/tautulli:latest
    container_name: tautulli
    hostname: tautulli
    ports:
      - "8181:8181"
    volumes:
      - ${CONFIG}/plexpy:/config
      - ${CONFIG}/plex/Library/Application Support/Plex Media Server/Logs:/logs:ro
    environment:
      - PGID
      - PUID
      - TZ
    labels:
      traefik.enable: "true"
      traefik.port: "8181"
      traefik.frontend.rule: "Host:tautulli.${DOMAIN}"
      traefik.frontend.auth.basic: "${HTPASSWD}"
      com.ouroboros.enable: "true"
    restart: unless-stopped

  heimdall:
    image: duhio/heimdall-https:latest
    container_name: heimdall
    hostname: heimdall
    volumes:
      - ${CONFIG}/heimdall:/config
    environment:
      - PGID
      - PUID
      - TZ
    labels:
      traefik.enable: "true"
      traefik.port: "80"
      traefik.frontend.rule: "Host:${DOMAIN}"
      traefik.frontend.auth.basic: "${HTPASSWD}"
      com.ouroboros.enable: "true"
    restart: unless-stopped

  ombi:
    image: linuxserver/ombi
    container_name: ombi
    hostname: ombi
    ports:
      - "3579:3579"
    volumes:
      - ${CONFIG}/ombi:/config
    environment:
      - PGID
      - PUID
      - TZ
    labels:
      traefik.enable: "true"
      traefik.port: "3579"
      traefik.frontend.rule: "Host:ombi.${DOMAIN}"
      com.ouroboros.enable: "true"
    restart: unless-stopped

networks:
  local:
    ipam:
      driver: default
      config:
        - subnet: 10.0.0.0/24

However now when I run docker-compose up -d I get the following error:

tautulli is up-to-date
Starting traefik ...
plex is up-to-date
ombi is up-to-date
ouroboros is up-to-date
Starting traefik ... error

ERROR: for traefik  Cannot start service traefik: Address already in use

ERROR: for traefik  Cannot start service traefik: Address already in use
ERROR: Encountered errors while bringing up the project.

If anyone has any docker experience or traefik and knows the cause of the issue any help would be greatly appreciated.

 

UPDATE:

After a bit more digging I have figured out what I need to do I am just having trouble getting it to work with docker-compose, basically I want to assign a static IP on the bridge Unraid provisions automatically for docker containers (br0).

Essentially what I want to do is what I am doing in the below screenshot but via the docker-compose.yml

 

2019-05-20_08-00.thumb.png.3f60d2dd8503889b5ee8bb111e729b26.png

Edited by ChopFitzroy
Updates

  • 1 year later...

I'm facing the same problem.

I want to asign a static IP on interface br0 with docker-compose.

 

Does anyone have a tip?

  • 1 month later...

did you figure it out?

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.