- Advertisement -
VPS House Servers
VPS House Servers
VPS House Servers


OwnCloud 9.1.4 is an open source software for file sharing and data synchronization that is very useful in the enterprise sector, with an easy to use front-end web format.

This tutorial is about installing ownCloud on CentOS 7 with Nginx as your web server.

Install Nginx and PHP

First, install Nginx. This web server is available on EPEL repository, so just add it like this:

and then:

- Advertisement -
VPS House Cloud Servers
VPS House Cloud Servers
VPS House Cloud Servers

Next, install PHP-FPM (FastCGI Process Manager), using webtatic repository, which is added with the following command:

Now it is possible to install PHP with other packages required by ownCloud:

Configure PHP-FPM for Nginx

PHP-FPM configuration is done by editing the php7-fpm configuration file:

Search lines containing “user” and “group” and change with:

Scroll down, looking for line “listen”, and change the content to:

Next, uncomment the following lines about environment variables:

Save and exit.

Now, it’s time to create a new folder in /var/lib/, with the following command:

Change its owner to nginx user:

Start nginx and PHP-FPM:

Add to start at boot time (required for daily usage for the machine as server):

Install MariaDB

MariaDB is available in the CentOS repository, so install it with:

Configure the MariaDB root password:

During the process, answer the following questions:

Login to the MariaDB shell to create a new database and user for ownCloud. In this example, my_owncloud_db is the database name and ocuser is its user. The password is: my_strong_password.

So, execute the command:

and then:

Generate a SSL Certificate

If none exists, create a new directory for the SSL file:

Next, generate a new SSL certificate file:

Change the permissions with the following command:

Download ownCloud

Download ownCloud Server:

Extract the archive and move it to /usr/share/nginx/html/:

Go to the Nginx root directory; there, create a new data directory for ownCloud:

Configure a Virtual Host in Nginx

Create a Virtual Host configuration file with the following command:

Paste the following text into the file:

Save and exit. Next, test Nginx:

This should display a “Syntax OK” message.

Restart Nginx:


The server side configuration is complete. The last thing to do is to go to your ownCloud server URL (storage.example.com in this example) with a web browser and finish the configuration with the graphical front-end. Do this by creating a new admin account, and entering database credentials created in the previous steps. Your cloud storage service is now ready for a daily usage!


- Advertisement -

There are no comments yet

  • Hello, guest