• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Networking & Access SOLVED: Jellyfin and Nginx proxy manager both in Docker

     
    • 0 Vote(s) - 0 Average

    SOLVED: Jellyfin and Nginx proxy manager both in Docker

    Need help making it work
    Ghost
    Offline

    Junior Member

    Posts: 10
    Threads: 5
    Joined: 2023 Jul
    Reputation: 0
    #1
    2023-07-25, 09:38 PM
    I have both jellyfin and Nginx proxy manager in docker containers. I have tried all sorts of combinations of configurations and cant get it to work. Jellyfin works fine. I can reach it at localhost:8096. I want to reach it at my jellyfin.domain.com. Based on videos Ive watched I have put the jellyfin container on the Nginx network in docker and removed the ports. I successfully got a ssl cert for my domain in NPM and then in the NPM gui I added a proxy host and put http for the scheme, jellyfin for the hostname and 80 for the forward port but i just get a 502 bad gateway error when opening jellyfin.domain.com. I tried this with other docker containers i have and it worked fine for other subdomains i made but doesn't seem to work with jellyfin. Also i have done this and got it to work before when it wasn't in docker but docker seems to be making it extra difficult. If anyone has done this before and could do a walk through or offer any help it would be greatly appreciated!

    Below is what I believe to be the nginx config file that was created if that helps

    # ------------------------------------------------------------
    # jellyfin.domain.com
    # ------------------------------------------------------------


    server {
      set $forward_scheme http;
      set $server        "jellyfin";
      set $port          80;

      listen 80;
    listen [::]:80;

    listen 443 ssl http2;
    listen [::]:443 ssl http2;


      server_name jellyfin.domain.com;


      # Let's Encrypt SSL
      include conf.d/include/letsencrypt-acme-challenge.conf;
      include conf.d/include/ssl-ciphers.conf;
      ssl_certificate /etc/letsencrypt/live/npm-4/fullchain.pem;
      ssl_certificate_key /etc/letsencrypt/live/npm-4/privkey.pem;




    # Asset Caching
      include conf.d/include/assets.conf;


      # Block Exploits
      include conf.d/include/block-exploits.conf;







        # Force SSL
        include conf.d/include/force-ssl.conf;




    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    proxy_http_version 1.1;


      access_log /data/logs/proxy-host-1_access.log proxy;
      error_log /data/logs/proxy-host-1_error.log warn;

    location / {
            # Proxy main Jellyfin traffic
            proxy_pass http://192.168.1.225:8096;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Forwarded-Protocol $scheme;
            proxy_set_header X-Forwarded-Host $http_host;

            # Disable buffering when the nginx proxy gets very resource heavy upon #treaming
            proxy_buffering off;
        }

    location /embywebsocket {
            # Proxy Jellyfin Websockets traffic
            proxy_pass http://192.168.1.225:8096;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Forwarded-Protocol $scheme;
          proxy_set_header X-Forwarded-Host $http_host;
      }





      # Custom
      include /data/nginx/custom/server_proxy[.]conf;
    }
    Go to solution
    LambTalk
    Offline

    Junior Member

    Posts: 15
    Threads: 0
    Joined: 2023 Jun
    Reputation: 3
    #2
    2023-07-26, 04:43 AM
    In NPM, you need to set the port to 8096, not 80. Even though you've removed 8096 from your exposed ports, that's still the internal port that Jellyfin is listening on
    Grumblegoof
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2023 Jul
    Reputation: 0
    #3
    2023-07-26, 08:45 AM (This post was last modified: 2023-07-26, 10:15 AM by Grumblegoof. Edited 4 times in total.)
    How are you running the containers? Do you have a compose-file?

    Not that familiar with nginx, or this particular proxy manager. But if I was to speculate; Looking at your config, I'd expect the proxy_pass address to be http://jellyfin-container-name:8096
    Ghost
    Offline

    Junior Member

    Posts: 10
    Threads: 5
    Joined: 2023 Jul
    Reputation: 0
    #4
    2023-07-26, 02:42 PM
    (2023-07-26, 04:43 AM)LambTalk Wrote: In NPM, you need to set the port to 8096, not 80. Even though you've removed 8096 from your exposed ports, that's still the internal port that Jellyfin is listening on

    Ok this worked! I was confused because I tried it on another container and it worked like a charm using port 80 in npm but I just looked and that container is listening on port 80 internally so thats why that worked. Anyways thank you so much!
    Ghost
    Offline

    Junior Member

    Posts: 10
    Threads: 5
    Joined: 2023 Jul
    Reputation: 0
    #5
    2023-07-26, 05:29 PM
    (2023-07-26, 08:45 AM)Grumblegoof Wrote: How are you running the containers? Do you have a compose-file?

    Not that familiar with nginx, or this particular proxy manager. But if I was to speculate; Looking at your config, I'd expect the proxy_pass address to be http://jellyfin-container-name:8096

    I appreciate the help but the post above yours fixed it. Thank you!
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode