Piwigo behind Traefix?

Hello all

I would like to publish my piwigo gallery outside my LAN befind a Traefik reverse proxy

I’m struggling to set-up piwigo & Traefik. Piwigo is reachabe with IP: port on my lan but not with my domain name.

All I can reach is an error 404 when trying to reach piwigo or whoami service.

I’ve checked the DNS with my MYDOMAIN_NAME and TCP port 80 & 443 are opened on my router

Can piwigo work behind Traefik ?

Here are my docker compose file for traefik & piwigo

traefik +whoami

version: '3.9'
services:
  traefik:
    image: "traefik:latest"
    container_name: "traefik"
    restart: unless-stopped
    command:
      - "--providers.docker=true"
      - "--entrypoint.web.adrdress=:80"
    networks:
      - traefik_network
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /home/traefik/traefik.toml:/traefik.toml:ro
      - /home/traefik/acme.json:/acme.json

  whoami:
    image: "traefik/whoami"
    container_name: "whoami"
    labels:
      - traefik.enable=true
      - traefik.docker.network=traefik_network
      - traefik.http.routers.whoami.rule=(Host(`******`) && PathPrefix(`/dashboard.`))
      - traefik.http.routers.whoami.entrypoints=web
      - traefik.http.routers.whoami.tls.certresolver=leresolver

    networks:
     - traefik_network

networks:
  traefik_network:
    external: true


traefix.toml :

 [providers.docker]
  endpoint = "unix:///var/run/docker.sock"
  watch = true
  exposedByDefault = false

[entryPoints.web]
  address = ":80"
#  [entryPoints.web.http.redirections.entryPoint]
#    to = "websecure"
#    scheme = "https"

[entryPoints.websecure]
  address = ":443"


[certificatesResolvers.leresolver.acme]
  email = *****@gmail.com"
  storage = "acme.json"
  [certificatesResolvers.leresolver.acme.httpChallenge]
    entryPoint = "web"

# dashboard configuration
[api]
  dashboard = true
  insecure = true

# traefik logs configuration
[logs]
  Level =  "debug"
  filePath = "traefik.log"

# traefik access log
[accessLog]
  level = "debug"
  filePath = "access.log"

Piwigo

version: "3.9"
services:
  piwigo_mtv:
    image: lscr.io/linuxserver/piwigo:latest
    container_name: piwigo_mtv
    restart: unless-stopped
    depends_on:
      - mariadb_mtv
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Paris
    volumes:
      - /home/media/piwigomtv/config:/config
      - /media/disk1/www:/gallerymtv
    networks:
      - traefik_network
      - server_lan
#    ports:
#      - 8112:80
#commande traefik
    labels:
      - traefik.enable=true
      - traefik.docker.network=traefik_network
      - traefik.http.routers.piwigo_mtv.entrypoints=web #,websecure
      - traefik.http.routers.piwigo_mtv.rule=Host(`************`)
      - traefik.http.services.piwigo_mtv.loadbalancer.server.port=8112
 #     - traefik.http.routers.piwigo_mtv.tls=true
 #     - traefik.http.routers.piwigo_mtv.tls.certresolver=leresolver


  mariadb_mtv:
    image: linuxserver/mariadb:latest
    container_name: piwigomtv_db
    environment:
      - PUID=1001
      - PGID=1001
      - MYSQL_ROOT_PASSWORD=********
      - TZ=Europe/Paris
      - MYSQL_DATABASE=piwigo_db
      - MYSQL_USER=*****
      - MYSQL_PASSWORD=****
    networks:
      - server_lan
    volumes:
      - /home/media/piwigomtv/mariadb:/config
    restart: unless-stopped

networks:
  traefik_network:
    external: true

Thanks in advance for your support

We support our own reverse proxy solution, swag, here. Might be best for you to seek help on traefik in traefik support channels/forums.

Hello Driz

After further research, I’m able to able to reach the container where Piwigo is install.

If I’m able to reach installation page when expose the port of the container locally, that’s not the case when I configure with my domain name, Registered & Protected by MarkMonitor,
I obtain a error 404 page

Could you provide some guidance to configure the swag within this container please ?

Thanks in advance