Traefik + Docker + ZNC

Original post on reddit:

I want to set up a ZNC container to keep me logged in to all my IRC channels and I can remotely connect from other devices.

As far as I can tell, ZNC requires TCP connections to actually do the message protocol. I don't care about accessing the dashboard remotely, so I shouldn't need HTTP/S theoretically.

Here is the relevant section of my docker-compose file:

version: '3'

      image: "traefik:v2.1"
      container_name: "traefik"
         - "--log.level=DEBUG"
         - "--api.insecure=true"
         - "--providers.docker=true"
         - "--providers.docker.exposedbydefault=false"
         - "--entrypoints.web.address=:80"
         - "--entrypoints.websecure.address=:443"
         - "--entrypoints.irc.address=:6501"
         - "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
         - ""
         - ""
         - "80:80"
         - "6969:8080" # Admin dashboard
         - "443:443"
         - "6501:6501"
         - "/var/run/docker.sock:/var/run/docker.sock:ro"
         - "$HOME/Data/Programs/Docker/TraefikV2/letsencrypt:/letsencrypt"
         - traefik
      restart: unless-stopped
    image: linuxserver/znc
    container_name: znc_test
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Los_Angeles
      - /home/me/Data/Programs/Docker/ZNC/config/:/config
      - 6501:6501
      - 6697:6697
      - 7894:7894
      - "traefik.enable=true"
      - "traefik.tcp.routers.znc.rule=HostSNI(``)"
      - "traefik.tcp.routers.znc.entrypoints=irc"
      - "traefik.tcp.routers.znc.service=znc"
      - "" 
      - "traefik"

    external: true

I was told to create a separate entrypoint for IRC traffic, which I did on port 6501. I told Traefik to load route ZNC traffic through that entrypoint. I told ZNC to listen on its own port 6501. something is wrong though. Here are some shots of my Traefik dashboard.

Here you can see the entrypoint is IRC on port 6501. I was warned against using SNI with ZNC and IRC in general, but Traefik gives me an error about "unknown rules" if I remove the SNI bit.

Is is the server status that is the issue here? I'm assuming is a docker network address? I am given no error message so I have no clue what's actually going wrong.

ZNC itself seems to be working ok. I can point an IRC client at the local IP and connect to it fine, and it remembers all my channels and stuff. But when I try to connect to it from the outside internet, my clients all just hang and fail to connect.

Hello Raijin.

Looks like traefik don`t connect to container network.
Please enable log and debug to see more.
Also may be you need:

   - ""
   - "--log.level=DEBUG"
  - "--log=true"
  - "--log.filepath=/var/log/traefik.log"
  - "--accesslog=true"
  - "--accesslog.filepath=/var/log/traefik_access.log"