This is a multi-layer upload limit problem. When using Cloudflare + Nginx + Docker, large file uploads get silently blocked at one of several layers. Here’s the
diagnostic breakdown and fix:
Layer 1: Cloudflare (Most Likely Culprit)
Cloudflare proxied mode has strict upload limits:
- Free plan: 100MB max
- Pro: 200MB
- Business/Enterprise: 500MB+
Large uploads often silently fail because Cloudflare drops the request without a clear error.
Fix options:
Option A — Bypass Cloudflare for uploads (Recommended)
In Cloudflare DNS settings, temporarily set your domain to “DNS only” (grey cloud) instead of “Proxied” (orange cloud) for the upload test.
Option B — Use Cloudflare Workers or tune limits
If on a paid plan, go to: Cloudflare Dashboard → your zone → Settings → Network → Max Upload Size
Layer 2: Nginx client_max_body_size
Default is 1MB. This silently returns a 413 error that the frontend may not display properly.
Edit your Nginx config:
http {
client_max_body_size 500M; # Increase as needed
client_body_timeout 300s;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
proxy_connect_timeout 300s;
}
Then reload:
sudo nginx -t && sudo nginx -s reload
Layer 3: Teable / Docker Compose Environment
Add these to your docker-compose.yml or .env file for the backend service:
environment:
- BACKEND_UPLOAD_FILE_SIZE_LIMIT=524288000 # 500MB in bytes
Quick Diagnostic
Run this to see where it’s failing:
Test upload directly (bypassing Cloudflare) using your EC2 public IP
curl -v -X POST https://YOUR_EC2_IP/api/import
-H “Content-Type: multipart/form-data”
-F “file=@your_large_file.csv”
–insecure 2>&1 | grep -E “< HTTP|413|timeout|error”
If you get 413 → Nginx limit issue
If it hangs/times out → Cloudflare or proxy timeout issue
If it works via IP but not domain → Cloudflare is blocking it
Recommended Fix Order
- First: Set Cloudflare DNS to “DNS only” temporarily and test
- If that works: Fix Nginx client_max_body_size
- Then: Re-enable Cloudflare proxy and configure upload limits there
What size is the CSV file you’re trying to upload?