From 62bb7aa2eab926075b4c11b0d23eaa1ec99ba046 Mon Sep 17 00:00:00 2001 From: s-prechtl Date: Tue, 24 Mar 2026 15:54:51 +0100 Subject: [PATCH] feat: full config from docs --- hosts/hitsugibune/immich.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/hosts/hitsugibune/immich.nix b/hosts/hitsugibune/immich.nix index 1062d32..2f5cd76 100644 --- a/hosts/hitsugibune/immich.nix +++ b/hosts/hitsugibune/immich.nix @@ -36,17 +36,23 @@ in locations."/" = { proxyPass = "http://localhost:2283"; proxyWebsockets = true; + # https://docs.immich.app/administration/reverse-proxy/ extraConfig = '' - client_max_body_size 0; + # allow large file uploads + client_max_body_size 50000M; - proxy_request_buffering off; + # disable buffering uploads to prevent OOM on reverse proxy server and make uploads twice as fast (no pause) + proxy_request_buffering off; - # Timeouts for large/slow uploads - proxy_connect_timeout 3600s; - proxy_send_timeout 3600s; - proxy_read_timeout 3600s; - send_timeout 3600s; - ''; + # increase body buffer to avoid limiting upload speed + client_body_buffer_size 1024k; + + # Set headers + 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; + ''; }; }; }