Did You Know?

How Can We Help?

Special Offer

Deploy your Cloud Server now and get $100 in Free Credits!

Get Started

How to install OwnCloud on Ubuntu server

Table of Content
How to install OwnCloud on Ubuntu server
How to install OwnCloud on Ubuntu server

In this article, we will learn how to install OwnCloud on Ubuntu server. OwnCloud is a major open-source file sharing and cloud collaboration tool whose services and features are similar to those given by DropBox and Google Drive. However, unlike Dropbox, OwnCloud does not have the datacenter capacity to store hosted files. Nevertheless, you can still share things such as papers, photos, and videos to name a few, and view them across multiple devices such as smartphones, tablets, and PCs.


  • Any normal user with SUDO privileges or super user
  • LAMP installed on server. If you have installed LAMP, you can follow the below steps of this separate and detailed guide

Steps to install OwnCloud on Ubuntu

Step 1: Before you start, use the following apt command to update the system files and sources.

# apt-get update && apt-get upgrade -y

1- Install Php7.4 and Apache 2 modules

Step 2: OwnCloud is built on PHP and is typically accessed via a web interface. For this reason, we are going to install the Apache webserver to serve Owncloud files as well as PHP 7.2 and additional PHP modules necessary for OwnCloud to function smoothly.

#  apt install apache2 libapache2-mod-php7.4 openssl php-imagick php7.4-common php7.4-curl php7.4-gd php7.4-imap php7.4-intl php7.4-json php7.4-ldap php7.4-mbstring php7.4-mysql php7.4-pgsql php-smbclient php-ssh2 php7.4-sqlite3 php7.4-xml php7.4-zip

If you are facing any issue which states that php7.4 packages not found. In this case, you can follow this guide to install php7.4 on your machine as well. Note that, owncloud do not run on PHP greater than 8.0 version.

Step 3: Now, start and enable Apache service to run on boot, run the commands.

# systemctl enable --now apache2

Step 4: And now, check the PHP installed version on your machine

# php -v

2. Install MySQL server on your Ubuntu

Step 5: Install MySQL on your machine.

# apt-get install mysql-server -y

Step 6: And, now start and enable you mysql services and make sure to configure it as well.

# systemctl enable --now mysql

Step 6.1: Change the identification method of user root, this is important to do the mysql_secure_installation

# mysql
mysql> alter user 'root'@'localhost' identified with 'mysql_native_password';j
mysql> exit;
Change the identification of user root
Change the identification of user root

Step 7: Now setup your mysql service.

# mysql_secure_installation
Installation of mysql
Installation of mysql

3- Configure OwnCloud database

Step 8: Now that you've armed the applications, it's time to set up the ownCloud database and user. The tasks in this part are run from the MySQL shell.

# mysql -u root -p

mysql>  CREATE DATABASE DBowncloud;
mysql>  CREATE user 'Userowncloud'@'localhost' identified by 'password';
mysql>  GRANT ALL ON 'DBowncloud.* TO 'USERowncloud'@'localhost';
mysql>  EXIT;

4- Download the OwnCloud source code.

Step 9: The setup is ready for ownCloud at this point. Check the ownCloud files page to make sure you're getting the most current version of the software before you actually download it.

You can visit this link and choose you desired version of OwnCloud.At the time this guide was written, version 10.10.0 was the most recent. Put the version you want to download in place of 10.10.0.

# wget https://download.owncloud.com/server/stable/owncloud-10.10.0.zip
Downloading of OwnCloud
Downloading of OwnCloud

Step 10: Unzip the latest package using the below link.

# unzip owncloud-10.10.0.zip

Step 11: Move the content of this folder to the DocumentRoot path, specified in your virutal host's entry.

# mv owncloud/* /var/www/html

Step 12: Turn on the Apache modules rewrite, mime, and unique_id:

# a2enmod rewrite mime unique_id 

Step 13: Restart your apache2 service, mysql and php fpm services and go to browser to check your Owncloud installation on your server

# systemctl restart apache2 mysql php7.4-fpm

http://server_ip     # Search your server ip on your browser
Owncloud install on Ubuntu  |Owncloud installed on Ubuntu |
Owncloud install on Ubuntu

And this is how you have learnt how to install OwnCloud on Ubuntu server

Special Offer

Deploy your Cloud Server now and get $100 in Free Credits!

Get Started
Table of Contents