17 C
Texas
angeloma
Senior Writer and partner

How to install Owncloud on Ubuntu 20.04?

In this post, You will learn how to install Owncloud on Ubuntu 20.04.

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.

Install Owncloud on Ubuntu 20.04

1.- Install LAMP on Ubuntu 20.04

- Advertisement -

As we are going to install Owncloud server this requires a functional web server. In addition to a database manager such as MySQL / MariaDB or PostgreSQL.

So, in short, we are talking about LAMP. Check our post about it.

How to install LAMP on Ubuntu 20.04?

Also, you have to install the following packages for everything to work properly.

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-ssh2 php7.4-sqlite3 php7.4-xml php7.4-zip unzip

Now we can continue.

2.- Creating the new database for Owncloud

Owncloud as well as many applications require a database manager and therefore a database and it is time to create it.

On the other hand, it is also advisable to create a dedicated Owncloud user to avoid working with the root user.

So, open the MariaDB shell:

sudo mysql -u root -p

And it executes these commands to create the database, the new user, its password, and to assign him/her the corresponding permissions.

CREATE DATABASE ownclouddb;
GRANT ALL ON ownclouddb.* to 'ownclouduser'@'localhost' IDENTIFIED BY 'owncloudpss';
FLUSH PRIVILEGES;
exit;
1.- Preparing the database for Owncloud
1.- Preparing the database for Owncloud

You can change the database name, username, and password as you wish.

3.- Download Owncloud on Ubuntu 20.04

Now it’s time to download Owncloud. Go to your home folder and download from there:

cd /tmp/
wget -c https://download.owncloud.org/community/owncloud-complete-20200731.zip
--2020-10-16 14:15:19-- https://download.owncloud.org/community/owncloud-complete-20200731.zip
Resolving download.owncloud.org (download.owncloud.org)… 167.233.14.167, 2a01:4f8:1c1d:3d1::1
Connecting to download.owncloud.org (download.owncloud.org)|167.233.14.167|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 58267468 (56M) [application/zip]
Saving to: ‘owncloud-complete-20200731.zip’
owncloud-complete-20200731.zip 100%[=====================================================================================>] 55.57M 290KB/s in 2m 27s
2020-10-16 14:17:47 (388 KB/s) - ‘owncloud-complete-20200731.zip’ saved [58267468/58267468]

Then, decompress it using the unzip command.

unzip owncloud-complete-20200731.zip

The generated folder, you have move it to /var/www/html/

sudo mv owncloud /var/www/html/

Changes the owner of the folder to www-data and the permissions.

sudo chown -R www-data:www-data /var/www/html/owncloud
sudo chmod -R 755 /var/www/html/owncloud
2.- Configuring the server to install Owncloud on Ubuntu 20.04
2.- Configuring the server to install Owncloud on Ubuntu 20.04

Now create a new VirtualHost for owncloud:

sudo nano /etc/apache2/sites-available/owncloud.conf
<VirtualHost *:80>
     ServerAdmin admin@your_domain.com
     DocumentRoot /var/www/html/owncloud
     ServerName your-domain.com

    <Directory /var/www/html/owncloud>
         Options FollowSymlinks
         AllowOverride All
         Require all granted
     </Directory>

ErrorLog ${APACHE_LOG_DIR}/your-domain.com_error.log
CustomLog ${APACHE_LOG_DIR}/your-domain.com_access.log combined
</VirtualHost>
3.- Creating a new Virtualhost for Owncloud
3.- Creating a new Virtualhost for Owncloud

Change the value of ServerName to your own.

Now save the changes and close the text editor.

Enable the rewrite module and the new Virtualhost.

sudo a2ensite owncloud.conf
sudo a2enmod rewrite

And to apply the changes, restart Apache:

sudo systemctl restart apache2

Now we need to install it from the web interface.

4.- Install Owncloud on Ubuntu 20.04

Open your favorite web browser and go to http://your-server and you will see the first screen in Owncloud

4.- Owncloud main screen
4.- Owncloud main screen

On this screen, you have to set up the administrator user along with his password.

Below you have the Configure Database section, select MySQL / MariaDB, and write the parameters previously created.

Then, the installation will start. When finished, you will see the login screen.

5.- Owncloud login screen
5.- Owncloud login screen

Once you log in you will see the main screen of the application along with some test files.

6.- Owncloud main screen on Ubuntu 20.04
6.- Owncloud main screen on Ubuntu 20.04

So, enjoy it.

Conclusion

Due to many problems with the privacy of data is that many companies are choosing to create their servers with a lot of vital information. This means that the data is never in the hands of third parties and can be managed privately.

To make a project like this, you need an application as high as the Owncloud application that you have learned to install in Ubuntu 20.04.

So, share this post and join our Telegram channel and our Facebook page. Also, buy us a coffee 😉

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article