<!-- Source: https://docs.squirro.com/en/latest/technical/admin/configuration/file-upload-limits.html -->
# File Upload Size Limits

Squirro enforces a default 96 MB file upload limit via two settings that must be kept in sync:

1. `frontend.max-file-size`

   Server configuration
2. `client_max_body_size`

   Nginx proxy configuration

## Modifying Upload Limits

To increase the file upload limit:

1. **Update the frontend configuration**

   Set `frontend.max-file-size` (in bytes) in the server configuration. This setting is managed through Squirro’s [Configuration Service](config-service.md#admin-config-service) under the Server space.
2. **Update the nginx configuration**

   Edit the nginx configuration file `/etc/nginx/nginx.conf` to set `client_max_body_size` and restart the nginx service.

   ```bash
   sudo nano /etc/nginx/nginx.conf
   ```

   ```bash
   sudo systemctl restart nginx
   ```

An important rule to follow is to ensure that the `frontend.max-file-size` value is set to be less than or equal to the `client_max_body_size` value.

### Example Configuration

To set a 200 MB upload limit, adjust the settings as follows:

1. Frontend Configuration (via Configuration Service)

   ```
   frontend.max-file-size = 209715200
   ```
2. Nginx Configuration

   ```
   client_max_body_size 200m;
   ```

## Additional Considerations

- **Datasource plugins**

  They may have additional limits.
- **Large file timeouts**

  Consider adjusting `client_body_timeout` in nginx for slow connections.
- **PDF conversion timeouts**

  May need `proxy_read_timeout` adjustments for large PDF files.
