How to install Owncloud on Ubuntu 18.04?

Windows Articles

How to install Oracle Java 15 on Ubuntu 20.04 / 18.04?

Hello, friends. We know that Java is one of the most popular programming languages and now it's version 15. So in this...

How to run the Linux Tail command in Windows 10.

Hi! The title of this post may seem incongruous, but it's not. In fact, for some time Microsoft has approached positions with...

How to compress large videos in Windows 10

Hello, how are you? Multimedia resources are definitely used in any system. Indeed, we live in the age of technology. That's why...

How to get Google Opinion Rewards in any Country

Greetings! Google Opinion Rewards is a cool app, which will allow you to earn credit, to spend it on the Google Play...

How to change the hostname on Ubuntu?

This simple tutorial will teach you how to change the hostname on Ubuntu. The steps we will tell you here will work...
angeloma
angeloma
Senior Writer and partner

In this post, I will show you how to install Owncloud on Ubuntu 18.04.

It is becoming more and more common to read and hear about security breaches from companies that handle vital user information on the Internet, and this makes many people wonder whether it is so necessary to trust these giant companies.

Another important issue is that these large companies do not take the issue of privacy seriously and their handling of user files and information is at least questionable.

Therefore, many users and small businesses prefer to invest in infrastructure that allows them to have their private cloud. At the software level, owncloud is emerging as the most important solution in this matter.

OwnCloud is a software that allows us to create a private cloud with which you can synchronize files, calendars, contacts, notes and more using extensions. It’s free, open-source and has an application for Android, iOS and desktop clients for Linux, Windows and Mac OS X.

So, let us install it.

Owncloud on Ubuntu 18.04

1.- Install LAMP on Ubuntu 18.04

The first step is to install a LAMP server on Ubuntu 18.04. But don’t worry that we have an article with which you can do it without problems.

How to install LAMP on Ubuntu 18.04?

Then, you can continue with the rest of the steps.

2.- Install some PHP module and create the new database for Owncloud

Owncloud, in order to work properly, requires some extra PHP modules. So let’s install them first.

:~$ 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

After installing LAMP, it is possible that several have already been installed, but better to be sure.

After that, create a new user and database for Owncloud.

:~$ sudo mysql -u root -p
> CREATE DATABASE owncloud;
> GRANT ALL PRIVILEGES ON owncloud.* TO owncloud@localhost IDENTIFIED BY 'owncloud_password';
> FLUSH PRIVILEGES;
> exit;
1.- Creating a new database for Owncloud
1.- Creating a new database for Owncloud

Of course, you can modify the name of the database, the user name and the password for one that you prefer.

Now, we can start to install Owncloud.

3.- Install Owncloud on Ubuntu 18.04 (I)

We can choose two ways to install Owncloud. One is to download the package directly from the project website. But the other is easier and safer and is to do it from the Owncloud repositories.

To do this, first, you need to install a necessary package.

:~$ sudo apt-get install apt-transport-https

Then, we have to add the GPG key of the repository to be sure that the download and installation will be safe.

:~$ sudo wget -qO- https://download.owncloud.org/download/repositories/stable/Ubuntu_18.04/Release.key | sudo apt-key add -
OK

Now we can add the repository as such. The next command, you have to do it as the root user, so execute:

:~$ sudo -i

And then:

:~$ echo 'deb http://download.owncloud.org/download/repositories/10.3.2/general/Ubuntu_18.04/ /' > /etc/apt/sources.list.d/owncloud.list

Returns to a regular user:

:~# exit

All that’s left is to refresh the APT cache and install Owncloud.

:~$ sudo apt update && sudo apt install owncloud-files
2.- Install Owncloud on Ubuntu 18.04
2.- Install Owncloud on Ubuntu 18.04

Wait for the download to finish in installation.

For everything to go well, you must enable two Apache modules that are not by default.

:~$ sudo a2enmod rewrite
:~$ sudo a2enmod headers

And create a new configuration file for Owncloud.

:~$ sudo nano /etc/apache2/conf-available/owncloud.conf

And add the following content:

ServerName owncloud.osradar.test
Alias /owncloud "/var/www/owncloud/"

<Directory /owncloud "/var/www/html/owncloud">
  Options +FollowSymlinks
  AllowOverride All
  <IfModule mod_dav.c> 
      Dav off
  </IfModule>

 SetEnv HOME /var/www/owncloud
 SetEnv HTTP_HOME /var/www/owncloud
</Directory>
 
 

So, press CTRL + O to save the changes and CTRL + X to close the file.

3.- Configuring Apache to work with Owncloud
3.- Configuring Apache to work with Owncloud

Finally, enable the new configuration and restart Apache2.

:~$ sudo a2enconf owncloud
:~$ sudo systemctl reload apache2

Now we can complete the installation from the web browser.

4.- Install Owncloud on Ubuntu 18.04 (II)

Now, you can open your web browser and go to http://your-server/owncloud and you will see the following:

4.- Owncloud initial screen
4.- Owncloud initial screen

There, you will have to set up the administrator user account. Below on the “Storage & Database” section select MySQL / MariaDB and fill in the fields with the created MariaDB credentials.

5.- Owncloud database credentials
5.- Owncloud database credentials

Then, it will start the Owncloud installation and configuration on the server. Then you will see the Login screen where you will have to enter your credentials.

6.- Owncloud login page
6.- Owncloud login page

Then you’ll see this screen. This shows that everything is in order.

7.- Owncloud on Ubuntu 18.04
7.- Owncloud on Ubuntu 18.04

So, that is it.

Conclusion

Owncloud is quite useful to be able to have our own private cloud without depending on third parties. However, you have to know how to install it and thanks to this guide you know how to do it. All that’s left is for you to do it and get the most out of this tool.

More articles

2 COMMENTS

  1. Hi there, and thanks for the great and useful tutorial.
    Everything went well until after I enabled the new configuration and restarted Apache2.
    Now it shows the following error and I can’t get it to open localhost/ or localhost/owncloud/

    “AH00526: Syntax error on line 4 of /etc/apache2/conf-enabled/owncloud.conf:
    Multiple arguments not (yet) supported.
    Action ‘configtest’ failed.local”

    Any idea of what might be going on?
    Thanks!
    Ari

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install Oracle Java 15 on Ubuntu 20.04 / 18.04?

Hello, friends. We know that Java is one of the most popular programming languages and now it's version 15. So in this...

How to run the Linux Tail command in Windows 10.

Hi! The title of this post may seem incongruous, but it's not. In fact, for some time Microsoft has approached positions with...

How to compress large videos in Windows 10

Hello, how are you? Multimedia resources are definitely used in any system. Indeed, we live in the age of technology. That's why...

How to get Google Opinion Rewards in any Country

Greetings! Google Opinion Rewards is a cool app, which will allow you to earn credit, to spend it on the Google Play...

How to change the hostname on Ubuntu?

This simple tutorial will teach you how to change the hostname on Ubuntu. The steps we will tell you here will work...
x