Steps to follow for a correct setup:
Recommended Equipment (Basic use no more than 5 users)+ If you want setup for more than 10 users you have to think about memory ram and storage depend how many information your users wanna store.
Example:I got in home 5tb on my NAS and this guy have 12gb of RAM and 8gb on SWP
ServerFor best performance, stability and functionality we have documented some recommendations for running a Nextcloud server. The Nextcloud server is not compatible with Windows and macOS.
MemoryMemory requirements for running an Nextcloud server are greatly variable, depending on the numbers of users, apps, files and volume of server activity.
Database requirements for MySQL / MariaDBThe following is currently required if you’re running Nextcloud together with a MySQL / MariaDB database:
- InnoDB storage engine (MyISAM is not supported)
- “READ COMMITED” transaction isolation level (See: Database “READ COMMITTED” transaction isolation level)
- Disabled or BINLOG_FORMAT = ROW configured Binary Logging (See: https://dev.mysql.com/doc/refman/5.7/en/binary-log-formats.html)
- For Emoji (UTF8 4-byte) support see Enabling MySQL 4-byte support
Desktop clientWe strongly recommend using the latest version of your operating system to get the full and most stable experience out of our clients.
- Windows 7+
- macOS Lion (10.7)+ (64-bit only)
- Linux (CentOS 6.5+, Ubuntu 14.04+, Fedora 21+, openSUSE 13, SUSE Linux Enterprise 11 SP3+, Debian 8 (Jessie)+, Red Hat Enterprise Linux 7)
Mobile appsWe strongly recommend using the latest version of your mobile operating system to get the full and most stable experience out of our mobile apps.
- iOS 9.x+
- Android 4.x+
Example installation on debian server
apt install snapdsnap install nextcloud
Or you can use .deb packages to install the required and recommended modules for a typical Nextcloud installation, using Apache and MariaDB, by issuing the following commands in a terminal:
apt-get install apache2 mariadb-server libapache2-mod-php7.0 apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring apt-get install php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip
- This installs the packages for the Nextcloud core system.
libapache2-mod-php7.0provides the following PHP extensions:
bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext hash iconv libxml mhash openssl pcre Phar posix Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xmlreader xmlwriter zlib. If you are planning on running additional apps, keep in mind that they might require additional packages. See Prerequisites for manual installation for details.
- At the installation of the MySQL/MariaDB server, you will be prompted to create a root password. Be sure to remember your password as you will need it during Nextcloud database setup.
Go to the Nextcloud Download Page.
Go to Download Nextcloud Server > Download > Archive file for server owners and download either the tar.bz2 or .zip archive.
This downloads a file named nextcloud-x.y.z.tar.bz2 or nextcloud-x.y.z.zip (where x.y.z is the version number).
Download its corresponding checksum file, e.g. nextcloud-x.y.z.tar.bz2.md5, or nextcloud-x.y.z.tar.bz2.sha256.
Verify the MD5 or SHA256 sum:
md5sum -c nextcloud-x.y.z.tar.bz2.md5 < nextcloud-x.y.z.tar.bz2 sha256sum -c nextcloud-x.y.z.tar.bz2.sha256 < nextcloud-x.y.z.tar.bz2 md5sum -c nextcloud-x.y.z.zip.md5 < nextcloud-x.y.z.zip sha256sum -c nextcloud-x.y.z.zip.sha256 < nextcloud-x.y.z.zip
You may also verify the PGP signature:
wget https://download.nextcloud.com/server/releases/nextcloud-x.y.z.tar.bz2.asc wget https://nextcloud.com/nextcloud.asc gpg --import nextcloud.asc gpg --verify nextcloud-x.y.z.tar.bz2.asc nextcloud-x.y.z.tar.bz2
Now you can extract the archive contents. Run the appropriate unpacking command for your archive type:
tar -xjf nextcloud-x.y.z.tar.bz2 unzip nextcloud-x.y.z.zip
This unpacks to a single
nextclouddirectory. Copy the Nextcloud directory to its final destination. When you are running the Apache HTTP server you may safely install Nextcloud in your Apache document root:
cp -r nextcloud /path/to/webserver/document-root
/path/to/webserver/document-rootis replaced by the document root of your Web server:
cp -r nextcloud /var/www
Apache Web server configuration
/etc/apache2/sites-available/nextcloud.conffile with these lines in it, replacing the Directory and other filepaths with your own filepaths:
Alias /nextcloud "/var/www/nextcloud/" <Directory /var/www/nextcloud/> Options +FollowSymlinks AllowOverride All <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/nextcloud SetEnv HTTP_HOME /var/www/nextcloud </Directory>
ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf
Additional Apache configurations
For Nextcloud to work correctly, we need the module
mod_rewrite. Enable it by running:
a2enmod headers a2enmod env a2enmod dir a2enmod mime
mod_fcgiinstead of the standard
You must disable any server-configured authentication for Nextcloud, as it uses Basic authentication internally for DAV services. If you have turned on authentication on a parent folder (via e.g. an
AuthType Basicdirective), you can turn off the authentication specifically for the Nextcloud entry. Following the above example configuration file, add the following line in the
When using SSL, take special note of the ServerName. You should specify one in the server configuration, as well as in the CommonName field of the certificate. If you want your Nextcloud to be reachable via the internet, then set both of these to the domain you want to reach your Nextcloud server.
Now restart Apache:
service apache2 restart
If you’re running Nextcloud in a subdirectory and want to use CalDAV or CardDAV clients make sure you have configured the correct Service discovery URLs.
Pretty URLsPretty URLs remove the
index.php-part in all Nextcloud URLs, for example in sharing links like
https://example.org/nextcloud/index.php/s/Sv1b7krAUqmF8QQ, making URLs shorter and thus prettier.
mod_rewritemust be installed on your webserver and the
.htaccessmust be writable by the HTTP user. Then you can set in the
'overwrite.cli.url' => 'https://example.org/nextcloud', 'htaccess.RewriteBase' => '/nextcloud',
'overwrite.cli.url' => 'https://example.org', 'htaccess.RewriteBase' => '/',
sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess
You can use Nextcloud over plain HTTP, but we strongly encourage you to use SSL/TLS to encrypt all of your server traffic, and to protect user’s logins and data in transit.
a2enmod ssl a2ensite default-ssl service apache2 reload
Self-signed certificates have their drawbacks – especially when you plan to make your Nextcloud server publicly accessible. You might want to consider getting a certificate signed by a commercial signing authority. Check with your domain name registrar or hosting service for good deals on commercial certificates.
Installation wizardAfter restarting Apache you must complete your installation by running either the graphical Installation Wizard, or on the command line with the
occcommand. To enable this, change the ownership on your Nextcloud directories to your HTTP user:
chown -R www-data:www-data /var/www/nextcloud/
occsee Installing from command line. To use the graphical Installation Wizard see Installation wizard.
SELinux configuration tipsSee SELinux configuration for a suggested configuration for SELinux-enabled distributions such as Fedora and CentOS.
php.ini configuration notesKeep in mind that changes to
php.inimay have to be configured on more than one ini file. This can be the case, for example, for the
date.timezonesetting. php.ini – used by the Web server:
/etc/php5/apache2/php.ini or /etc/php5/fpm/php.ini or ...
php-fpm configuration notesSecurity: Use at least PHP >= 5.6.6 Due to a bug with security implications in older PHP releases with the handling of XML data you are highly encouraged to run at least PHP 5.6.6 when in a threaded environment. System environment variables When you are using
php-fpm, system environment variables like PATH, TMP or others are not automatically populated in the same way as when using
php-cli. A PHP call like
getenv('PATH');can therefore return an empty result. So you may need to manually configure environment variables in the appropropriate
php-fpmini/config file. Here are some example root paths for these ini/config files:
www.conf, and depending on the distro version or customizations you have made, it may be in a subdirectory such as
pool.d. Usually, you will find some or all of the environment variables already in the file, but commented out like this:
;env[HOSTNAME] = $HOSTNAME ;env[PATH] = /usr/local/bin:/usr/bin:/bin ;env[TMP] = /tmp ;env[TMPDIR] = /tmp ;env[TEMP] = /tmp
printenv PATHto confirm your paths, for example:
$ printenv PATH /home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin: /sbin:/bin:/
and uncommenting the line/etc/php/7.0/fpm/pool.d/www.conf
When you are using shared hosting or a control panel to manage your Nextcloud VM or server, the configuration files are almost certain to be located somewhere else, for security and flexibility reasons, so check your documentation for the correct locations. Please keep in mind that it is possible to create different settings forclear_env = no
php-fpm, and for different domains and Web sites. The best way to check your settings is with PHP version and information. Maximum upload size If you want to increase the maximum upload size, you will also have to modify your
php-fpmconfiguration and increase the
post_max_sizevalues. You will need to restart
php5-fpmand your HTTP server in order for these changes to be applied. .htaccess notes for Apache Nextcloud comes with its own
php-fpmcan’t read PHP settings in
.htaccessthese settings and permissions must be set in the