[GH-ISSUE #1131] The backup function seems not working #5045

Closed
opened 2026-03-01 15:38:28 +03:00 by kerem · 15 comments
Owner

Originally created by @Purgepyro on GitHub (Jun 11, 2025).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1131

Originally assigned to: @0xJacky, @akinoccc on GitHub.

Describe the bug
When I try to create a backup and make it download to my computer, it prompts server error

To Reproduce
(This only happens when nginx-ui run behind nginx reverse proxy.

  1. Go to backup
  2. Click Create Backup
  3. See Error

Expected behavior
/

Screenshots

Image

Info (please complete the following information):

  • Server OS: Debian 12.11
  • Server Arch: x64
  • Nginx UI Version: 2.14
  • Your Browser: Edge
Originally created by @Purgepyro on GitHub (Jun 11, 2025). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1131 Originally assigned to: @0xJacky, @akinoccc on GitHub. **Describe the bug** When I try to create a backup and make it download to my computer, it prompts server error **To Reproduce** (This only happens when nginx-ui run behind nginx reverse proxy. 1. Go to backup 2. Click Create Backup 3. See Error **Expected behavior** / **Screenshots** ![Image](https://github.com/user-attachments/assets/5d9d8d7f-4228-445b-b967-9c2d287bea95) **Info (please complete the following information):** - Server OS: Debian 12.11 - Server Arch: x64 - Nginx UI Version: 2.14 - Your Browser: Edge
kerem 2026-03-01 15:38:28 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@0xJacky commented on GitHub (Jun 11, 2025):

Please provide the reverse proxy configuration. Thanks.

<!-- gh-comment-id:2961399028 --> @0xJacky commented on GitHub (Jun 11, 2025): Please provide the reverse proxy configuration. Thanks.
Author
Owner

@Purgepyro commented on GitHub (Jun 11, 2025):

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
server_name /
listen 443 ssl;
listen 443 quic;
http2 on;
http3_hq on;
quic_gso on;
quic_retry on;
add_header alt-svc 'h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-27=":443"; ma=86400' always;
add_header QUIC-Status $http3;
ssl_early_data on;
ssl_certificate /
ssl_certificate_/
ssl_protocols TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
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_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_pass http://127.0.0.1:9000/;
}
}

<!-- gh-comment-id:2961401663 --> @Purgepyro commented on GitHub (Jun 11, 2025): map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { server_name / listen 443 ssl; listen 443 quic; http2 on; http3_hq on; quic_gso on; quic_retry on; add_header alt-svc 'h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-27=":443"; ma=86400' always; add_header QUIC-Status $http3; ssl_early_data on; ssl_certificate / ssl_certificate_/ ssl_protocols TLSv1.3; ssl_prefer_server_ciphers on; ssl_ciphers HIGH:!aNULL:!MD5; location / { 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_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_pass http://127.0.0.1:9000/; } }
Author
Owner

@0xJacky commented on GitHub (Jun 11, 2025):

Can you execute the following command in the terminal to see the live logs of nginx-ui:

journalctl -fu nginx-ui

Then click the "Create Backup" button to see if errors are outputted in the terminal.

And check by using F12 to see if there are any abnormalities in the network requests.

<!-- gh-comment-id:2961447363 --> @0xJacky commented on GitHub (Jun 11, 2025): Can you execute the following command in the terminal to see the live logs of nginx-ui: ``` journalctl -fu nginx-ui ``` Then click the "Create Backup" button to see if errors are outputted in the terminal. And check by using F12 to see if there are any abnormalities in the network requests.
Author
Owner

@Purgepyro commented on GitHub (Jun 11, 2025):

Jun 11 06:52:22 DMIT-DEB12 nginx-ui[1873]: 2025-06-11 06:52:22 INFO backup/backup.go:183 Backup created successfully: backup-20250611-065219.zip (size: 18164145 bytes)
Jun 11 06:52:22 DMIT-DEB12 nginx-ui[1873]: [GIN] 2025/06/11 - 06:52:22 | 200 | 2.226122111s | 154.17.0.44 | GET "/api/backup"

Also, i don't see any errors in developer tools, their status codes are all 200 or 204

<!-- gh-comment-id:2961459223 --> @Purgepyro commented on GitHub (Jun 11, 2025): Jun 11 06:52:22 DMIT-DEB12 nginx-ui[1873]: 2025-06-11 06:52:22 INFO backup/backup.go:183 Backup created successfully: backup-20250611-065219.zip (size: 18164145 bytes) Jun 11 06:52:22 DMIT-DEB12 nginx-ui[1873]: [GIN] 2025/06/11 - 06:52:22 | 200 | 2.226122111s | 154.17.0.44 | GET "/api/backup" Also, i don't see any errors in developer tools, their status codes are all 200 or 204
Author
Owner

@0xJacky commented on GitHub (Jun 11, 2025):

Can you try to remove the configs about h3?

<!-- gh-comment-id:2961492880 --> @0xJacky commented on GitHub (Jun 11, 2025): Can you try to remove the configs about h3?
Author
Owner

@Purgepyro commented on GitHub (Jun 11, 2025):

I have tried to make the client only use h2 to communicate with server and it works.

<!-- gh-comment-id:2961515038 --> @Purgepyro commented on GitHub (Jun 11, 2025): I have tried to make the client only use h2 to communicate with server and it works.
Author
Owner

@Purgepyro commented on GitHub (Jun 11, 2025):

I guess it is problem of h3

<!-- gh-comment-id:2961521812 --> @Purgepyro commented on GitHub (Jun 11, 2025): I guess it is problem of h3
Author
Owner

@0xJacky commented on GitHub (Jun 11, 2025):

It's not clear what the reason is. However, when I enabled h3 in nginx 1.28.0, the backup could still be exported normally. Here is my configuration.

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name example.com;
    listen  443      quic reuseport;  
    listen  [::]:443 quic reuseport;
    http2 on;
    http3_hq on;
    quic_gso on;
    quic_retry on;
    add_header alt-svc 'h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-27=":443"; ma=86400' always;
    add_header QUIC-Status $http3;
    ssl_early_data on;
    ssl_certificate /etc/nginx/ssl/example.com_P256/fullchain.cer;
    ssl_certificate_key /etc/nginx/ssl/example.com_P256/private.key;
    location / {
        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_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_pass http://127.0.0.1:9000/;
    }
    location /.well-known/acme-challenge {
        proxy_set_header Host $host;
        proxy_set_header X-Real_IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
        proxy_pass http://127.0.0.1:9180;
    }
}
<!-- gh-comment-id:2961578107 --> @0xJacky commented on GitHub (Jun 11, 2025): It's not clear what the reason is. However, when I enabled h3 in nginx 1.28.0, the backup could still be exported normally. Here is my configuration. ``` server { listen 443 ssl; listen [::]:443 ssl; server_name example.com; listen 443 quic reuseport; listen [::]:443 quic reuseport; http2 on; http3_hq on; quic_gso on; quic_retry on; add_header alt-svc 'h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-27=":443"; ma=86400' always; add_header QUIC-Status $http3; ssl_early_data on; ssl_certificate /etc/nginx/ssl/example.com_P256/fullchain.cer; ssl_certificate_key /etc/nginx/ssl/example.com_P256/private.key; location / { 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_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_pass http://127.0.0.1:9000/; } location /.well-known/acme-challenge { proxy_set_header Host $host; proxy_set_header X-Real_IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr:$remote_port; proxy_pass http://127.0.0.1:9180; } } ```
Author
Owner

@Purgepyro commented on GitHub (Jun 11, 2025):

That is really weird

<!-- gh-comment-id:2961596320 --> @Purgepyro commented on GitHub (Jun 11, 2025): That is really weird
Author
Owner

@Purgepyro commented on GitHub (Jun 11, 2025):

It's not clear what the reason is. However, when I enabled h3 in nginx 1.28.0, the backup could still be exported normally. Here is my configuration.

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name example.com;
    listen  443      quic reuseport;  
    listen  [::]:443 quic reuseport;
    http2 on;
    http3_hq on;
    quic_gso on;
    quic_retry on;
    add_header alt-svc 'h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-27=":443"; ma=86400' always;
    add_header QUIC-Status $http3;
    ssl_early_data on;
    ssl_certificate /etc/nginx/ssl/example.com_P256/fullchain.cer;
    ssl_certificate_key /etc/nginx/ssl/example.com_P256/private.key;
    location / {
        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_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_pass http://127.0.0.1:9000/;
    }
    location /.well-known/acme-challenge {
        proxy_set_header Host $host;
        proxy_set_header X-Real_IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
        proxy_pass http://127.0.0.1:9180;
    }
}

Do you confirm that you are using h3 to connect to your nginx-ui? Have you checked it through F12?

<!-- gh-comment-id:2963279330 --> @Purgepyro commented on GitHub (Jun 11, 2025): > It's not clear what the reason is. However, when I enabled h3 in nginx 1.28.0, the backup could still be exported normally. Here is my configuration. > > ``` > server { > listen 443 ssl; > listen [::]:443 ssl; > server_name example.com; > listen 443 quic reuseport; > listen [::]:443 quic reuseport; > http2 on; > http3_hq on; > quic_gso on; > quic_retry on; > add_header alt-svc 'h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-27=":443"; ma=86400' always; > add_header QUIC-Status $http3; > ssl_early_data on; > ssl_certificate /etc/nginx/ssl/example.com_P256/fullchain.cer; > ssl_certificate_key /etc/nginx/ssl/example.com_P256/private.key; > location / { > 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_http_version 1.1; > proxy_set_header Upgrade $http_upgrade; > proxy_set_header Connection $connection_upgrade; > proxy_pass http://127.0.0.1:9000/; > } > location /.well-known/acme-challenge { > proxy_set_header Host $host; > proxy_set_header X-Real_IP $remote_addr; > proxy_set_header X-Forwarded-For $remote_addr:$remote_port; > proxy_pass http://127.0.0.1:9180; > } > } > ``` Do you confirm that you are using h3 to connect to your nginx-ui? Have you checked it through F12?
Author
Owner

@0xJacky commented on GitHub (Jun 13, 2025):

Yes, I am using h3 to connect to my nginx-ui.
Image

Tested on Firefox

Image

Tested on Edge

<!-- gh-comment-id:2968625481 --> @0xJacky commented on GitHub (Jun 13, 2025): Yes, I am using h3 to connect to my nginx-ui. ![Image](https://github.com/user-attachments/assets/318df41b-bfcf-4f17-8f47-ef3878f3d072) Tested on Firefox ![Image](https://github.com/user-attachments/assets/fc9e0eff-1ec3-4548-a65a-5704562e6ddf) Tested on Edge
Author
Owner

@Purgepyro commented on GitHub (Jun 13, 2025):

Image
I think I find something, this backup api timeout.

<!-- gh-comment-id:2968646812 --> @Purgepyro commented on GitHub (Jun 13, 2025): ![Image](https://github.com/user-attachments/assets/4bcaa442-2bff-4fc9-99f8-b393cd9e9d7a) I think I find something, this backup api timeout.
Author
Owner

@0xJacky commented on GitHub (Jun 13, 2025):

Timeout in 5s? This is abnormal.

<!-- gh-comment-id:2968662884 --> @0xJacky commented on GitHub (Jun 13, 2025): Timeout in 5s? This is abnormal.
Author
Owner

@Purgepyro commented on GitHub (Jun 13, 2025):

Timeout in 5s? This is abnormal.

Is this a client issue, server issue, or nginx-ui issue?

<!-- gh-comment-id:2968935863 --> @Purgepyro commented on GitHub (Jun 13, 2025): > Timeout in 5s? This is abnormal. Is this a client issue, server issue, or nginx-ui issue?
Author
Owner

@akinoccc commented on GitHub (Jun 14, 2025):

Timeout in 5s? This is abnormal.

Is this a client issue, server issue, or nginx-ui issue?

It is nginx-ui issue, will be fixed at next version.

<!-- gh-comment-id:2972773036 --> @akinoccc commented on GitHub (Jun 14, 2025): > > Timeout in 5s? This is abnormal. > > Is this a client issue, server issue, or nginx-ui issue? It is nginx-ui issue, will be fixed at next version.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#5045
No description provided.