owncloud setup

In the current world of increased data requirements, cloud storage is like a blessing. That’s the reason Onedrive, Mega, Google cloud are successful ventures. But there are people who do not prefer using them, the reason could be anything whether it be they don’t want a third party to have their data or they don’t want to pay and many more reasons. So, the answer is to use your own cloud. Owncloud is the market-leading open-source software for cloud-based collaboration platforms. As an alternative to Dropbox, OneDrive, and Google Drive. There are multiple write-ups and blogs out there. We are not bashing them but at some point, the information gets a bit messy for a newcomer or even incomplete. In this part, we will be taking look at 2 ways of owncloud configuration on our Linux OS (we are using Ubuntu).

Method 1: (using Docker)

To see how to configure Docker Visit here.


Once you Docker successfully installed on your system Signup on to Docker’s website.

To login from your system use:

owncloud on docker 1

To search docker for owncloud type:

owncloud on docker 2

It will return you a complete list like this:

owncloud on docker 3

Select the desired image and use the following command to pull the image.

owncloud on docker 4

The above process will automatically configure Owncloud on your system.

To run owncloud Use

owncloud on docker 5

So, this is the simplest way to configure owncloud pretty basic, straightforward, and self-explanatory.

Now let’s move onto a little difficult one and configuring everything manually in case this way doesn’t work or you don’t want to use Docker’s virtual environment.

Method 2: (Using apache2 server)

So, obviously the first task is to install apache server on our system. If you have apache2 already configured you can skip this step.

Use the following command to install apache 2.

owncloud installation 1

Once apache is installed run the following command to disable directory listing and also restart the apache service.

owncloud installation 2

Now we have to install the MariaDb server. MariaDB is used because it is fast, scalable and robust, with a rich ecosystem of storage engines, plugins, and many other tools make it very versatile for a wide variety of use cases.

owncloud installation 3

After successful installation, restart the MariaDb and enable it after system startup. Also install the required packages.

owncloud installation 4

Now once the MariaDb is complete then we need to install PHP and it’s modules2.

We start by adding a third-party repository and then update.

owncloud installation 5
owncloud installation 6

Now this part is a bit tricky and you may face compatibility issues and you may get a screen like this.

owncloud installation 7

To install PHP and it’s modules use the following command.

owncloud installation 8

If while running you get Compatibility issue as you saw above then “just change the PHP version in the command with the compatible version. Run the command and once done simply restart the apache2 service and it will work like a charm”.

Now after installation of PHP open FPM PHP default file by

owncloud installation 9

And check whether the following fields are on or not. While by default they are set to on.

owncloud installation 10

Now the next step is creating the database and a user and granting full access to the user.

  1. Run the MySQL command to logon to the database server. In the next prompt, type the root password.
  2. Create a database called Owncloud.
  3. Create a  database user “your user” with the new password e.g 123(you Should put the strong password for security purposes).
  4. Then, we grant the user full access to the database.
  5. Finally, save your changes and exit.
owncloud installation 11

NOTE: Database commands should end by semicolon sign “;”.

Now download latest owncloud release visit here.

And then extract it to var/www/HTML directory (you localhost directory).

Example commands, do not forget to change the version accordingly.

owncloud installation 12
owncloud installation 13

Move to the HTML directory and then take ownership and provide privileges.

owncloud installation 14

Now the final step is to edit the owncloud’s configuration file. This will control how users will access owncloud data. So create a .conf file by using

owncloud installation 15

Then copy-paste the content below to that file.

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/html/owncloud/
     ServerName yourdomain.com
     ServerAlias yourdomain.com
     Alias /owncloud "/var/www/html/owncloud/"
     <Directory /var/www/html/owncloud/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
          <IfModule mod_dav.c>
            Dav off
        SetEnv HOME /var/www/html/owncloud
        SetEnv HTTP_HOME /var/www/html/owncloud
     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

Replace Server name and Server alias with your own domain name and directory root location and then save the file.

owncloud installation 16

Now the final step is Enabling the owncloud and rewrite module and then restart the apache service.

owncloud installation 17

Open your browser visit localhost/owncloud you will be greeted by the owncloud default screen which will look like:

owncloud installation 18

Now create your USERNAME and PASSWORD.

And you DATABASE USER and PASSWORD and start using your own cloud.

Leave a Reply

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