How to Install and Configure Nextcloud on CentOS 7 / RHEL 7

11 Responses

  1. Joe Bill Schirtzinger says:

    These instructions worked well. If you have another server like nginx running, be sure to go into apache.config and change the port to something else for the apache webserver to run along with making a rule for the firewall for apache.

  2. jl says:

    Setting up a Server to permissive mode is a bad idea. Refer to the SELINUX section of NextCloud Admin guide for proper apps, data and config folder permissions.

  3. Vinit says:

    I have configure the same steps but when i access webpage from other pc it shows me some php scripts instead of that blue page of login…please guide

    • Ben says:

      Try the following via command line:

      php -v

      If nothing pulls through sounds like PHP isn’t installed or installed correctly. Try the following:

      yum install php php-mysql sqlite php-dom php-mbstring php-gd php-pdo php-json php-xml php-zip php-gd curl php-curl php-mcrypt php-pear -y

      if that doesn’t work try the following:

      yum install epel-release -y

      yum install php php-mysql sqlite php-dom php-mbstring php-gd php-pdo php-json php-xml php-zip php-gd curl php-curl php-mcrypt php-pear -y

  4. Mario says:

    Hello. Just for your information when use version 10 of nextcloud (i dont know if those errors in version 9 exist).

    When you do:
    Create a database user (nxtuser) and grant all the privileges to the user on the database ‘nextcloud_db‘

    Then you will get in log file this:
    Database creation failed: An exception occurred while executing ‘GRANT ALL PRIVILEGES ON `nextcloud_db` . * TO ‘nxtuser”: SQLSTATE[42000]: Syntax error or access violation: 1044 Access denied for user ‘nxtuser’@’localhost’ to database ‘nextcloud_db’

    You dont have to create a DB User. Just for the first time you start the installation wizzard, use the DB root user and password.
    Then all is fine 🙂

    It will generate a database user and random password. You can find it then in nexcloud installation folder /var/www/html/nextcloud/config/config.php (or where you installed it)

    i.e. you choose the admin user in the wizzard with username “admin” then the database user “oc_admin” been create with the random password.

    No errors then in log so far.

    People who want to use php5.5 can use Red Hat Software Collections (SCL) repository.

  5. Yoel Gutierrez says:

    Hello I have a weird problem, I set up everything and is working good. I install the NextCloud in a VM locally in my home. Setup HTTPS redirection and it is working perfectly when I am outside my home and everything seems to be working perfectly. But, the thing is if I access my cloud thru my domain, ( out of my local network, work perfectly. the problem is when I get home I cant do it that way. if I open the browser and type ‘’ it never get to the nextcloud. but If I type my local ip address in the address bar of the NextCloud Server it opens perfectly. witch it like anoying everytime I get home remove the domain name and login with my local ip address.

    Please HELP I am frustrated

    • Hello Yoel ,

      Problem seems to be DNS server, Please check the DNS server ip of your machine at your home. Work around is that you can update the hosts file of your system set the below entries :

      ‘ip -Address-of-nextcloud’

  6. Ben says:

    Great tutorial! Much appreciated.
    Will definitely be looking to enable SELinux without any interference though.

  7. Oppa says:

    If you want to use UTF8 4-byte characters such as Emojis on your server, the database needs to be created with character set utf8mb4 and collate utf8mb4_general_ci, e.g.:

    CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

    copied from it’s official page (system requirements).

  8. hasan says:

    Hey brother Good day, Greetings;
    I need upload file size at least 10GB! i edited the file “upload_max_filesize = 10G” from /etc/php.ini but updated 8M at admin panel & user cant upload over 8M files. would you please help me, how can i increase max_ upload_file size? at lease 10GB

Leave a Reply

Your email address will not be published. Required fields are marked *