How to install OwnCloud 10 server on Ubuntu

OwnCloud Ubuntu Logo

5OwnCloud is a Dropbox-like solution for self-hosted file sharing and syncing. Installing OwnCloud on Ubuntu is trivial. Whether you want to backup, have file-syncing or just have a Google Calendar alternative, this guide is for you.

What is OwnCloud? Is it like a “cloud”?

If you stumbled here by chance and don’t know what OwnCloud is, here is an article explaining its principal features and advantages/disadvantages. In this other article you can find OwnCloud new features. To tell you the truth, OwnCloud is a SaaS cloud, if you want to know more about cloud types you can read this article.

In this article we will cover the installation of the server (not the client).

Step 1: Add the repositories

Important
I take absolutely NO responsibility of what you do with your machine; use this tutorial as a guide and remember you can possibly cause data loss if you touch things carelessly.

The first step is to add the repositories to your Ubuntu installation. Although there are many packages available I suggest you to use the latest version of Ubuntu or an LTS version like Ubuntu 16.04 Xenial Xerus. You will need root access during this procedure. The following procedure will install apache as webserver. Input the commands one by one to avoid errors!

Ubuntu 16.04Ubuntu 16.10Ubuntu 17.04Future versions

Open a terminal and input the following commands:

Open a terminal and input the following commands:

Open a terminal and input the following commands:

For the foreseeable future OwnCloud will still be packaged for Ubuntu, so you just need to replace the VERSION with the future version (e.g. 19.10) in the following text and input the commands one by one:

These commands will add the repositories that contain the software and install it on your machine.

Step 2: Database selection

Now that you got the OwnCloud software, all that is left is to choose a database that will support the installation. You have three choices:

  • SQLite: is a single-file database. It is suggested only for small installations since it will slow OwnCloud down sensibly.
  • MariaDB/MySQL: are popular open source databases especially amongst web developers. It is the suggested choice.
  • PostgreSQL: a popular enterprise-class database. More complicated than MySQL/MariaDB.

Now, this choice won’t really alter the functionality of OwnCloud (except if you use SQLite), so pick whatever you know best. If you’re unsure pick MariaDB/MySQL.

SQLiteMySQL/MariaDBPostgreSQL

No additional steps are required if you choose SQLite.

Install the software:

MariaDB won’t ask to set a root password (none by default), this is insecure, change it! In order to change it run the mysql_secure_installation script and follow the steps.

Or if you prefer MySQL:

During the installation you will be prompted to choose a root password, pick a strong one.

Now you need to enter the database (you will be asked the password you just set):

Now that you are in create a database:

Now you need to create the user that will be used to connect to the database:

The last step is to grant the privileges to the new user:

When you’re done type Ctrl-D to exit.

Install the software:

Now you need to enter the database:

Now that you are in create a database:

Now you need to create the user that will be used to connect to the database:

The last step is to grant the privileges to the new user:

When you’re done type \q and press enter to exit.

Step 3: Install

Once you’re done with selecting the database, it’s time to install everything. Head to http://YOUR_IP_ADDRESS/owncloud/ and you will be facing the following screen:

OwnCloud 10 installation

OwnCloud 10 installation

Select an administrator username and password, then you can select the data folder, but if you don’t know what you’re doing it’s best if you leave it with the default value. Then click on “Storage & Database” to select the database you chose during step 2. Fill everything and if you’ve followed all the steps correctly you should be seeing the Files app:

OwnCloud 10 Files App

OwnCloud 10 Files App

Image courtesy of mark | marksei

The following two tabs change content below.
The IT guy with a little boredom look in his eyes, fond of computers since forever he now works as a freelancer in the IT and shares his experiences through this blog.

You may also like...