Snipe-it nginx does not allow import backups due to default size limit, please add client_max_body_size #1567

Closed
opened 2026-02-05 01:37:20 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @macrec-danielvanderwal on GitHub (Sep 2, 2025).

📌 Task summary

Refactor nginx defaults für nginx snipe-it

📋 Task details

Importing a Backup into Snipe-IT is not possible due to limit problem as default don't allow a for example 6MB Backup to be imported. Thanks in advance!

Can you please add " client_max_body_size 100M;" to /etc/nginx/conf.d/snipeit.conf ?

Example:
cat </etc/nginx/conf.d/snipeit.conf
server {
listen 80;
root /opt/snipe-it/public;
server_name $IPADDRESS;
client_max_body_size 100M;
index index.php;

location / {
        try_files \$uri \$uri/ /index.php?\$query_string;
}

location ~ \.php\$ {
        include fastcgi.conf;
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.+)\$;
        fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
        include fastcgi_params;
}

}
EOF

Originally created by @macrec-danielvanderwal on GitHub (Sep 2, 2025). ### 📌 Task summary Refactor nginx defaults für nginx snipe-it ### 📋 Task details Importing a Backup into Snipe-IT is not possible due to limit problem as default don't allow a for example 6MB Backup to be imported. Thanks in advance! Can you please add " client_max_body_size 100M;" to /etc/nginx/conf.d/snipeit.conf ? Example: cat </etc/nginx/conf.d/snipeit.conf server { listen 80; root /opt/snipe-it/public; server_name $IPADDRESS; client_max_body_size 100M; index index.php; location / { try_files \$uri \$uri/ /index.php?\$query_string; } location ~ \.php\$ { include fastcgi.conf; include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php8.3-fpm.sock; fastcgi_split_path_info ^(.+\.php)(/.+)\$; fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; include fastcgi_params; } } EOF
Author
Owner

@tremor021 commented on GitHub (Sep 2, 2025):

Will be fixed after #7358 merges.

if you need to fix your existing nginx configuration, run this inside SnipeIT LXC:

if ! grep -q "client_max_body_size[[:space:]]\+100M;" /etc/nginx/conf.d/snipeit.conf; then
    sed -i '/index index.php;/i \        client_max_body_size 100M;' /etc/nginx/conf.d/snipeit.conf
fi
systemctl restart nginx
@tremor021 commented on GitHub (Sep 2, 2025): Will be fixed after #7358 merges. if you need to fix your existing nginx configuration, run this inside SnipeIT LXC: ```bash if ! grep -q "client_max_body_size[[:space:]]\+100M;" /etc/nginx/conf.d/snipeit.conf; then sed -i '/index index.php;/i \ client_max_body_size 100M;' /etc/nginx/conf.d/snipeit.conf fi systemctl restart nginx ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#1567