How to Install OwnCloud to Create Own Cloud Storage in Linux

Cloud storage stands for a virtualized pool of network storage most commonly hosted by third parties. Cloud storage is a network-based service that physically does not exist but remains somewhere in the cloud. To be more clear, cloud storage means sharing data over a network, rather than having local servers or personal devices.

Cloud storage is all around us in our smartphones, on desktops and servers, etc. The Dropbox application which is now available on smartphones is nothing but a cloud storage application. Google Drive is another cloud storage application that lets you store and access your stored data from anywhere and anytime.

[ You might also like: 16 Open Source Cloud Storage Software for Linux ]

This article aims at – Building your personal cloud storage using your ownCloud application. But what is the need of building a personal cloud when there is third-party hosting? Well, all the third-party hosting limits you to work with the given configuration and storage limit.

The ever-expanding list of photos, videos, mp3’s of storage is not sufficient, moreover, cloud storage is a relatively new concept and there are not many third-party cloud storage hosts and the available one is too much costly.

OwnCloud Community has recently released their special release ownCloud 10. They have come up with incredible changes in terms of quality, performance, and innovations to provide an excellent cloud experience with “ownCloud“. If you are already working with its older version, you’ll definitely experience significant improvements in Document handling.

What is ownCloud

ownCloud is a free, open-source, and powerful web application for data synchronization, file sharing, and remote storage of files. ownCloud is written in PHP/JavaScript languages, which is designed to work with several database management systems, including MySQL, MariaDB, SQLite, Oracle Database, and PostgreSQL.

Moreover, owncloud can be deployed on all known platforms viz., Linux, Macintosh, Windows, and Android. In short, it’s a robust, platform Independent, flexible in terms of configuration and usability, easy-to-use open-source Application.

Features of owncloud

  • Store files, folders, contacts, photo galleries, calendars, etc on the server of your choice, Later you can access it from mobile, desktop, or web browser.
  • In the world of gadgets, a normal person has a tablet, smartphone, laptop, etc. Own cloud lets you sync all your files, contacts, photo, calendar, etc synced with the devices.
  • In the era of sharing aka Facebook, Twitter, Google+, etc, owncloud lets you share your data with others and share them publicly or privately as per your needs.
  • The easy user interface lets you manage, upload, create users, etc in a very easy fashion.
  • A special feature is that even users can undelete the accidentally deleted data from Trash, is not it easy to handle and maintain.
  • The search feature in owncloud is very responsive which is done in the background and lets users search by name as well as the file type.
  • Contacts are organized into categories/groups hence easy to access contacts on the basis of friends, co-workers, families, etc.
  • You can now access external storage be it Dropbox, FTP, or anything else by mounting.
  • Easy to migrate to/from another owncloud server.

What’s New in ownCloud 10

  • Accessibility Improvement for app’s management page, updater app, and search.
  • Additional notification and direct download supported.
  • The storage configuration file can be tuned to a higher level in this release.
  • Apps management is now intelligent enough to store App’s dependency in XML files from where Apps container can solve the dependencies automatically.
  • Documentation improved to the next level, PDF viewer improved with the implementation of a new version of PDF.js.
  • Improved user management and structured settings and admin page improved.
  • Link sharing has now gone better by shortening.
  • Overall performance improved as compared to the previous version.
  • Contacts importing improved.
  • Federated (United) cloud sharing which means setting up shared folders across servers is a cakewalk. This feature makes it possible to collaborate with organizations with the control at the local owncloud deployment server.
  • Apps now feature ratings and are category-based.
  • Set favorite icon to files and folders so that it is easy to sort and edit.
  • Add files to favorites so that it is easy to find them later.
  • Admin can edit email addresses of users, sort and select users as well as rename groups.
  • Basic feature includes – connecting to owncloud over HTTP(s), browse for files/folder in explorer, automatic sync, sharing files with other users, sync folders from PC, Pause and resume downloads and uploads and configure the proxy.

System Requirements

For higher performance, stability, support, and full functionality we recommend the following things:

  1. Minimum 128MB RAM, recommend 512MB.
  2. RHEL/CentOS 7/8, Fedora 29+, Ubuntu 16.04, 18.04 and Ubuntu 20.04, Debian 8/9 and 10.
  3. MySQL/MariaDB 5.5+.
  4. PHP 5.4 +
  5. Apache 2.4 with mod_php

Step 1: Install ownCloud Storage in Linux

In order to set up your own personal cloud storage (ownCloud), you must have the LAMP (Linux, Apache, MySQL/MariaDB, PHP) stack installed. Other than the LAMP stack you might need Perl and Python-based upon your use.

On Debian/Ubuntu/Linux Mint
---------------------- For MySQL Server ----------------------
$ sudo apt install -y apache2 libapache2-mod-php mysql-server openssl php-imagick php-common php-curl php-gd php-imap php-intl php-json php-mbstring php-mysql php-ssh2 php-xml php-zip php-apcu php-redis redis-server wget

---------------------- For MariaDB Server ----------------------
$ sudo apt install -y apache2 libapache2-mod-php mariadb-server openssl php-imagick php-common php-curl php-gd php-imap php-intl php-json php-mbstring php-mysql php-ssh2 php-xml php-zip php-apcu php-redis redis-server wget
On RedHat/CentOS/Fedora
---------------------- For MySQL Server ----------------------
$ sudo yum install -y httpd mysql-server openssl php-imagick php-common php-curl php-gd php-imap php-intl php-json php-mbstring php-mysql php-ssh2 php-xml php-zip php-apcu php-redis redis-server wget

---------------------- For MariaDB Server ----------------------
$ sudo yum install -y httpd mariadb-server openssl php-imagick php-common php-curl php-gd php-imap php-intl php-json php-mbstring php-mysql php-ssh2 php-xml php-zip php-apcu php-redis redis-server wget

Once you set up the LAMP stack on your personal box, next you need to enable and start the Apache and MariaDB service.

--------- On Debian based Systems ---------
$ sudo systemctl enable apache2 mariadb
$ sudo systemctl start apache2 mariadb

--------- On RedHat based Systems ---------
$ sudo systemctl enable httpd mariadb
$ sudo systemctl start httpd mariadb

The default MariaDB settings are not secure enough, so you need to run the security script to set a strong root password, remove anonymous users, disable remote root login, remove the test database, and finally save the changes made.

$ sudo mysql_secure_installation
Secure MariaDB Installation
Secure MariaDB Installation

Step 2: Create ownCloud Database

Now login to the database server using the password that you recently set.

sudo mysql -u root -p

Now we will be creating a database (say owncloud) with a new user.

MariaDB [(none)]> create database owncloud;
MariaDB [(none)]> grant all on owncloud.* to tecmint@localhost identified by 'tecmint';
MariaDB [(none)]> Quit;

Step 3: Download and Install ownCloud Application

Now it’s time to Download the latest ownCloud (i.e version 10.7.0) application using the wget command to download the source tarball package.

$ cd /var/www/html
$ sudo wget
$ sudo tar -xjf owncloud-latest.tar.bz2
$ sudo chown -R www-data. owncloud

Step 4: Configuring Apache for ownCloud

For security purposes, ownCloud uses Apache‘s .htaccess files, in order to use them. We need to enable two Apache modules mod_rewrite and mod_headers for our ownCloud to function properly. Type the following command to enable these modules under Debian-based systems only, for RedHat systems they are enabled by default.

$ sudo a2enmod rewrite
$ sudo a2enmod headers

Additionally, we need to enable mod_rewrite rules to work properly under Apache‘s main configuration file. Open the Apache global configuration file.

# vi /etc/httpd/conf/httpd.conf			[For RedHat based Systems]

There, find “AllowOverride None” and change this to “AllowOverride All” as shown.

AllowOverride None

Change this to:

AllowOverride All

Now we need to restart Apache to reload new changes.

# service apache2 restart			[For Debian based Systems]
# service httpd restart				[For RedHat based Systems]

Step 5: Access ownCloud Application

Now you can access your very personal cloud storage at:


Once you get the Owncloud page, you need to create an admin account and a Data folder location, where all files/folders will be stored (or leave default location i.e. /var/www/owncloud/data or /var/www/html/owncloud/data). Next, you need to enter mysql database username, password, and database name, refer to the screenshot below.

OwnCloud 9 Installation Wizard
OwnCloud Installation Wizard

Once all the correct values are entered, click Finish and your private cloud storage is ready, you are greeted with the working interface:

OwnCloud 9 Admin Dashboard
OwnCloud Admin Dashboard

Notice the Favorites, edit, share, download, upload, and new file options available for a file.

Upload Files to OwnCloud Storage
Upload Files to OwnCloud Storage

Activities log of oneself and others.

Owncloud Activity Log
Owncloud Activity Log

Pictures library.

My Owncloud Picture Library
My Owncloud Picture Library

Apps enable and disable interface as well as a recommendation with a brief introduction.

Enabled Application
Enabled Application

Inbuilt PDF reader.

PDF Reader
PDF Reader

From this admin panel, you can view security and setup warnings, Federated cloud sharing, Mail Templates,
Updater, Cron, sharing, Security, Email Server, Log, etc.

Security Setup Warning
Security Setup Warning

User and Group information with quota.

User Group Quota
User Group Quota

Note: You can add users or imports user account, change password, assign user role and allocate space by clicking the Gear icon on the left bottom of the page.

You may now add folders, sync media files are its pictures, images, and videos from the mobile application. Owncloud lets you add new users, and sync calendars, contacts, Media files, etc.

It also has a built-in MP3 Player, PDF Viewer, Document Viewer, and a lot many which is worth a try and explore. So what are you waiting for? Become a proud owner of private cloud storage, give it a try!

Upgrading to Owncloud 10 from Older Versions

To update the earlier version of your own cloud to 10, you need to first update the old own cloud to the latest point release of the same version.

For example, if you’re using owncloud 8.0.xy (where ‘xy‘ is the version number), you need to first update to 9.0.x of the same series, and then you are able to upgrade to owncloud 10 using the following instructions.

Updating to Owncloud 10 form Older Versions

  1. Making a proper backup of everything is always suggested.
  2. Enable the updater plugin (if it is disabled).
  3. Go to Admin Panel and fire update.
  4. Refresh page using ‘Ctrl+F5‘, you’re done.

If the above procedure doesn’t work, you can do a full upgrade to update to the newest point release (see ‘Upgrade‘ instructions below).

Else, if you’re already using Owncloud 7, 8, or 9 and want to update to Owncloud 10, you can follow the below same ‘Upgrade‘ instructions to get the latest version of Owncloud.

Upgrading Old OwnCloud to OwnCloud 10 Latest Release

  1. Update your owncloud version to the latest point release of your version.
  2. Not to Mention, Make a full backup before upgrading.
  3. Download the latest tarball using the wget command.
# wget
  1. Deactivate all native and third-party applications and plugins.
  2. Delete Everything from the owncloud Directory except DATA and CONFIG directory.
  3. Untar the tarball and copy everything to the root of your owncloud directory within your working directory.
  4. Grant required permissions and run Upgrade from the Next page and it’s done!.
  5. Don’t forget to install and enable Third-party Applications and plug-ins only after checking the compatibility with the current version.

So what are you waiting for? Install the latest owncloud project or upgrade your last version to the latest and start using it.

That’s all for now. Don’t forget to provide us with your valuable feedback in the comments. I’ll soon be here with another interesting article, you people will love to read. Till then Stay tuned, connected to tecmint, and healthy. Like and share us, help us get spread.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Ravi Saive
I am an experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.


Leave a Reply
  1. It is one thing to install another is to make it secure. Very few have the skills needed to securely interface it to the internet ie outside your own LAN.

  2. For anybody reading this, just save yourself some time and find another set of instructions if you’re using Ubuntu. If you’re using something else, hey maybe the instructions are right for that, but I highly doubt it. Thank me later.

  3. These instructions are not correct. Apache’s global configuration file is definitely not called ‘default’ for one, there are many more mistakes…

    • @Johnny,

      Your request for Install OwnCloud with Nginx and Let’s Encrypt is approved, and will be published soon, till then stay tuned to Tecmint.

    • @Mark,

      Thanks for sharing instructions for Debian, hope it will help other Debian users to install OwnCloud 9 properly..

  4. Under Ubuntu 14.04 which uses Apache2.4 the default path is: /var/www/html.
    For Site-Available the default is 000-default.conf
    For all your sites they have to have the extension .conf.
    Look forward in trying out your instructions.
    Question. What plug in are you using for this Comment form, I need something like this? Thanks in advance.

      • I don’t think that actually matters as WordPress defaults have also changed along with Apache2, the instruction say “On Debian/Ubuntu/Linux Mint” which is what brought me here. The instruction “as is” would not work on a Ubuntu/Linux Mint system 14.04 installation or greater. I would think Debian has changed also.
        nano /etc/apache2/sites-available/default does not exist.
        There, find “AllowOverride None” and change this to “AllowOverride All” as shown. Does not exist in the new 000-default.conf file.
        So a user would have to know these things and make the adjustments to make it work. No good for newbies.
        Image or cut and paste examples of the configuration files you are editing would help people.

        • To follow-up – “AllowOverride All” is not allowed in 000-default.conf.
          AllowOverride not allowed here
          Action ‘configtest’ failed.
          The Apache error log may have more information.

          Just saying.

    • @Angelo,

      You can access your own Owncloud platform through IP or domain name from any remote location, as far as you opened access to particular location via firewall..

  5. Hi,

    Thanks for the awesome tutorial, I had it running on RHEL7 within one hour with MariaDB backend and a dedicated partition for storage on the server i.e. /cloudfs, there were initially some hiccups related to apache and php but got it sorted out. It would practically work on any variant of Linux. So go on and get it configured :-)

    Dillip, Bengaluru, India

  6. while the author did a decent job describing the product and explaining the installation [thank you, btw] its worth noting that in spite of touting owncloud as, “ownCloud is a free, open-source and powerful web application for data synchronization, file sharing, and remote storage of files.” … its worth noting that the official product on android [and probably AAPL appstore] is NOT free. the author should have pointed this out up front. its true that the host is free … but without decent clients its value is … diluted.

  7. Can I install “OWN CLOUD SERVER” on Centos 5.7 Vesrsion?? if it’s support please let me know the how can i installed OWNCLOUD SERVER on My Machine.

    • @Jamesh,
      No idea, whether it would work on CentOS 5.7, I think you should give a try..if any issues post here, we will love to help you out..

  8. when i followed ur instructions it came up with this error when i went to the webpage

    . * */ try { require_once ‘lib/base.php’; OC::handleRequest(); } catch (Exception $ex) { \OCP\Util::logException(‘index’, $ex); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); }

  9. Hi,

    I have complete installation of owncloud in my RHEL server.
    but when i open “https://localhost/owncloud” and (from IP add also) on the web browser it can bee show error “server not found”

    plyz help

    • Dear Yazir,
      To be true, I personally have no idea of installing it over Nginx. Why dont you install it and in case of any fix required our team will work to short it out with you.

  10. Do the below as root.

    # cd /var/www
    # ls -l

    check for any folder named owncloud. Notice foldername case. Remember linux is case sensitive. Point your browser to link/owncloud. Remember link/owncloud is not same as link/Owncloud.

    Best of Luck!

  11. I followed your instructions to the letter and when it comes to logging on in either localhost or via ip address I get 404 The requested URL /owncloud was not found on this server.

    And Apache/2.2.16 (Debian) Server at localhost Port 80.

    Owncloud is not running but I have no idea how to start the service.

    • Do the below as root.

      # cd /var/www
      # ls -l

      check for any folder named owncloud. Notice foldername case. Remember linux is case sensitive. Point your browser to link/owncloud. Remember link/owncloud is not same as link/Owncloud.

      Best of Luck!

  12. Thanks it was very good article. I followed the steps mentioned but after putting in localhost/owncloud instead of getting login page I get following


    * ownCloud
    * @author Frank Karlitschek
    * @copyright 2010 Frank Karlitschek [email protected]
    * This library is free software; you can redistribute it and/or
    * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
    * License as published by the Free Software Foundation; either
    * version 3 of the License, or any later version.
    * This library is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * You should have received a copy of the GNU Affero General Public
    * License along with this library. If not, see .

    Thanks in Advance

    • Seems you have not installed php.
      apt-get install php5-common libapache2-mod-php5 php5-cli (Debian/Ubuntu)

      Just yum the required package if you are using RedHat based Distro.

    • Hi There,
      It is a very good tool but I am agree with Sriram that we need to install excel plugin. We would like to use this instead of Google docs.

      Is it possible ?

      Thanks and Regard.

    • Ubuntu12.04. Below are the commands I ran while as root. You can use sudo to run them if you have not ‘su – root’. The apache site config I have put at note that you can only have one site running as ssh you cannot have multiple virtual sites and you need to change “” to be your domain. Then you need to setup your dns to “” to your server. Once you have all that you should be able to hit “” to get to owncloud. I then installed the yubikey app so that i can use the $20 one time crypto hardware token to login from anywhere which is going to be way more secure than using a password. Each of OSX desktop sync and iPhone work will with this install even using a self signed security cert. Enjoy.

      sh -c “echo ‘deb /’ >> /etc/apt/sources.list.d/owncloud.list”
      wget -O – | sudo apt-key add –
      apt-get update
      apt-get install owncloud
      cp /etc/apache2/sites-available/default /etc/apache2/sites-available/owncloud
      vi /etc/apache2/sites-available/owncloud
      # use file at
      a2enmod ssl
      a2ensite owncloud
      a2enmod rewrite
      service apache2 restart

  13. I keep getting the message you have tried to open ‘ application/x-httpd-php (1.1 KB)’ what should firefox do with this. What is missing from my setup


  14. I have given task to host owncloud on our company server and use it as company private storage, my questions are :

    – Does ownCloud have API’s that i can integrate with using other applications developed built in .Net, Android, iOS which will synch files?
    – Does ownCloud storage support MS SQL as storage ?

    Thanks and appreciate your answers.

  15. Hi Avishek Kumar,

    I installed owncloud 6 with centos 6.5 (final) and see this notice:

    “Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly.”

    So should I upgrade php from 5.3.3 to 5.3.8.

    Thanks in advance

  16. Seems pretty pointless to me. It doesnt seem to offer any advantages over using FTP over SSL, or SCP. Sure there is a nice GUI but thats all. To me a “cloud” solution should offer the capability to:
    – add storage by adding a slave node (server) to the system or another drive to such a node.
    – automatically handle redundancy/availability by replicating data across nodes/drives.

    I think these are features in the “object storage” aspects of openstack

  17. I followed your guide step by step. I now have a working owncloud. But I am afraid to let it out on the internet since I get a message when I log in as admin saying my .htaccess file is not working. How can I solve this problem? Thanks for a great website!

    • Dear User,

      Please post comment from your original name. By giving comment or feedback you are not committing a crime.

      Ok! Answer to Your Question: Yup! Data is going to be store on your Local Machine (Server).

  18. Personal storage? This is worth absolutely nothing if there is no encryption.

    There is a reason that we don’t use FTP and Telnet anymore.

  19. Hello guys,,

    my owncloud is working now .

    Here is the Compile options for php.

    ./configure \
    –prefix=/Site/web1.local/php \
    –with-mysql –with-apxs2=/Site/web1.local/Apache_install/bin/apxs \
    –with-config-file-path=/Site/web1.local/Apache_install/conf/extra \
    –with-pear \
    –with-zlib \
    –with-pdo-mysql=shared \
    –with-mysqli=shared \
    –with-mysql=shared \
    –with-zlib-dir=/usr/local/lib \
    –with-gd \
    –with-gd-dir=/usr/local/lib \
    –with-libdir=/usr/local/lib \
    –with-jpeg-dir=/usr/local/lib \
    –with-png-dir=/usr/local/lib \
    –with-freetype-dir=/usr \
    –enable-mbstring \
    –enable-xml \
    –enable-zip \

    and I did a find of the php.ini

    I found one in /etc/php.ini

    enable zlib there and voila everythings work and i have update it to 5.0.13
    I’m very happy…


    anyone having trouble can ask here…

    will try to help cheers.

  20. @David Armstrong

    How did you install mysql

    package or compiling

    do a
    #which mysqld
    if nothing appear

    find / -name mysqld

    if still nothing appear

    then do a yum -y install mysql-server mysql-client


    apt-get install mysql-server mysql-client

  21. When I type “mysql -u root -p” I get the following error:

    david@david-XFX-nForce-780i-3-Way-SLI:/var/www$ mysql -u root -p
    Enter password:
    ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
    david@david-XFX-nForce-780i-3-Way-SLI:/var/www$ sudo mysql -u root -p
    Enter password:
    ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

  22. Hi,

    I have correctly followed your steps but failed to execute this part.

    # nano /etc/apache2/sites-available/default [For Debian based Systems]

    There, find “AllowOverride None” and change this to “AllowOverride All” as shown.

    My default file is empty and I am not sure what should I put in there?

    Please help.

    • I’m running Ubuntu 13.10, and have the same problem as Ganesh. In /etc/apache2/sites-available there is a file called “000-default.conf” and “default-ssl.conf” but neither have a line “AllowOverride None”.

        • Hi Ravi,

          In which folder under /var/www/owncloud/ do I look for the .htaccess file?

          I am unable to find the file under /var/www/owncloud.



          • Done. No need to edit the .htaccess file under owncloud but need to edit the following file:

            sudo gedit /etc/apache2/sites-available/000-defaults.conf

            search for “Allowoveride” and change the parameter under /var/www parameter.

            That should do it

  23. Hi,

    Just a question, since this is a cloud topic, Do you know anything or do you do a tutorial in OPEN STACK?


    Ariel Chiong

  24. Hello was waiting for something like this thanks a lot.

    But i have a questions:

    I have compile my apache and my php on a fedora19

    I have this issue when starting ownloud.

    there are three module not install in php.

    and the two Z module

    any one know how to compile and install these three module.

    I did try a few way

    pear install gd when successful but didn’t work

    thanks if someone could or else i need to use this tutorials.

    cheers and beers

  25. It is a bad idea, from a security point of view, to set AllowOverride universally. What you should do is create a configuration file or section that applies only to the Owncloud directory, and enable AllowOverride there.

    A packaged OwnCloud is available for Fedora and works very well, though for the current stable Fedora releases, you will get OwnCloud 4.x not 5.x. If you’re OK with that, you can simply ‘yum install owncloud’ on your server, set up the database stuff, edit the owncloud config file with the database config, and you’re done.

    If you run GNOME 3.8 or later, you can configure your system as an OwnCloud client very easily from the Online Accounts tool in the GNOME Control Center: this will make the OC file share visible in the sidebar of all file operation dialogs and Nautilus, and configure your OC calendar and contacts in Evolution.


Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.