?i»?

Your IP : 3.15.149.182


Current Path : /home/scgforma/www/cloud/core/doc/admin/configuration_files/
Upload File :
Current File : /home/scgforma/www/cloud/core/doc/admin/configuration_files/big_file_upload_configuration.html

<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Uploading big files &gt; 512MB &mdash; Nextcloud 13 Administration Manual 13 documentation</title>
    
    <link rel="stylesheet" href="../_static/" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/main.min.css" type="text/css" />
    <link rel="stylesheet" href="../_static/styles.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '13',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="../_static/js/jquery-fix.js"></script>
    <script type="text/javascript" src="../_static/bootstrap-3.1.0/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
    <link rel="top" title="Nextcloud 13 Administration Manual 13 documentation" href="../contents.html" />
    <link rel="up" title="File sharing and management" href="index.html" />
    <link rel="next" title="Providing default files" href="default_files_configuration.html" />
    <link rel="prev" title="Configuring Federation Sharing" href="federated_cloud_sharing_configuration.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#1d2d44">

  </head>
  <body role="document">


<div class="wrap container not-front">
  <div class="content row">
  <main class="main">
    
			<div class="row">
				<div class="col-md-3">
					<div class="sidebar">
            <h1>Nextcloud 13 Administration Manual</h1>
            
            <div class="sidebar-search">
              <form class="headersearch" action="../search.html" method="get">
                <input type="text" value="" name="q" id="q" class="form-control" /> 
                <button  class="btn btn-default" type="submit" id="searchsubmit">Search</button>
              </form>
            </div>
            
							<div class="menu-support-container">
								<ul id="menu-support" class="menu">
									<ul>
                    <li><a href="../contents.html">Table of Contents</a></li>
									</ul>
                  <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../release_notes.html">Release notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_server/index.html">Server configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_user/index.html">User management</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">File sharing and management</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="file_sharing_configuration.html">File Sharing</a></li>
<li class="toctree-l2"><a class="reference internal" href="federated_cloud_sharing_configuration.html">Configuring Federation Sharing</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="">Uploading big files &gt; 512MB</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#system-configuration">System configuration</a></li>
<li class="toctree-l3"><a class="reference internal" href="#configuring-your-web-server">Configuring your Web server</a></li>
<li class="toctree-l3"><a class="reference internal" href="#configuring-php">Configuring PHP</a></li>
<li class="toctree-l3"><a class="reference internal" href="#configuring-nextcloud">Configuring Nextcloud</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="default_files_configuration.html">Providing default files</a></li>
<li class="toctree-l2"><a class="reference internal" href="external_storage_configuration_gui.html">Configuring External Storage (GUI)</a></li>
<li class="toctree-l2"><a class="reference internal" href="external_storage_configuration.html">Configuring External Storage (configuration file)</a></li>
<li class="toctree-l2"><a class="reference internal" href="external_storage/auth_mechanisms.html">External Storage authentication mechanisms</a></li>
<li class="toctree-l2"><a class="reference internal" href="encryption_configuration.html">Encryption configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="files_locking_transactional.html">Transactional file locking</a></li>
<li class="toctree-l2"><a class="reference internal" href="previews_configuration.html">Previews configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="file_versioning.html">Controlling file versions and aging</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../file_workflows/index.html">File workflows</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_database/index.html">Database configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_mimetypes/index.html">Mimetypes management</a></li>
<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues and troubleshooting</a></li>
</ul>

								</ul>
							</div>
					</div>
				</div>
        

				<div class="col-md-9">
					<div class="page-content">
            
<ul class="prevnext-title list-unstyled list-inline">
  <li class="prev">
    <a href="federated_cloud_sharing_configuration.html" title="Previous Chapter: Configuring Federation Sharing"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">&laquo; Configuring Federation Sharing</span>
    </a>
  </li>
  <li class="next">
    <a href="default_files_configuration.html" title="Next Chapter: Providing default files"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">Providing default files &raquo;</span>
    </a>
  </li>
</ul>
						
  <div class="section" id="uploading-big-files-512mb">
<h1>Uploading big files &gt; 512MB<a class="headerlink" href="#uploading-big-files-512mb" title="Permalink to this headline">¶</a></h1>
<p>The default maximum file size for uploads is 512MB. You can increase this
limit up to what your filesystem and operating system allows. There are certain
hard limits that cannot be exceeded:</p>
<ul class="simple">
<li>&lt; 2GB on 32Bit OS-architecture</li>
<li>&lt; 2GB with IE6 - IE8</li>
<li>&lt; 4GB with IE9 - IE11</li>
</ul>
<p>64-bit filesystems have much higher limits; consult the documentation for your
filesystem.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The Nextcloud sync client is not affected by these upload limits
as it is uploading files in smaller chunks.</p>
</div>
<div class="section" id="system-configuration">
<h2>System configuration<a class="headerlink" href="#system-configuration" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Make sure that the latest version of PHP (at least 5.6.6) is installed</li>
<li>Disable user quotas, which makes them unlimited</li>
<li>Your temp file or partition has to be big enough to hold multiple
parallel uploads from multiple users; e.g. if the max upload size is 10GB and
the average number of users uploading at the same time is 100: temp space has
to hold at least 10x100 GB</li>
</ul>
</div>
<div class="section" id="configuring-your-web-server">
<h2>Configuring your Web server<a class="headerlink" href="#configuring-your-web-server" title="Permalink to this headline">¶</a></h2>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Nextcloud comes with its own <code class="docutils literal"><span class="pre">nextcloud/.htaccess</span></code> file. Because <code class="docutils literal"><span class="pre">php-fpm</span></code>
can&#8217;t read PHP settings in <code class="docutils literal"><span class="pre">.htaccess</span></code> these settings must be set in the
<code class="docutils literal"><span class="pre">nextcloud/.user.ini</span></code> file.</p>
</div>
<p>Set the following two parameters inside the corresponding php.ini file (see the
<strong>Loaded Configuration File</strong> section of <a class="reference internal" href="../issues/general_troubleshooting.html#label-phpinfo"><span>PHP version and information</span></a> to find your
relevant php.ini files)</p>
<div class="highlight-python"><div class="highlight"><pre>php_value upload_max_filesize = 16G
php_value post_max_size = 16G
</pre></div>
</div>
<p>Adjust these values for your needs. If you see PHP timeouts in your logfiles,
increase the timeout values, which are in seconds:</p>
<div class="highlight-python"><div class="highlight"><pre>php_value max_input_time 3600
php_value max_execution_time 3600
</pre></div>
</div>
<p>The <a class="reference external" href="https://httpd.apache.org/docs/current/mod/mod_reqtimeout.html">mod_reqtimeout</a>
Apache module could also stop large uploads from completing. If you&#8217;re using this
module and getting failed uploads of large files either disable it in your Apache
config or raise the configured <code class="docutils literal"><span class="pre">RequestReadTimeout</span></code> timeouts.</p>
<p>There are also several other configuration options in your Web server config which
could prevent the upload of larger files. Please see the manual of your Web server
for how to configure those values correctly:</p>
<div class="section" id="apache">
<h3>Apache<a class="headerlink" href="#apache" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference external" href="https://httpd.apache.org/docs/current/en/mod/core.html#limitrequestbody">LimitRequestBody</a></li>
<li><a class="reference external" href="https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslrenegbuffersize">SSLRenegBufferSize</a></li>
</ul>
</div>
<div class="section" id="apache-with-mod-fcgid">
<h3>Apache with mod_fcgid<a class="headerlink" href="#apache-with-mod-fcgid" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference external" href="https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxrequestinmem">FcgidMaxRequestInMem</a></li>
<li><a class="reference external" href="https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxrequestlen">FcgidMaxRequestLen</a></li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>If you are using Apache/2.4 with mod_fcgid, as of February/March 2016,
<code class="docutils literal"><span class="pre">FcgidMaxRequestInMem</span></code> still needs to be significantly increased from its default value
to avoid the occurrence of segmentation faults when uploading big files. This is not a regular
setting but serves as a workaround for <a class="reference external" href="https://bz.apache.org/bugzilla/show_bug.cgi?id=51747">Apache with mod_fcgid bug #51747</a>.</p>
<p class="last">Setting <code class="docutils literal"><span class="pre">FcgidMaxRequestInMem</span></code> significantly higher than normal may no longer be
necessary, once bug #51747 is fixed.</p>
</div>
</div>
<div class="section" id="nginx">
<h3>nginx<a class="headerlink" href="#nginx" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference external" href="http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size">client_max_body_size</a></li>
<li><a class="reference external" href="http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_read_timeout">fastcgi_read_timeout</a></li>
<li><a class="reference external" href="http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_temp_path">client_body_temp_path</a></li>
</ul>
<p>Since nginx 1.7.11 a new config option <a class="reference external" href="https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_request_buffering">fastcgi_request_buffering</a>
is availabe. Setting this option to <code class="docutils literal"><span class="pre">fastcgi_request_buffering</span> <span class="pre">off;</span></code> in your nginx config
might help with timeouts during the upload. Furthermore it helps if you&#8217;re running out of
disc space on the tmp partition of your system.</p>
<p>For more info how to configure nginx to raise the upload limits see also <a class="reference external" href="https://github.com/owncloud/documentation/wiki/Uploading-files-up-to-16GB#configuring-nginx">this</a>
wiki entry.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Make sure that <code class="docutils literal"><span class="pre">client_body_temp_path</span></code> points to a partition with
adequate space for your upload file size, and on the same partition as
the <code class="docutils literal"><span class="pre">upload_tmp_dir</span></code> or <code class="docutils literal"><span class="pre">tempdirectory</span></code> (see below). For optimal
performance, place these on a separate hard drive that is dedicated to
swap and temp storage.</p>
</div>
<p>If your site is behind a nginx frontend (for example a loadbalancer):</p>
<p>By default, downloads will be limited to 1GB due to <code class="docutils literal"><span class="pre">proxy_buffering</span></code> and <code class="docutils literal"><span class="pre">proxy_max_temp_file_size</span></code> on the frontend.</p>
<ul class="simple">
<li>If you can access the frontend&#8217;s configuration, disable <a class="reference external" href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering">proxy_buffering</a> or increase <a class="reference external" href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_max_temp_file_size">proxy_max_temp_file_size</a> from the default 1GB.</li>
<li>If you do not have access to the frontend, set the <a class="reference external" href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering">X-Accel-Buffering</a> header to <code class="docutils literal"><span class="pre">add_header</span> <span class="pre">X-Accel-Buffering</span> <span class="pre">no;</span></code> on your backend server.</li>
</ul>
</div>
</div>
<div class="section" id="configuring-php">
<h2>Configuring PHP<a class="headerlink" href="#configuring-php" title="Permalink to this headline">¶</a></h2>
<p>If you don&#8217;t want to use the Nextcloud <code class="docutils literal"><span class="pre">.htaccess</span></code> or <code class="docutils literal"><span class="pre">.user.ini</span></code> file, you may
configure PHP instead. Make sure to comment out any lines <code class="docutils literal"><span class="pre">.htaccess</span></code>
pertaining to upload size, if you entered any.</p>
<p>If you are running Nextcloud on a 32-bit system, any <code class="docutils literal"><span class="pre">open_basedir</span></code> directive
in your <code class="docutils literal"><span class="pre">php.ini</span></code> file needs to be commented out.</p>
<p>Set the following two parameters inside <code class="docutils literal"><span class="pre">php.ini</span></code>, using your own desired
file size values:</p>
<div class="highlight-python"><div class="highlight"><pre>upload_max_filesize = 16G
post_max_size = 16G
</pre></div>
</div>
<p>Tell PHP which temp directory you want it to use:</p>
<div class="highlight-python"><div class="highlight"><pre>upload_tmp_dir = /var/big_temp_file/
</pre></div>
</div>
<p><strong>Output Buffering</strong> must be turned off in <code class="docutils literal"><span class="pre">.htaccess</span></code> or <code class="docutils literal"><span class="pre">.user.ini</span></code> or <code class="docutils literal"><span class="pre">php.ini</span></code>, or PHP
will return memory-related errors:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">output_buffering</span> <span class="pre">=</span> <span class="pre">0</span></code></li>
</ul>
</div>
<div class="section" id="configuring-nextcloud">
<h2>Configuring Nextcloud<a class="headerlink" href="#configuring-nextcloud" title="Permalink to this headline">¶</a></h2>
<p>As an alternative to the <code class="docutils literal"><span class="pre">upload_tmp_dir</span></code> of PHP (e.g. if you don&#8217;t have access to your
<code class="docutils literal"><span class="pre">php.ini</span></code>) you can also configure a temporary location for uploaded files by using the
<code class="docutils literal"><span class="pre">tempdirectory</span></code> setting in your <code class="docutils literal"><span class="pre">config.php</span></code> (See <a class="reference internal" href="../configuration_server/config_sample_php_parameters.html"><em>Config.php Parameters</em></a>).</p>
<p>If you have configured the <code class="docutils literal"><span class="pre">session_lifetime</span></code> setting in your <code class="docutils literal"><span class="pre">config.php</span></code>
(See <a class="reference internal" href="../configuration_server/config_sample_php_parameters.html"><em>Config.php Parameters</em></a>) file then
make sure it is not too
low. This setting needs to be configured to at least the time (in seconds) that
the longest upload will take. If unsure remove this completely from your
configuration to reset it to the default shown in the <code class="docutils literal"><span class="pre">config.sample.php</span></code>.</p>
<div class="section" id="configuring-upload-limits-within-the-gui">
<h3>Configuring upload limits within the GUI<a class="headerlink" href="#configuring-upload-limits-within-the-gui" title="Permalink to this headline">¶</a></h3>
<p>If all prerequisites described in this documentation are in place an admin can change the
upload limits on demand by using the <code class="docutils literal"><span class="pre">File</span> <span class="pre">handling</span></code> input box within the administrative
backend of Nextcloud.</p>
<div class="figure">
<img alt="../_images/admin_filehandling-1.png" src="../_images/admin_filehandling-1.png" />
</div>
<p>Depending on your environment you might get an insufficient permissions message shown for
this input box.</p>
<div class="figure">
<img alt="../_images/admin_filehandling-2.png" src="../_images/admin_filehandling-2.png" />
</div>
<p>To be able to use this input box you need to make sure that:</p>
<ul class="simple">
<li>your Web server is able to use the <code class="docutils literal"><span class="pre">.htaccess</span></code> file shipped by Nextcloud (Apache only)</li>
<li>the user your Web server is running as has write permissions to the files <code class="docutils literal"><span class="pre">.htaccess</span></code> and <code class="docutils literal"><span class="pre">.user.ini</span></code></li>
</ul>
</div>
</div>
</div>


            
<ul class="prevnext-title list-unstyled list-inline">
  <li class="prev">
    <a href="federated_cloud_sharing_configuration.html" title="Previous Chapter: Configuring Federation Sharing"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">&laquo; Configuring Federation Sharing</span>
    </a>
  </li>
  <li class="next">
    <a href="default_files_configuration.html" title="Next Chapter: Providing default files"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">Providing default files &raquo;</span>
    </a>
  </li>
</ul>
					</div>
				</div>
			</div>
  </main>  
  </div>
</div>
  </body>
</html>