404 not found for paperless-ngx

Hi,

I've started to use traefik in my portainer+docker app.

I've already a bunch of services that are properly working, but I'm struggling to setup paperless-ngx.

When I try to reach the url paperless.xyz.com, I just get a 404.

Any idea what I'm missing?

Here is my yml file:

services:

  traefik:
    image: "traefik:latest"
    container_name: "traefik"
    command:
      #- "--log.level=DEBUG"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.myresolver.acme.dnschallenge=true"
      - "--certificatesresolvers.myresolver.acme.dnschallenge.provider=ovh"
      - "--certificatesresolvers.myresolver.acme.email=aaa@bbb.com"
      - "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "8080:8080"
      - "443:443"
    environment:
      - "OVH_ENDPOINT=ovh-eu"
      - "OVH_APPLICATION_KEY=AAA"
      - "OVH_APPLICATION_SECRET=BBB"
      - "OVH_CONSUMER_KEY=CCC"
    volumes:
      - "./letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    restart: always
      
  whoami:
    image: "traefik/whoami"
    container_name: "simple-service"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.whoami.rule=Host(`whoami.xyz.com`)"
      - "traefik.http.routers.whoami.entrypoints=websecure"
      - "traefik.http.routers.whoami.tls.certresolver=myresolver"
    restart: always


  ddns-updater:
    image: qmcgaw/ddns-updater
    container_name: ddns-updater
    volumes:
      - /home/j4n/ddns/data:/updater/data
    ports:
      - 8007:8007/tcp
    environment:
      - PERIOD=5m
      - CONFIG=
      - UPDATE_COOLDOWN_PERIOD=5m
      - PUBLICIP_FETCHERS=all
      - PUBLICIP_HTTP_PROVIDERS=all
      - PUBLICIPV4_HTTP_PROVIDERS=all
      - PUBLICIPV6_HTTP_PROVIDERS=all
      - PUBLICIP_DNS_PROVIDERS=all
      - PUBLICIP_DNS_TIMEOUT=3s
      - HTTP_TIMEOUT=10s

      # Web UI
      - LISTENING_PORT=8007
      - ROOT_URL=/

      # Backup
      - BACKUP_PERIOD=0 # 0 to disable
      - BACKUP_DIRECTORY=/updater/data

      # Other
      - LOG_LEVEL=info
      - LOG_CALLER=hidden
      - SHOUTRRR_ADDRESSES=
    restart: always
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.ddns-updater.rule=Host(`ddns.xyz.com`)"
      - "traefik.http.routers.ddns-updater.entrypoints=websecure"
      - "traefik.http.routers.ddns-updater.tls.certresolver=myresolver"
      - "traefik.http.services.ddns-updater.loadbalancer.server.port=8007"
      
      
  medusa:
    image: linuxserver/medusa
    container_name: medusa
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /home/j4n/medusa/config:/config
      - /home/j4n/medusa/downloads:/downloads
      - /home/j4n/media/tv:/tv
    ports:
      - 8081:8081
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.medusa.rule=Host(`medusa.xyz.com`)"
      - "traefik.http.routers.medusa.entrypoints=websecure"
      - "traefik.http.routers.medusa.tls.certresolver=myresolver"
      - "traefik.http.services.medusa.loadbalancer.server.port=8081"

  emby:
    image: lscr.io/linuxserver/emby:latest
    container_name: emby
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /home/j4n/emby/config:/config
      - /home/j4n/media/tv:/data/tvshows
      - /home/j4n/media/movies:/data/movies
      #- /opt/vc/lib:/opt/vc/lib #optional
    ports:
      - 8096:8096
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.emby.rule=Host(`emby.xyz.com`)"
      - "traefik.http.routers.emby.entrypoints=websecure"
      - "traefik.http.routers.emby.tls.certresolver=myresolver"
      - "traefik.http.services.emby.loadbalancer.server.port=8096"
    restart: unless-stopped
    
  paperless-ngx:
    image: lscr.io/linuxserver/paperless-ngx:latest
    container_name: paperless-ngx
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Zurich
    volumes:
      - /home/j4n/paperless/config:/config
      - /home/j4n/paperless/data:/data
    ports:
      - 8010:8000
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.paperless.rule=Host(`paperless.xyz.com`)"
      - "traefik.http.routers.paperless.entrypoints=websecure"
      - "traefik.http.services.paperless.loadbalancer.server.port=8010"

If I try to reach localhost:8010, I can access paperless, so I'm guessing I'm missing something in the traefik setup?

All your working services have 5 labels, the problematic one only 4. Maybe one is missing :slight_smile:

Thanks for the answer, I've also tried with the additional line, but same result.

You need the extra label to enable LetsEncrypt TLS for the service. Or you assign LetsEncrypt centrally in your static entrypoint section to websecure.

If your service is listening internally on 8000, then you need .loadbalancer.server.port=8000. Normally you would use a Docker network and connect Traefik and all services to it. You usually don't use ports to expose service ports on the host. Traefik provider.docker uses Docker internal IPs and connects directly.

What does the Traefik debug log tell you?

Hi,
Thanks for the response.

I didn't know the port was the container internal one, good to know! I will keep the ports for now, just to be able to connect if my traefik setup isn't working properly.

I tried to set the server.port to 8000, but I've still the same error.

I also tried to set the debug level, but I got: failed to deploy a stack: services.traefik Additional property log is not allowed

In the traefik console, I don't see much:

time="2023-02-07T09:48:06Z" level=info msg="Configuration loaded from flags."
In the traefik web interface, everything is indicated as working also.

I just noticed that when I access paperless-ngx, it's on HTTP(not HTTPS), is it still possible to map it on HTTPS? Does it require some additional label?

Nevermind, after updating the port, it tooks a couple of F5 to fully refresh the browser

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