Large file upload not possible

I am having trouble uploading larger files to my services behind traefik. In this case the service is pwndrop and the filesize is 970MB. It breaks somewhere between 64MB (works) and 100MB (does not work).
This is the error I get in Edge: Screenshot 2021-01-28 001833
This is the error I get in Firefox: Screenshot 2021-01-28 002312

With Firefox the upload doesn't even start and in Edge it starts but stops at the exact same time every time. Without traefik the upload works just fine in Firefox and Edge. Do I have to change some settings to make this work with traefik?

Here are my config files:
docker-compose.yml

version: '3.8'

networks:
  internal:
    external: false
  proxy:
    external: true

services:
  traefik:
    image: traefik
    container_name: traefik
    restart: always
    networks:
      - proxy
    ports:
      - 443:443/tcp
      - 80:80/tcp
    environment:
      - CF_API_EMAIL=$CLOUDFLARE_EMAIL
      - CF_API_KEY=$CLOUDFLARE_API_KEY
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:rw
      - $DOCKERDIR/traefik/acme.json:/acme.json:rw
      - $DOCKERDIR/traefik/dynamic.toml:/dynamic.toml:rw
      - $DOCKERDIR/traefik/traefik.toml:/traefik.toml:rw
    command:
      - --entrypoints.web-secure.http.tls.domains[0].main=$DOMAINNAME
      - --entrypoints.web-secure.http.tls.domains[0].sans=*.$DOMAINNAME
    labels:
      traefik.enable: true
      traefik.http.routers.traefik.entrypoints: web-secure
      traefik.http.routers.traefik.rule: Host(`traefik-vps.$DOMAINNAME`)
      traefik.http.routers.traefik.service: api@internal

  pwndrop:
    image: ghcr.io/linuxserver/pwndrop
    container_name: pwndrop
    networks:
      - proxy
    environment:
      - PGID=$PGID
      - PUID=$PUID
      - TZ=$TZ
    volumes:
      - $DOCKERDIR/pwndrop:/config
    restart: unless-stopped
    ports:
      - 8080:8080
    labels:
      traefik.enable: true
      traefik.http.routers.pwndrop.entrypoints: web-secure
      traefik.http.routers.pwndrop.rule: Host(`pwndrop.$DOMAINNAME`)
      traefik.http.services.pwndrop.loadbalancer.server.port: 8080
      traefik.http.services.pwndrop.loadbalancer.server.scheme: http

traefik.toml

[global]
  checkNewVersion = true
  sendAnonymousUsage = false

[serversTransport]
  insecureSkipVerify = true
  maxIdleConnsPerHost = 0

################################################################
# Entrypoints configuration
################################################################

[entryPoints]
  [entryPoints.web]
    address = ":80"
    [entryPoints.web.http.redirections]
      [entryPoints.web.http.redirections.entryPoint]
        to = "web-secure"
        scheme = "https"
  [entryPoints.web-secure]
    address = ":443"
      [entryPoints.web-secure.http.tls]
        certResolver = "default"
  [entryPoints.metrics]
    address = ":8082"

################################################################
# Traefik logs configuration
################################################################

[log]
  level = "ERROR"

################################################################
# Access logs configuration
################################################################

[accessLog]
  filePath = "/var/log/access.log"

################################################################
# Metrics configuration
################################################################

[metrics]
  [metrics.prometheus]
    entryPoint = "metrics"

################################################################
# API and dashboard configuration
################################################################

[api]
  dashboard = true
  insecure = false

################################################################
# Providers
################################################################

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

[providers.file]
  filename = "dynamic.toml"
  watch = true

################################################################
# TLS
################################################################

[tls]
  [tls.options]
    [tls.options.default]
      minVersion = "VersionTLS12"
      sniStrict = true

################################################################
# Cert Resolver
################################################################

[certificatesResolvers]
  [certificatesResolvers.default]
    [certificatesResolvers.default.acme]
      email = "****@*****.***"
      storage = "acme.json"
      [certificatesResolvers.default.acme.dnsChallenge]
        provider = "cloudflare"
        delayBeforeCheck = "90"
        resolvers = ["1.1.1.1:53", "8.8.8.8:53"]
1 Like

After I tried other reverse proxys and had the same issue I looked at cloudflare and the free tier only allows uploads up to 100MB if you use their proxy. Disabling the proxy for this specific dns entry solves the problem.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.