cmehay / docker-tor-hidden-service

232 stars 53 forks source link

traefik configuration #61

Closed Motophan closed 3 years ago

Motophan commented 3 years ago
service:
  jellyfin:
    image: linuxserver/jellyfin:latest
    container_name: jellyfin
    restart: always
    networks:
      - traefik
    security_opt:
      - no-new-privileges=true
    volumes:
      - $USERDIR/docker/jellyfin:/config
      - $USERDIR/docker/jellyfin/cache:/cache
      - /mnt/data:/data
    privileged: True
    restart: always
    environment:
      PUID: $PUID
      PGID: $PGID
      TZ: $TZ
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.jellyfin-rtr.entrypoints=https,http"
      - "traefik.http.routers.jellyfin-rtr.rule=HostHeader(`jellyfin.$DOMAINNAME`, `piracyykgurxq7q2.onion`)"
      - "traefik.http.routers.jellyfin-rtr.tls=true"
      - "traefik.http.routers.jellyfin-rtr.service=jellyfin-svc"
      - "traefik.http.services.jellyfin-svc.loadbalancer.server.port=8096"

  tor:
    image: goldy/tor-hidden-service:latest
    container_name: tor
    links:
      - traefik
    environment:
      PUID: $PUID
      PGID: $PGID
      TZ: $TZ
        # Set mapping ports
      SERVICE1_TOR_SERVICE_HOSTS: 80:traefik:80
      SERVICE1_TOR_SERVICE_KEY: |
          -----BEGIN RSA PRIVATE KEY-----
          [redacted]
          -----END RSA PRIVATE KEY-----
    volumes:
      - $USERDIR/docker/tor:/etc/tor
    networks:
      - traefik
volumes:
  tor-keys:
    driver: local

Traefik is working as expected for jellyfin.domainname.tld If I type somethingelse.domainname.tld it shows a 404, as expected

The expected domain name shows up when

Entrypoint WARNING  ERROR:root:Private key does not seems to be a valid RSA PEM key
Entrypoint WARNING  ERROR:root:Service gpg has not ports set
Entrypoint INFO     service1: piracyykgurxq7q2.onion:80

Tor connects fine

Am I doing this wrong? It doesnt load forever, it fairly quickly shows image

Motophan commented 3 years ago

Solved it!

iamtakingithard commented 3 years ago

Hey @Motophan if you are still active, can you tell me what kind solution it was?

Motophan commented 3 years ago

not using traefik

iamtakingithard commented 3 years ago

Basically, you removed .onion domain right? Can you share your new config if you still have it?

Motophan commented 3 years ago

No. I just connected the tor domain to jellyfin container directly. I cant get traefik to work. If you figure it out, please let me know.