Installing OwnCloud on Ubuntu 22.04 LTS


OwnCloud is an open-source file hosting and synchronization platform that allows users to store and share files, documents, photos, and other digital content in a secure way. It was first released in 2010 and is built using PHP and JavaScript.


You must following things to complete this tutorial.

  • Ubutnu 22.04 LTS up and running.
  • Root permission.
  • Basic knowledge of linux commands.
  • Internet connecvity.

In this post, We will show you how to install OwnCloud on ubuntu 22.04 LTS along with LAMP Stack.

Step 1: Run System Updates

The following command is required to upgrade the installed packages and update the Ubuntu repository.

sudo apt-get update && sudo apt-get upgrade -y

Step 2: Step 2: Installing Apache2 Web Server

Use of the following command to install the Apache2 packages.

sudo apt-get install -y apache2

Step 4: Installing PHP

Since OwnCloud does not support PHP 8.x, we are installing PHP7.4 through the Ondrej PPA repo in this article because the default standard repository for Ubuntu 22.04 only supports PHP 8.x.

To add PHP 7.4 repository.

 sudo add-apt-repository ppa:ondrej/php

To update the ubuntu repository.

sudo apt-get update

To install PHP and their modules.

sudo apt-get install -y php7.4 php7.4-{opcache,gd,curl,mysqlnd,intl,json,ldap,mbstring,mysqlnd,xml,zip}

 Step 5: Installing MariaDB

The following command can be used to set up the MariaDB database server:

To install MariaDB server.

sudo apt-get install -y mariadb-server

To check MariaDB service status.

sudo systemctl status mariadb.service

To login in MariaDB Database shell.

sudo mysql

To create OwnCloud’s Database and their user creds.

To create database.


To give permission with user.

GRANT ALL ON owncloud.* TO 'owncloud_user'@'localhost' IDENTIFIED BY 'mypassword';

To refresh the newly create user’s permision.


To exit form MariaDB’s shell.


Step 6: Downloading OwnCloud

We must use the following commands to download the OwnCloud file from the server.

To download the owncloud zip file.

cd /tmp/
 && wget

To install unzip.

sudo apt-get install unzip -y

To unzip the owncloud zip file.

sudo unzip owncloud-* -d /var/www/html/

To update the file permission.

sudo chown -R www-data:www-data /var/www/html && sudo chmod -R 755 /var/www/html/ 

To restart apache service.

sudo systemctl restart apache2

Step 7: Accessing OwnCloud Portal

We are now prepared to generate a new database password and username in order to access the OwnCloud web panel.

http://ip_address/owncloud/index.php or at http://localhost/owncloud/index.php

If everything is okay So then we should get the web page like this.

After that you ought to asked to login in OwnCloud web board, Utilize your username and secret phrase to login OwnCloud board.

You will receive your first OwnCloud webpage for the desktop, iOS, and Android apps, as well as the OwnCloud Android app.


We have successfully installed and setup the ownCloud service using the LAMP stack on Ubuntu. If you have any questions or issues, please leave a comment below.

Installing OwnCloud on Ubuntu 22.04 LTS

Leave a Reply

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

Scroll to top