Step-by-step guide for installation of OwnCloud on Ubuntu VPS Server

If one day you realize you need your own personal cloud storage, consider OwnCloud. This is an easy and useful application for cloud storage creation and management that reminds of Dropbox. The best part of it is that this application is free and open source. It allows creating cloud storage for backing up and syncing your assets in different devices including laptop, personal computer, Android and iOS tablets and phones. Besides, here you can create a private file hosting cloud.

This article will teach you to install OwnCloud on Ubuntu 15.04 VPS servers. This is a pretty simple process both on VPS servers, and even in the shared hosting. Following these steps you will manage to install the application without faults and mistakes.


For installation, you will need a VPS server that runs on Ubuntu 15.04. This time, we used a droplet from DigitalOcean (DO) that provides 512 MB of RAM and 20 GB storage. This service is an optimal choice that offers a lot of great features. You should know a bit of SSH, Putty and widespread UNIX commands. The last but not the least: installation will take some time, so be patient.

Step 1

Here it is, your brand new Ubuntu 15.04 VPS server. Login to get root access: if you use a droplet from DO, you should better change the default root password.

Step 2

Make sure that all packages and software are updated.

Step 3

Since OwnCloud is a web-based application, it needs a web server to work, so your next task is to install Apache. Do it by executing the following command:

– As we know that OwnCloud is a web-based application that requires web server to run, so now we have to install Apache. We can install Apache using the following command:

apt-get install apache2 –y

Changes will be displayed on the screen.

Step 4

When Apache installation is over, you need to install PHP5. Execute the following command for that:

apt-get install php5 php5-mysql –y

Step 5

For the application to run faultlessly, install all necessary PHP5 modules with the help of this command:

apt-get install php5-gd php5-json php5-curl php5-intl php5-mcrypt php5-imagick –y

Step 6

To process the data, your server will need a database. At the moment, OwnCloud supports only MySQL and MariaDB. To install the last one execute this command:

apt-get install mariadb-server –y

To set MariaDB up for the first time, type:


After pressing Enter you will need to type your password and answer some questions. Now generate a new password and keep it in mind – this will be your database password for user root access.

Step 7

Login to MariaDB through root access. You should create a new user and generate a new database. This can be easily done with the help of the following commands:

mysql -u root –p

Press Enter and execute the following command lines:

CREATE USER ‘newdbuser’@’localhost’ IDENTIFIED BY ‘newpassword’;


GRANT ALL ON ownclouddb.* TO ‘newdbuser’@’localhost’;


Now press Exit.

Create your own database username and type your own, new password instead of “newpassword” leaving no spaces between the symbols. Database name ownclouddb can also be replaced with your own name.

Step 8

As soon as Apache and MariaDB are installed, you can install OwnCloud in your system. To download it, go to the official website and open the page Click Download button, copy download link and select it. Go back to the Terminal and download it with the help of wget command:


Don’t forget to alter the download link and extract the package into Apache’s default online folder executing the following command:

tar -xvf owncloud-8.0.3.tar.bz2 -C /var/www/html/

Change the real package of OwnCloud in accordance with the downloaded version – this is crucial.

Step 9

Now you need to specify directory permission with the help of the following command:

chown www-data:www-data -R /var/www/html/owncloud/

Step 10

Now you need to create either virtual hosts file, or a new Apache configuration for it to work with OwnCloud. First, generate a new configuration file for your website. After typing it, Enter the name and press Enter. Save the changes and exit. For log file storage, you should create a new directory. Enter this command:

mkdir -p /var/www/

Step 11

Now it’s time to restart the Apache and enable the new virtual host file with “service apache2 reload” command.

Step 12

Now it’s time to set up OwnCloud. Launch any browser and then get access to your new OwnCloud website. You will open the setup page there, specify some features and finish the setup process. Pay attention to the following:

  1. Create an admin account. Just make the data folder and specify MariaDB details that you used before.
  2. Configure the Database and click finish setup button.

Now OwnCloud has been installed on your system and you can start synchronizing files and folders from your multiple devices with the help of OwnCloud client application. Note that there can be several users: you may connect your friends, family members, or even sale your cloud storage service.