#Immich nginx reverser proxy, jellyfin conflicto - ayuda por favor

1 messages · Page 1 of 1 (latest)

viscid thicket
#

hi people, can you help me? i am trying to configure nginx with immich and i have a problem, as in the file /etc/nginx/sites-available i had until now jellyfin.conf now i have created another one that is for immich with immich.conf adding this:

server {
    server_name immich.mydomain.tld;

    # allow large file uploads
    client_max_body_size 50000M;

    # Set headers
    proxy_set_header Host              $http_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;

    # enable websockets: http://nginx.org/en/docs/http/websocket.html
    proxy_http_version 1.1;
    proxy_set_header   Upgrade    $http_upgrade;
    proxy_set_header   Connection "upgrade";
    proxy_redirect     off;

    # set timeout
    proxy_read_timeout 600s;
    proxy_send_timeout 600s;
    send_timeout       600s;

    location / {
        proxy_pass http://192.168.96.111:2283;
    }
}```

I also added it through a symbolic link to `/etc/nginx/sites-enabled` but when I access immich I get `http://immich.mydomain.tdl/web` where `/web` is equivalent to something from the jellyfin url when I access it, I don't know why there is this conflict but I can't solve it, this is how it looks when I access the immich url

PD:  for what it's worth I share the end of the `jellyfin.conf` file in case you can help me to find the error, I would be very grateful!
twilit orioleBOT
#

:wave: Hey @viscid thicket,

Thanks for reaching out to us. Please follow the recommended actions below; this will help us be more effective in our support effort and leave more time for building Immich immich.

References

Checklist

  1. :blue_square: I have verified I'm on the latest release(note that mobile app releases may take some time).
  2. :blue_square: I have read applicable release notes.
  3. :blue_square: I have reviewed the FAQs for known issues.
  4. :blue_square: I have reviewed Github for known issues.
  5. :blue_square: I have tried accessing Immich via local ip (without a custom reverse proxy).
  6. :blue_square: I have uploaded the relevant logs, docker compose, and .env files using the buttons below or the /upload command.
  7. :blue_square: I have tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

viscid thicket
#
  
location = / {
        return 302 http://$host/web/;
        return 302 https://$host/web/;
    }

    location / {
        # Proxy main Jellyfin traffic
        proxy_pass http://$jellyfin: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 streaming
        proxy_buffering off;
    }

    # location block for /web - This is purely for aesthetics so /web/#!/ works instead of having to go to /web/index.html/#!/
    location = /web/ {
        # Proxy main Jellyfin traffic
        proxy_pass http://$jellyfin:8096/web/index.html;
        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;
    }

    location /socket {
        # Proxy Jellyfin Websockets traffic
        proxy_pass http://$jellyfin: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;
    }
}
#

this is what I look like when I log in

#

I am running the server on a LXC (ubuntu 24.04) inside proxmox although this is not relevant, I am also running the nginx server on another LXC which is where jellyfin is, I would like someday to have a single LXC machine for all the reverse proxies of various machines/services but if I could solve this I would be satisfied.

scarlet vapor
#

Please post the full jellyfin conf and un redact your domain from the browser, especially the beginning. Pretty critical to this issue

#

Your jellyfin config is so complex, as well. You can literally just do location / and include web sockets in that one block and be done

#

I recommend cleaning that up a bit

viscid thicket
glass iron
#

Your jellyfin config has immich. in it

viscid thicket
viscid thicket
#

What do I have to modify to make it work for me?

#

I would appreciate it very much

viscid thicket
#

@glass iron

worn kite
warm dome
worn kite
#

description says it is... but for jellyfin, not for immich
but he has immich as server_name on both files

viscid thicket
viscid thicket
worn kite
#

its kind of difficult if you only post partial configs...
immich config would be missing the listen statements unless you have it in your real config

viscid thicket
worn kite
#

well, do you have the listen statements in your immich.conf?

viscid thicket
#
server {
    listen 80;
    listen [::]:80;
    server_name immich.mydomain.tdl;

    # allow large file uploads
    client_max_body_size 50000M;

    # Set headers
    proxy_set_header Host              $http_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;

    # enable websockets: http://nginx.org/en/docs/http/websocket.html
    proxy_http_version 1.1;
    proxy_set_header   Upgrade    $http_upgrade;
    proxy_set_header   Connection "upgrade";
    proxy_redirect     off;

    # set timeout
    proxy_read_timeout 600s;
    proxy_send_timeout 600s;
    send_timeout       600s;

    location / {
        proxy_pass http://192.168.96.111:2283;
    }
}
worn kite
#

see... it is kind of annoying if you only send part of the config.... what reason would there be to omit that?

viscid thicket
#

I didn't snow it before because I forgot about it.

worn kite
viscid thicket
#

I have to say that the part of: (in immich conf)

listen 80;
listen [::]:80;

I put it on my own, I don't know if it is necessary or not.

strong tusk
#

port 80 should have its own server-block:

server {
if ($host = xxxxxxxxxxxxxxx) {
return 301 https://$host$request_uri/;
} # managed by Certbot
listen 80 ;
listen [::]:80 ;
server_name xxxxxxxxxxxxx;
return 404; # managed by Certbot
}

and ideally you use certbot to get an SSL cert for the domain as certbot will also create the correct nginx config for you (if not present)

viscid thicket
warm dome
viscid thicket
viscid thicket
#

the nginx certbot modified my immich.conf file in an intelligent way, there are many things that it added and just in case I don't want to remove them (even if they seem to be repeated) thank you all for helping me.

worn kite
#

@viscid thicket can I DM you?
I would like to tell you some problems with your setup that you might not want to be disclosed here.
everything further we can continue to discuss in detail in here

viscid thicket
worn kite
#

i messaged you in private, any further doubts, feel free to discuss in here and I will try to give a helping hand or point you in the right direction