LAN download speed (windows client) extremely slow?

Nextcloud version (eg, 20.0.5): Nextcloud Hub 7 (28.0.3)
Operating system and version (eg, Ubuntu 20.04): Linux 6.1.74-Unraid x86_64
Apache or nginx version (eg, Apache 2.4.25): not sure where to find it, but its whatever the current NextcloudAIO installs' PHP version _(eg, 7.4)_: 8.2.16`
Desktop Client - 3.12.3

The issue you are facing:
If I transfer files directly from the PC to the NAS (or vice versa) I get full speed 2.5gbe transfers.
Screenshot 2024-04-04 231034

But If I try and transfer a file through the nextcloud folder on windows, I get stupidly slow transfer speeds, like 1/50th what it should be.
Screenshot 2024-04-04 231358

This is actually the fastest I’ve seen it, last night it was even slower, but that may have been because the server was rendering files at the same time.

Both the server and the PC are massive overkill as far as hardware goes, so it’s not a power issue, and networking is fine (as proven by image 1) so it’s not the network. It’s a nextcloud (or related) issue.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Transfer files through the nextcloud desktop app on windows.

The output of your Nextcloud log in Admin > Logging:

Nothing in there.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'one-click-instance' => true,
  'one-click-instance.user-limit' => 100,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'appsallowlist' => false,
  'check_data_directory_permissions' => false,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'nextcloud-aio-redis',
    'password' => '',
    'port' => 6379,
  ),
'overwritehost' => 'domain.uk',
  'overwriteprotocol' => 'https',
  'passwordsalt' => '',
  'secret' => 'OsE3zOhz0g5oG4/VhomYj5Ocm7pC3z6mySiMOoeysQel23N9',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'domain.uk',
  ),
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => 'pgsql',
  'version' => '28.0.3.2',
  'overwrite.cli.url' => 'https://domain.uk/',
  'dbname' => 'nextcloud_database',
  'dbhost' => 'nextcloud-aio-database',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_nextcloud',
  'dbpassword' => '',
  'installed' => true,
  'instanceid' => '',
  'maintenance' => false,
  'loglevel' => '2',
  'log_type' => 'file',
  'logfile' => '/var/www/html/data/nextcloud.log',
  'log_rotate_size' => '10485760',
  'log.condition' =>
  array (
    'apps' =>
    array (
      0 => 'admin_audit',
    ),
  ),
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'enabledPreviewProviders' =>
array (
    1 => 'OC\\Preview\\Image',
    2 => 'OC\\Preview\\MarkDown',
    3 => 'OC\\Preview\\MP3',
    4 => 'OC\\Preview\\TXT',
    5 => 'OC\\Preview\\OpenDocument',
    6 => 'OC\\Preview\\Movie',
    7 => 'OC\\Preview\\Krita',
    0 => 'OC\\Preview\\Imaginary',
  ),
  'enable_previews' => true,
  'upgrade.disable-web' => true,
  'mail_smtpmode' => 'smtp',
  'trashbin_retention_obligation' => 'auto, 30',
  'versions_retention_obligation' => 'auto, 30',
  'activity_expire_days' => '30',
  'simpleSignUpLink.shown' => false,
  'share_folder' => '/Shared',
  'one-click-instance.link' => 'https://nextcloud.com/all-in-one/',
  'upgrade.cli-upgrade-link' => 'https://github.com/nextcloud/all-in-one/discussions/2726',
  'updatedirectory' => '/nc-updater',
  'maintenance_window_start' => 100,
  'allow_local_remote_servers' => true,
  'davstorage.request_timeout' => 7200,
  'htaccess.RewriteBase' => '/',
  'dbpersistent' => false,
  'files_external_allow_create_new_local' => true,
  'trusted_proxies' =>
  array (
    0 => '127.0.0.1',
    1 => '::1',
  ),
  'preview_imaginary_url' => 'http://nextcloud-aio-imaginary:9000',
  'preview_imaginary_key' => '',
);

The output of your Apache/nginx/system log in /var/log/____:

Connection to nextcloud-aio-nextcloud (172.25.0.7) 9000 port [tcp/*] succeeded!
[Tue Mar 26 07:06:01.119473 2024] [mpm_event:notice] [pid 50:tid 22768019192584] AH00489: Apache/2.4.58 (Unix) configured -- resuming normal operations
[Tue Mar 26 07:06:01.119517 2024] [core:notice] [pid 50:tid 22768019192584] AH00094: Command line: '/usr/local/apache2/bin/httpd -D FOREGROUND'
{"level":"info","ts":1711436761.12273,"msg":"using provided configuration","config_file":"/tmp/Caddyfile","config_adapter":""}
nc: getaddrinfo for host "nextcloud-aio-nextcloud" port 9000: Name does not resolve
Connection to nextcloud-aio-nextcloud (172.25.0.5) 9000 port [tcp/*] succeeded!
{"level":"info","ts":1711746334.0567746,"msg":"using provided configuration","config_file":"/tmp/Caddyfile","config_adapter":""}
[Fri Mar 29 21:05:34.075269 2024] [mpm_event:notice] [pid 56:tid 22809289685768] AH00489: Apache/2.4.58 (Unix) configured -- resuming normal operations
[Fri Mar 29 21:05:34.075287 2024] [core:notice] [pid 56:tid 22809289685768] AH00094: Command line: '/usr/local/apache2/bin/httpd -D FOREGROUND'
[Thu Apr 04 00:43:28 2024] [error] [(111)Connection refused] [client: [AH00957: FCGI: attempt to connect to 172.25.0.5:9000 (nextcloud-aio-nextcloud:9000) failed]
[Thu Apr 04 00:43:28 2024] [error] [client: 45.133.172.93, 172.70.85.84, 172.25.0.1] [AH01079: failed to make connection to backend: nextcloud-aio-nextcloud] [Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0]
[Thu Apr 04 00:43:31 2024] [error] [(111)Connection refused] [client: [AH00957: FCGI: attempt to connect to 172.25.0.5:9000 (nextcloud-aio-nextcloud:9000) failed]
[Thu Apr 04 00:43:31 2024] [error] [client: myIP, xxxxxx.74.81, 172.25.0.1] [AH01079: failed to make connection to backend: nextcloud-aio-nextcloud] [COOLWSD HTTP Agent 23.05.9.3]
Connection to nextcloud-aio-nextcloud (172.25.0.5) 9000 port [tcp/*] succeeded!
{"level":"info","ts":1712187823.0572336,"msg":"using provided configuration","config_file":"/tmp/Caddyfile","config_adapter":""}
{"level":"error","ts":1712187823.0727894,"logger":"http.log.error","msg":"dial tcp 127.0.0.1:8000: connect: connection refused","request":{"remote_ip":"172.25.0.1","remote_port":"49610","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/index.php/apps/notify_push/test/version","headers":{"X-Forwarded-Scheme":["https"],"X-Forwarded-Proto":["https"],"Cdn-Loop":["cloudflare"],"Cf-Ipcountry":["GB"],"Cf-Connecting-Ip":["myIP"],"X-Forwarded-For":["myIP, xxxxxx.74.115"],"X-Real-Ip":["xxxxxx.74.115"],"Accept-Encoding":["gzip, br"],"Cf-Ray":["86ecec25efeb2236-MAN"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Accept":["*/*"]}},"duration":0.000306415,"status":502,"err_id":"g1ug4480y","err_trace":"reverseproxy.statusError (reverseproxy.go:1267)"}
[Thu Apr 04 00:43:43.075338 2024] [mpm_event:notice] [pid 49:tid 22385547201288] AH00489: Apache/2.4.58 (Unix) configured -- resuming normal operations
[Thu Apr 04 00:43:43.075360 2024] [core:notice] [pid 49:tid 22385547201288] AH00094: Command line: '/usr/local/apache2/bin/httpd -D FOREGROUND'
{"level":"error","ts":1712189227.2322216,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.163282549,"request":{"remote_ip":"172.25.0.1","remote_port":"52118","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0024.MP4","headers":{"Cf-Ipcountry":["GB"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"X-Forwarded-Proto":["https"],"X-Forwarded-For":["myIP, xxxxxx.74.88, 172.25.0.1"],"X-Real-Ip":["xxxxxx.74.88"],"Cf-Connecting-Ip":["myIP"],"Cookie":[],"X-Forwarded-Scheme":["https"],"X-Forwarded-Host":["domain.uk"],"Cdn-Loop":["cloudflare"],"Authorization":[],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Cf-Ray":["86ed0df4ca5b6aac-MAN"],"Accept-Encoding":["gzip, br"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:52118: write: broken pipe"}
{"level":"error","ts":1712189227.2332501,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.054912545,"request":{"remote_ip":"172.25.0.1","remote_port":"52090","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0031.MP4","headers":{"X-Forwarded-For":["myIP, 172.69.79.240, 172.25.0.1"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Connecting-Ip":["myIP"],"Accept-Encoding":["gzip, br"],"X-Forwarded-Proto":["https"],"Cdn-Loop":["cloudflare"],"X-Forwarded-Host":["domain.uk"],"Authorization":[],"X-Real-Ip":["172.69.79.240"],"Cf-Ipcountry":["GB"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-Scheme":["https"],"Cf-Ray":["86ed0df47b230755-MAN"],"Cookie":[]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:52090: write: broken pipe"}
{"level":"error","ts":1712189227.2377186,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.359902824,"request":{"remote_ip":"172.25.0.1","remote_port":"52126","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0022.MP4","headers":{"X-Forwarded-Scheme":["https"],"Cf-Ray":["86ed0df4cb8b0746-MAN"],"X-Forwarded-Proto":["https"],"X-Forwarded-For":["myIP, 172.69.79.154, 172.25.0.1"],"Cdn-Loop":["cloudflare"],"Accept-Encoding":["gzip, br"],"Authorization":[],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cookie":[],"Cf-Ipcountry":["GB"],"X-Forwarded-Host":["domain.uk"],"X-Real-Ip":["172.69.79.154"],"Cf-Connecting-Ip":["myIP"],"Cf-Visitor":["{\"scheme\":\"https\"}"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:52126: write: broken pipe"}
{"level":"error","ts":1712189227.2528472,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.051514359,"request":{"remote_ip":"172.25.0.1","remote_port":"52104","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0030.MP4","headers":{"Cf-Connecting-Ip":["myIP"],"Cookie":[],"X-Forwarded-Host":["domain.uk"],"Cf-Ipcountry":["GB"],"X-Forwarded-For":["myIP, xxxxxx.74.8, 172.25.0.1"],"Accept-Encoding":["gzip, br"],"Cdn-Loop":["cloudflare"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Ray":["86ed0df4cbe40761-MAN"],"X-Forwarded-Scheme":["https"],"X-Forwarded-Proto":["https"],"Authorization":[],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Real-Ip":["xxxxxx.74.8"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:52104: write: broken pipe"}
{"level":"error","ts":1712189236.79526,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.070342257,"request":{"remote_ip":"172.25.0.1","remote_port":"37926","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00082.ARW","headers":{"Accept-Encoding":["gzip, br"],"X-Forwarded-Host":["domain.uk"],"X-Real-Ip":["xxxxxx.33.176"],"Cdn-Loop":["cloudflare"],"Cf-Connecting-Ip":["myIP"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Cookie":[],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"X-Forwarded-Scheme":["https"],"Authorization":[],"Cf-Ipcountry":["GB"],"X-Forwarded-Proto":["https"],"Cf-Ray":["86ed0e6f9bdf0ac7-MAN"],"X-Forwarded-For":["myIP, xxxxxx.33.176, 172.25.0.1"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:37926: write: broken pipe"}
{"level":"error","ts":1712189236.7966352,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.055332954,"request":{"remote_ip":"172.25.0.1","remote_port":"37954","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0033.MP4","headers":{"Cf-Ipcountry":["GB"],"Cf-Ray":["86ed0e6f9ae2075e-MAN"],"X-Forwarded-For":["myIP, xxxxxx.74.92, 172.25.0.1"],"Cf-Connecting-Ip":["myIP"],"X-Forwarded-Scheme":["https"],"X-Forwarded-Proto":["https"],"X-Real-Ip":["xxxxxx.74.92"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Authorization":[],"Cdn-Loop":["cloudflare"],"Accept-Encoding":["gzip, br"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cookie":[],"X-Forwarded-Host":["domain.uk"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:37954: write: broken pipe"}
{"level":"error","ts":1712189236.7982638,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.038815246,"request":{"remote_ip":"172.25.0.1","remote_port":"37944","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0034.MP4","headers":{"X-Forwarded-Scheme":["https"],"Cf-Connecting-Ip":["myIP"],"X-Real-Ip":["xxxxxx.33.164"],"Cf-Ray":["86ed0e6f99d36ab3-MAN"],"X-Forwarded-Proto":["https"],"Cookie":[],"X-Forwarded-Host":["domain.uk"],"X-Forwarded-For":["myIP, xxxxxx.33.164, 172.25.0.1"],"Authorization":[],"Accept-Encoding":["gzip, br"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Ipcountry":["GB"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Cdn-Loop":["cloudflare"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:37944: write: broken pipe"}
{"level":"error","ts":1712189236.7996004,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.057277205,"request":{"remote_ip":"172.25.0.1","remote_port":"37934","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0032.MP4","headers":{"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"X-Forwarded-Host":["domain.uk"],"Cf-Connecting-Ip":["myIP"],"Accept-Encoding":["gzip, br"],"Cdn-Loop":["cloudflare"],"X-Real-Ip":["xxxxxx.33.134"],"Cf-Ray":["86ed0e6f5a736aaf-MAN"],"X-Forwarded-Scheme":["https"],"Cookie":[],"Authorization":[],"Cf-Ipcountry":["GB"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-Proto":["https"],"X-Forwarded-For":["myIP, xxxxxx.33.134, 172.25.0.1"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:37934: write: broken pipe"}
{"level":"error","ts":1712189259.3489673,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.099510198,"request":{"remote_ip":"172.25.0.1","remote_port":"51832","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00180.ARW","headers":{"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-Host":["domain.uk"],"Accept-Encoding":["gzip, br"],"X-Forwarded-Scheme":["https"],"X-Forwarded-For":["myIP, xxxxxx.74.22, 172.25.0.1"],"Cf-Ray":["86ed0eab2a872207-MAN"],"Cf-Connecting-Ip":["myIP"],"X-Real-Ip":["xxxxxx.74.22"],"Cf-Ipcountry":["GB"],"Authorization":[],"X-Forwarded-Proto":["https"],"Cdn-Loop":["cloudflare"],"Cookie":[]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:51832: write: broken pipe"}
{"level":"error","ts":1712189259.350254,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.151554467,"request":{"remote_ip":"172.25.0.1","remote_port":"51822","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00083.ARW","headers":{"Accept-Encoding":["gzip, br"],"Cookie":[],"X-Real-Ip":["172.69.79.137"],"X-Forwarded-For":["myIP, 172.69.79.137, 172.25.0.1"],"X-Forwarded-Proto":["https"],"Cf-Ray":["86ed0eaabc732dd9-MAN"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Authorization":[],"Cf-Ipcountry":["GB"],"X-Forwarded-Host":["domain.uk"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cdn-Loop":["cloudflare"],"Cf-Connecting-Ip":["myIP"],"X-Forwarded-Scheme":["https"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:51822: write: broken pipe"}
{"level":"error","ts":1712189259.4021077,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.076017978,"request":{"remote_ip":"172.25.0.1","remote_port":"46612","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00184.ARW","headers":{"X-Forwarded-For":["myIP, 172.69.79.164, 172.25.0.1"],"Cdn-Loop":["cloudflare"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-Scheme":["https"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cookie":[],"Cf-Connecting-Ip":["myIP"],"Authorization":[],"X-Forwarded-Proto":["https"],"Cf-Ray":["86ed0f3658a254e2-MAN"],"Accept-Encoding":["gzip, br"],"X-Real-Ip":["172.69.79.164"],"Cf-Ipcountry":["GB"],"X-Forwarded-Host":["domain.uk"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:46612: write: broken pipe"}
{"level":"error","ts":1712189261.9257627,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.062678126,"request":{"remote_ip":"172.25.0.1","remote_port":"46632","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00186.ARW","headers":{"X-Forwarded-Scheme":["https"],"Cf-Ray":["86ed0f379bdc2dd5-MAN"],"Cookie":[],"X-Forwarded-Host":["domain.uk"],"Authorization":[],"X-Forwarded-For":["myIP, 172.69.79.153, 172.25.0.1"],"X-Real-Ip":["172.69.79.153"],"Cdn-Loop":["cloudflare"],"Accept-Encoding":["gzip, br"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Connecting-Ip":["myIP"],"X-Forwarded-Proto":["https"],"Cf-Ipcountry":["GB"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:46632: write: broken pipe"}
{"level":"error","ts":1712189261.9257607,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.041199748,"request":{"remote_ip":"172.25.0.1","remote_port":"46646","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00188.ARW","headers":{"Cf-Ipcountry":["GB"],"Cf-Ray":["86ed0f37f874074f-MAN"],"X-Forwarded-Host":["domain.uk"],"Cookie":[],"X-Forwarded-Scheme":["https"],"Accept-Encoding":["gzip, br"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cdn-Loop":["cloudflare"],"Authorization":[],"X-Forwarded-Proto":["https"],"Cf-Connecting-Ip":["myIP"],"X-Real-Ip":["xxxxxx.74.114"],"X-Forwarded-For":["myIP, xxxxxx.74.114, 172.25.0.1"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:46646: write: broken pipe"}
{"level":"error","ts":1712189261.9260585,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.050345885,"request":{"remote_ip":"172.25.0.1","remote_port":"46638","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00187.ARW","headers":{"X-Forwarded-Scheme":["https"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Authorization":[],"Accept-Encoding":["gzip, br"],"Cdn-Loop":["cloudflare"],"X-Forwarded-Proto":["https"],"Cf-Ipcountry":["GB"],"X-Real-Ip":["172.69.79.136"],"X-Forwarded-For":["myIP, 172.69.79.136, 172.25.0.1"],"X-Forwarded-Host":["domain.uk"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Connecting-Ip":["myIP"],"Cookie":[],"Cf-Ray":["86ed0f37acf42dd8-MAN"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:46638: write: broken pipe"}
{"level":"error","ts":1712189261.9264,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.074657691,"request":{"remote_ip":"172.25.0.1","remote_port":"46620","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00185.ARW","headers":{"Cdn-Loop":["cloudflare"],"X-Forwarded-Host":["domain.uk"],"Accept-Encoding":["gzip, br"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-Scheme":["https"],"Cf-Ray":["86ed0f378f2521cb-MAN"],"Cf-Ipcountry":["GB"],"X-Forwarded-For":["myIP, 172.69.79.164, 172.25.0.1"],"Cf-Connecting-Ip":["myIP"],"X-Forwarded-Proto":["https"],"Authorization":[],"X-Real-Ip":["172.69.79.164"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cookie":[]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:46620: write: broken pipe"}
{"level":"error","ts":1712189302.192545,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.046720174,"request":{"remote_ip":"172.25.0.1","remote_port":"49538","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0024.MP4","headers":{"X-Forwarded-Proto":["https"],"Cf-Ray":["86ed0fa429c254d6-MAN"],"Cf-Ipcountry":["GB"],"X-Real-Ip":["xxxxxx.74.88"],"Authorization":[],"X-Forwarded-Scheme":["https"],"X-Forwarded-For":["myIP, xxxxxx.74.88, 172.25.0.1"],"Accept-Encoding":["gzip, br"],"X-Forwarded-Host":["domain.uk"],"Cf-Connecting-Ip":["myIP"],"Cookie":[],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Cdn-Loop":["cloudflare"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:49538: write: broken pipe"}
{"level":"error","ts":1712212152.9667969,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.060811283,"request":{"remote_ip":"172.25.0.1","remote_port":"37728","client_ip":"45.133.172.65","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7ftp/C0024.MP4","headers":{"Cf-Ray":["86ef3c8b0b4094b5-LHR"],"Authorization":[],"Accept":["*/*"],"Cf-Connecting-Ip":["45.133.172.65"],"X-Forwarded-Host":["domain.uk"],"Accept-Language":["en-GB,*"],"X-Request-Id":["32e27658-8d16-404c-b63d-c84471d15dcb"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-For":["45.133.172.65, 172.70.162.193, 172.25.0.1"],"Cf-Ipcountry":["GB"],"Accept-Encoding":["gzip, br"],"User-Agent":["Mozilla/5.0 (Windows) mirall/3.12.3stable-Win64 (build 20240328) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"],"X-Forwarded-Scheme":["https"],"Cookie":[],"Cdn-Loop":["cloudflare"],"X-Forwarded-Proto":["https"],"X-Real-Ip":["172.70.162.193"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:37728: write: broken pipe"}
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...

There seem to be errors in this, but I don’t know why nextcloud is going via the internet when the server is on the local LAN. This may explain the speed issue as while my internet is gigabit down it’s only 100mb up… though nextcloud shouldn’t be sending things over the internet anyway (?)

It seems the issue is that there’s no way to connect the desktop client directly to the ip of nextcloud through the LAN, it will only accept the nginx domain which then routes all traffic out onto the internet and then back into the network.

I’m used to using Synology Drive, which automatically redirects local traffic into a direct local connection, and external traffic works normally via nginx.

How would I set this up for nextcloud? I’ve tried looking up a solution but all the threads I’ve found are really convoluted, and seem to require a third server running something like pfsense or some other routing software (which isn’t an option).

it will only accept the nginx domain which then routes all traffic out onto the internet and then back into the network

This wouldn’t be the case, it would probably be hair-pining at the router. Traffic hits your router then is directed back to the server. That said hair-pinning is often bad for performance and can introduce a lot of errors and weird networking issues.

So it sounds like you need to sort out your DNS resolution using a split dns. There are multiple ways to do this, often you can set a Domain name to a host in your router, or by setting up your own internal resolver like Pi-Hole

That might address some of the errors you are seeing.

I know that Synology Drive doesn’t have this issue, so I assume it has a built-in solution (I have never had to set up a special DNS or anything).

I’m pretty sure my router doesn’t have the option to do split DNS (its a virgin home hub 5 so it’s directly connected to my cable and it’s not something I can replace).

Can pi-hole be installed onto unraid and work? I thought there were issues with running your own DNS. IS there a guide for this?

I know that Synology Drive doesn’t have this issue, so I assume it has a built-in solution

Could be registering it’s hostname during DHCP negotiation? or some more advance TUN/STUN style auto-discovery?

Can pi-hole be installed onto unraid and work

Pi-Hole has a docker container so shouldn’t be a problem. A quick google search gave me this quick guide: Setting up PiHole on your Unraid Server

I thought there were issues with running your own DNS

Pi-Hole isn’t a full DNS, it’s just a local resolver. As long as you have a standard public fall over dns configured on your clients (Typically done with the DHCP settings) it’s rarely a problem in my experience.

Thanks for the tips then, I’ll give pi-hole a try :slight_smile:

Ok so I have pi-hole installed, but the dns option seems to only be able to handle “domain” (which is fine, that’s just mydomain.com) and then an ip address, however it doesn’t seem to accept ip:port and as nextcloud is running in a docker container on my unraid server I can’t just point it to the ip of the server box (I assume?)

No the port is always task specific, you can just point it to your server box, you just need to add the port when accessing through a browser/client. Typically you would either use a reverse proxy to take the standard http/https ports 80/443 and redirect them to the docker ports or map ports 80/433 directly through docker.

1 Like

Do you have an example of how this works with nextcloud? When I tried to enter the ip in the client to connect, it ended up just changing the ip to the nextcloud domain automatically anyway.

I’m surprised there’s not a guide to get this working correctly. Does everyone just put up with really slow nextcloud access?

There are no Nextcloud specifics involved? Once you have the domain name resolving the idea is you don’t use an ip, you use a domain name i.e. domain.uk. so in the client you would enter https://domain.uk:9000 and then the client (well your computer) reaches out to pi-hole (assuming you have it set as your dns resolver) and finds the right IP address.

For example in my home network my domain example.tld resolves to 10.1.1.2 where as outside the home network it resolves to my router IP address. If your issue is indeed caused by traffic trying to exit the re-enter your network via hair-pinning this split dns will point you to a direct connection to your server.

There are a lot of guides for domain name resolution, but they tend to be stack specific.

It’s always ever so slightly slower due to some php overhead but you should be able to get close to full speed.

Incidentally exploring your "aborting with incomplete response" error on github lead me here: How to debug problems with Collabora and/or Talk · nextcloud/all-in-one · Discussion #1358 · GitHub

May be another avenue to explore.

I now have pihole set up, with a dns entry for “cloud.domain.uk” pointing to the ip of my server (no ports specified) and I have put ‘cloud.domain.uk’ into my client, but it seems to still be routing through the internet.

Yeh this isn’t working. The nextcloud community really needs more documentation, and maybe a support discord server. Not sure why it’s so backwards on here, considering this is by far the biggest self hosted cloud solution available.

Entering ‘https://domain.uk:9000’ doesn’t work, it doesn’t connect. Neither does just using http. and if I do it with just domain.uk:9000 it says it’s an invalid address.

I have pihole set up with ‘domain.uk’ forwarding to ‘192.168.0.22’ (the ip for my unraid NAS) but nothing I do seems to let me get the domain to work over local lan speeds.

I understand it can be quite frustrating and It is always hard to diagnose issues at a distance.

The nextcloud community really needs more documentation

I’ve always found the https://docs.nextcloud.com to be quite complete, for Nextcloud itself. What you’re potentially having issues with is probably the underlying networking/server infrastructure stuff. Remember Nextcloud is a traditional PHP based server stack, so it’s quite flexible in tuning it’s configuration. For a selfhoster that can be a dis-advantage to be sure but Nextcloud as a business is targeted at organizations, we get it for free in exchange for crowed sourced quality control, bug squashing and feature development, it’s the nature of open source.

maybe a support discord server

Please no, discord is terrible for discoverability (it’s a private silo) and interaction across timezones because it’s a chat platform. A traditional forum like this one is just objectively better for community support queries.

You set your pi-hole as your local machines dns correct?

What OS is your client machine, have you tried to verify the IP address your machine thinks cloud.domain.uk belongs to?

You may want to lok into performing a traceroute and a dig command to discover the path and dns records you are seeing.

1 Like