NextCloud Installation

  • General Information

    This guide will work with OMV3 (PHP 5.6).
    Not sure with OMV2 (PHP 5.4).

    This is for NextCloud 11 and newer.

    PHP7 is a little different, and it may break OMV system.

    This guide contain more details than any other guide that I created so far in this forum.

    Note: the NextCloud users are not sync with OMV users unless you use NextCloud external user support or something similar.

    External user.jpg

    Note 2: You can create a self-sign certificate for your NextCloud in OMV homepage or use Let's Encrypt to generate one (you must currently own a domain).

    Pre-Installation Steps

    1a. Ensure you have the following programs installed and other stuffs:
    MySQL, Nginx, Putty, basic knowledge of Linux, an internet connection,
    apt-get install php5-curl
    apt-get install php5-gd.

    apt-get install zip unzip
    apt-get install wget

    I chose Redis for cache performance, refer to step 8 for more details.

    apt-get install redis-server php5-redis

    Configuration and Installation

    1b. go to your MySQL database, and ensure you can login with it.
    So you can use it for the setup later.


    1c. Log into your OMV homepage, and go to Share Folders tab, and create a share folder call: www


    1d. Next, create a folder name nextcloud under www, and give nextcloud ACL with Read/Write for www-data user and group.
    Then click "Apply".


    1e. Go to Nginx (web sites) tab to create a NextCloud pool.

    In the pool config of your NC fpm-pool (nginx/pools) add these lines in the extra options field:

    clear_env = no
    env[PATH] = /usr/local/bin:/usr/bin:/bin
    env[TMP] = /tmp
    env[TMPDIR] = /tmp
    env[TEMP] = /tmp


    1f. Use Port 90 for HTTP and port 91 for HTTPS or whatever you desire, but ensure they don't conflict with other web servers.
    Note: It would easier to begin the setup with HTTP than HTTPS. After the installation is done, you can change it to HTTPS, and use Let's Encrypt for your encryption if you want.


    2. Un-check the "default config' option in the PHP section. (Credit to Zocker1996)
    Leave the rest default.

    3. Add this to your Nginx extra options:

    4. Open your Putty, and go to your share drive. ie. /media/UUID/....
    UUID is a long characters such as 54321abcdfgh977.....

    The version may change from time to time.
    You might want to check there before do the installation.

    Update: NC v11.0.2

    Note: You can use the this script for this step if you like: http://forum.openmediavault.or…?postID=138230#post138230 or else follow below steps>>

    Enter the below command in Putty:

    Unzip nextcloud archive:
    5. unzip

    copy all its files to your nextcloud folder (the one you created earlier):
     cp -r nextcloud/. /media/UUID/www/nextcloud

    6. cd /media/UUID/www/
    chown -R www-data:www-data nextcloud

    7. open your browser and enter your local ip such as: to begin the installation.

    7a. Enter a "." to install in the current directory (/media/UUID/www/nextcloud).

    7b. NextCloud will ask you to create an admin account, and put in your MySQL password to create the database.
    i.e: If you install NC in the OS drive, then it would be like: /var/www/nextcloud
    Otherwise, it would be like: /media/UUID/www/nextcloud

    7c. Follow the rest of the configuration process.

    8. Memory caching:

    Redis is recommended or you can use APCu for low-power CPU such as dual-core or RPI.

    APCu: apt-get install php5-apcu
    Config.php: 'memcache.local' => '\OC\Memcache\APCu',

    Redis: apt-get install redis-server php5-redis
    Config.php: 'memcache.locking' => '\OC\Memcache\Redis',

    Whatever method you choose, it should look like this in the config.php:

    • Code
      'memcache.local' => '\OC\Memcache\Redis',
      'memcache.locking' => '\OC\Memcache\Redis',
      'redis' => array(
      'host' => 'localhost',
      'port' => 6379,


    'memcache.local' => '\OC\Memcache\APCu',
    'memcache.locking' => '\OC\Memcache\Redis',
     'redis' => array(
          'host' => 'localhost',
          'port' => 6379,

    9. Setup Trusted Domains:
    9a. cd /media/UUID/www/nextcloud/config/
    9b. nano config.php

    Ensure you enter your domain & NC IP are correct in here:

    'trusted_domains' =>
      array (
       0 => 'localhost',
       1 => '',
       2 => '',

    9c. Press Ctrl + O to save.

    9d. Restart Nginx service:
    service nginx restart

    10. After you have NextCloud running like it should be, then remove the NC zip folder.
    cd /media/UUID/
    rm -r nextcloud

    11. (Optional). Set strong permission for NextCloud:

    Save the following codes as a script, and execute.

    Change ocpath variable to your appropriate NC path, before execute it.

    Questions / Problems / Discussions

    If you encounter an error or the setup can't be done, then re-read the tutorial or ask in that thread:
    NextCloud Installation Q & A


    • NC_DL.PNG

      (34.73 kB, downloaded 1,010 times, last: )

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

    Edited 76 times, last by ryecoaaron: formatting ().

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!