Primary object storage warning: "Checking the available space in the temporary path resulted in ___ instead of the recommended 50GB?

Nextcloud version (eg, 20.0.5): 23.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.53
PHP version (eg, 7.4): 8.0.17

The issue you are facing:

In the web app, navigating to Administration → Overview shows the following warning:

This instance uses an S3 based object store as primary storage. The uploaded files are stored temporarily on the server and thus it is recommended to have 50 GB of free space available in the temp directory of PHP. Check the logs for full details about the path and the available space. To improve this please change the temporary directory in the php.ini or make more space available in that path.

I have set up Nextcloud on a DigitalOcean VPS. It is running in a Docker container. Redis is enabled for caching and file locking.
Since server instance storage space is very expensive, I have connected an S3 compatible DigitalOcean object storage with 250GB storage space and configured it to be used as primary storage.

Nextcloud is currently running but it is giving me that warning message. Is there any way to address this without having to purchase over 50GB storage on the server instance? For reference, increasing the server instance storage would increase the price from $5/month to $20/month, which would put it out of my family’s price range to run Nextcloud.

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

Steps to replicate it:

  1. Set up Nextcloud with S3 based object storage as primary storage.
  2. Log in to web app.
  3. Navigate to Administration → Overview.

The output of your Nextcloud log in Admin > Logging:

Checking the available space in the temporary path resulted in 32.3 GB instead of the recommended 50GB. Path: /tmp

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

$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  '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,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'redis',
    'password' => '<redacted>',
    'port' => 6379,
  'instanceid' => '<redacted>',
  'passwordsalt' => '<redacted>',
  'secret' => '<redacted>',
  'trusted_domains' => 
  array (
    0 => '<redacted>',
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '<redacted>',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'mysqluser',
  'dbpassword' => '<redacted>',
  'installed' => true,
  'loglevel' => 2,
  'overwriteprotocol' => 'https',
  'objectstore' => 
  array (
    'class' => 'OC\\Files\\ObjectStore\\S3',
    'arguments' => 
    array (
      'bucket' => '<redacted>',
      'autocreate' => true,
      'key' => '<redacted>',
      'secret' => '<redacted>',
      'hostname' => '',
      'port' => 443,
      'use_ssl' => true,
      'region' => 'us-east-1',
      'use_path_style' => false,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\MP3',
    6 => 'OC\\Preview\\TXT',
    7 => 'OC\\Preview\\MarkDown',
    8 => 'OC\\Preview\\OpenDocument',
    9 => 'OC\\Preview\\Krita',
    10 => 'OC\\Preview\\HEIC',
  'maintenance' => false,
  'updater.secret' => '<redacted>',

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

I'm not sure where to find this.  The contents of the directory /var/log/ are as follows:


The contents of the directory /var/log/apache2/ are as follows:

access.log -> /dev/stdout
error.log -> /dev/stderr
other_vhosts_access.log -> /dev/stdout

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

"message":"Checking the available space in the temporary path resulted 
in 32.5 GB instead of the recommended 50GB. 
Path: /tmp","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127  

It is strange that I didn’t find this warning string on github. I found a feature request to disable this altogether: Don't proxy S3 links · Issue #14675 · nextcloud/server · GitHub

I wanted to find some references about the code snippet, why it is exactly 50 gb. If it is jus to allow very large files or if there are many users in parallel, so it won’t get problematic. In such cases, you could just ignore (or manually silence) this warning for your setup.

I figured out the solution to this problem, I am posting it here in case it helps anyone else in the future.

The reason Nextcloud gave the message about 50GB of available space is because in the Nextcloud user settings, I had set the user storage quota to 50GB.

The solution was to change this to a smaller value, such as 10GB.