How To Install and Configure Owncloud On Ubuntu 20.04 / 19.10

We can install and configure the Owncloud on ubuntu 20.04 /18.04 using the package from the official website. Let’s see, how to install Owncloud on ubuntu.

Owncloud is a suite of client-server software for creating and using file hosting services. you can upload your files and make it your own private cloud. This is open-source software. 

Note: The Current Owncloud version doesn’t support PHP 7.4 and you need to have PHP 7.2 on Ubuntu.

Check Out How To Install Apache SVN Server On Ubuntu 20.04

How To Install and Configure Owncloud On Ubuntu 20.04 / 19.10

We will have to LEMP stack setup on Ubuntu 20.04 for Owncloud. Use the following commands to install the Apache and PHP on Ubuntu. 

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

If you’re using ubuntu 20.04, the PHP version would be 7.4. you can check using the php -v command. 

ubuntu@ubuntu:~/Desktop$ php -v
PHP 7.4.3 (cli) (built: May 26 2020 12:24:22) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

Start and enable the apache service. 

sudo systemctl start apache2 
sudo systemctl enable apache2 

Check Out How To Install Robo 3T MongoDB GUI Power On Ubuntu 20.04

Install the MySQL Server:

We need the database server to store the data of Owncloud. I will install MySQL on ubuntu. 

sudo apt install mysql-server

We need to start and enable the service using the following command. 

sudo systemctl start mysql
sudo systemctl enable mysql

Create the user and grant all permissions on the database. 

mysql> create database owncloud;
Query OK, 1 row affected (0.01 sec)

mysql> create user 'owncloud'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.02 sec)

mysql> GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

We’ve successfully setup the LEMP stack and now we need to configure Apache for Owncloud.  

Check Out How To Install and Use Wireshark On Ubuntu Linux

Configure Apache With Owncloud;

Download the Owncloud using the below command and you can also download it from the official website.

sudo wget

Unzip the package, set the permissions, and change the owner using the below command. 

sudo unzip -d /var/www/html/
sudo chown -R www-data:www-data /var/www/html/owncloud/
sudo chown -R 755 /var/www/html/owncloud/

Once you have applied for the permission. you need to configure a virtual host for Owncloud. Create a file using the below command.

sudo vim /etc/apache2/conf-available/owncloud.conf

Add these lines in the file and save it.

<IfModule mod_alias.c>
Alias /owncloud /var/www/html/owncloud
<Directory “/var/www/html/owncloud”>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all

Restart the apache server and access the Owncloud from the browser using the http://yourip/owncloud

You can connect to the MySQL server by putting the database settings here and click on “Finish Setup“. if you don’t want to connect with MySQL, you can go with the default database SQLite.

ubuntu install owncloud

Once you have created an admin username and password. you just need to log in to the Download.

owncloud ubuntu 20.04

We’ve successfully installed the Owncloud on the Ubuntu machine. In a similar way, you can install it on any other Linux distro. you can have Owncloud install on Ubuntu 18.04.

That’s it.

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment