The Basics
- Nextcloud Server version (e.g., 29.x.x):
31.0.2
- Operating system and version (e.g., Ubuntu 24.04):
Ubuntu 24.04.1 LTS
(Host System running Docker)
- Web server and version (e.g, Apache 2.4.25):
Apache/2.4.62 (Debian)
(inside the Nextcloud Container)
- Reverse proxy and version _(e.g. nginx 1.27.2)
Nginx Proxy Manager v2.12.3
(separate Docker Container)
- PHP version (e.g, 8.3):
8.3.19
- Is this the first time you’ve seen this error? (Yes / No):
yes
- When did this problem seem to first start?
only had the need for upload via curl recently, so i probably would have run into this since installation
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
Docker (official image)
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
no
Summary of the issue you are facing:
I’m trying to upload files larger than 1GB via curl
:
curl -u "admin:mytoken" -T video.mp4 "https://cloud.bunker496.de:443/re mote.php/dav/files/admin/"
but i get this error back:
<html><head>
<title>413 Request Entity Too Large</title>
</head><body>
<h1>Request Entity Too Large</h1>
The requested resource does not allow request data with PUT requests, or the amount of data provided in
the request exceeds the capacity limit.
<hr>
<address>Apache/2.4.62 (Debian) Server at cloud.bunker496.de Port 80</address>
</body></html>
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
<s:message>Expected filesize of 1153433600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes. Could either be a network problem
on the sending side or a problem writing to the storage on the server side.</s:message>
</d:error>
I have configured these env vars on the Nextcloud Docker container (see bottom of post for full docker compose YAML):
- "PHP_UPLOAD_LIMIT=200G"
- "PHP_MEMORY_LIMIT=4096M"
I’ve searched on the forum and with Google but they either point to NGINX, which looking at the error doesn’t seem to be relevant since it says “Apache”, or Apache config but looking at the official Docker container documentation i don’t see any place where one should mount the Apache config to persist changes or change it by hand in general.
Log entries
Nextcloud
Log level is set to WARN and nothing is being logged when the issue occurs.
Web Browser
n/a
Web server / Reverse Proxy
This is all it logs in docker logs nextcloud
[IP] admin [11/Apr/2025:21:02:51 +0000] "PUT /remote.php/dav/files/admin/video.mp4 HTTP/1.1" 400 1387 "-" "curl/8.5.0"
Configuration
Nextcloud
Output of occ config:list
:
{
"system": {
"default_language": "de",
"default_locale": "de",
"default_timezone": "Europe\/Berlin",
"skeletondirectory": "",
"templatedirectory": "",
"preview_max_x": 1024,
"preview_max_y": 1024,
"preview_max_filesize_image": 5,
"enable_previews": true,
"enabledPreviewProviders": [
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\MarkDown",
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\Krita",
"OC\\Preview\\SVG",
"OC\\Preview\\TIFF",
"OC\\Preview\\PDF",
"OC\\Preview\\Illustrator",
"OC\\Preview\\Photoshop",
"OC\\Preview\\Postscript",
"OC\\Preview\\Font",
"OC\\Preview\\HEIC",
"OC\\Preview\\TGA",
"OC\\Preview\\SGI",
"OC\\Preview\\Movie",
"OC\\Preview\\WebP"
],
"default_phone_region": "DE",
"overwrite.cli.url": "https:\/\/cloud.bunker496.de",
"overwriteprotocol": "https",
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": {
"1": "cloud.bunker496.de",
"2": "localhost"
},
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "31.0.2.1",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"updatedirectory": "\/nc-updater",
"app_install_overwrite": [
"nextcloud-aio"
],
"logfile": "\/var\/www\/html\/data\/nextcloud.log",
"upgrade.disable-web": true,
"trashbin_retention_obligation": "auto, 30",
"versions_retention_obligation": "auto, 30",
"activity_expire_days": 30,
"simpleSignUpLink.shown": false,
"share_folder": "\/Shared",
"upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
"maintenance_window_start": 100,
"htaccess.RewriteBase": "\/",
"dbpersistent": false,
"files_external_allow_create_new_local": false,
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"forbidden_filename_basenames": [
"con",
"prn",
"aux",
"nul",
"com0",
"com1",
"com2",
"com3",
"com4",
"com5",
"com6",
"com7",
"com8",
"com9",
"com\u00b9",
"com\u00b2",
"com\u00b3",
"lpt0",
"lpt1",
"lpt2",
"lpt3",
"lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
"lpt\u00b9",
"lpt\u00b2",
"lpt\u00b3"
],
"forbidden_filename_characters": [
"<",
">",
":",
"\"",
"|",
"?",
"*",
"\\",
"\/"
],
"forbidden_filename_extensions": [
" ",
".",
".filepart",
".part"
],
"documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
"config_is_read_only": false,
"ratelimit.protection.enabled": true,
"one-click-instance": true,
"one-click-instance.user-limit": 100,
"maintenance": false,
"defaultapp": "",
"loglevel": 2
},
"apps": {
/* ... */
}
}
Additional config
Docker compose.yaml
services:
app:
container_name: nextcloud
build:
context: .
dockerfile_inline: |
# inspired by https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/full/fpm/Dockerfile
# ffmpeg: video previews + transcoding, ghostscript: pdf previews, libmagick: HEIC image previews
FROM nextcloud:latest
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends ffmpeg ghostscript libmagickcore-6.q16-6-extra;
volumes:
- nextcloud_aio_nextcloud:/var/www/html
- /bunker-tank/nextcloud-datadir:/mnt/ncdata
environment:
- "POSTGRES_HOST=db"
- "POSTGRES_PORT=5432"
- "POSTGRES_PASSWORD=REDACTED"
- "POSTGRES_DB=nextcloud_database"
- "POSTGRES_USER=nextcloud"
- "NEXTCLOUD_ADMIN_USER=admin"
- "NEXTCLOUD_ADMIN_PASSWORD=REDACTED"
- "NEXTCLOUD_DATA_DIR=/mnt/ncdata"
- "PHP_UPLOAD_LIMIT=200G"
- "PHP_MEMORY_LIMIT=4096M"
- "REDIS_HOST=redis"
- "REDIS_HOST_PASSWORD=REDACTED"
extra_hosts:
- "office.bunker496.de:SOME_IP"
redis:
container_name: redis
image: nextcloud/aio-redis:latest
volumes:
- nextcloud_aio_redis:/data
environment:
REDIS_HOST_PASSWORD: REDACTED
db:
container_name: nextcloud_database
image: nextcloud/aio-postgresql:latest
volumes:
- nextcloud_aio_database:/var/lib/postgresql/data
- nextcloud_aio_database_dump:/mnt/data
environment:
- "POSTGRES_PASSWORD=REDACTED"
- "POSTGRES_DB=nextcloud_database"
- "TZ=Etc/UTC"
- "PGDATA=/var/lib/postgresql/data"
proxy:
container_name: nginx-proxy-manager
image: jc21/nginx-proxy-manager:latest
ports:
- 80:80
- 81:81
- 443:443
volumes:
- ./nginx-proxy-manager-data-bind:/data
- ./letsencrypt-bind:/etc/letsencrypt
volumes:
nextcloud_aio_nextcloud:
external: true
nextcloud_aio_database:
external: true
nextcloud_aio_database_dump:
external: true
nextcloud_aio_redis:
external: true
NGINX Proxy Manager configuration (GUI) for Nextcloud:
Scheme: http (NGINX Proxy Manager handles/terminates TLS, talks HTTP to Nextcloud)
Cache assets: enabled
Block common exploits: enabled
Websockets Support: enabled
No custom locations
SSL:
—Force SSL: enabled
—HTTP/2 Support: enabled
—HSTS Enabled: enabled
—HSTS Subdomains: disabled
Advanced:
client_body_buffer_size 512k;
proxy_read_timeout 86400s;
client_max_body_size 0;
proxy_connect_timeout 86400;
proxy_send_timeout 86400;
send_timeout 86400;