In today’s tutorial, we will explain how to install ownCloud 9.0 on a fresh Ubuntu 16.04 LTS installation. ownCloud is a self-hosted, open source, file sync and share app platform written in PHP. With ownCloud you can sync and access your files through a web interface, create contacts, calendars and bookmarks, easily share your data across devices, preview and edit your text files, documents and images and much more. It’s a great alternative to Dropbox, Google Drive and similar file-sharing services.
Log in to your server as root
ssh user@vps_IP
and make sure that all packages are up to date:
sudo apt update && sudo apt -y upgrade
Add ownCloud Repository
We will install the owncloud
package from the official ownCloud repository. owncloud
is a meta package which will install multiple packages including apache2, PHP 7.0 and all necessary PHP modules, basically you will get a complete installation with all dependencies.
Run the following commands to add the ownCloud repository PGP key to your system:
sudo wget -nv https://download.owncloud.org/download/repositories/9.1/Ubuntu_16.04/Release.key -O Release.key sudo apt-key add - < Release.key sudo rm -f Release.key
Add the ownCloud repository to your system using the following command:
echo 'deb http://download.owncloud.org/download/repositories/9.1/Ubuntu_16.04/ /' | sudo tee --append /etc/apt/sources.list.d/owncloud.list > /dev/null
Install ownCloud
The ownCloud installation is pretty straightforward, once the repository is added update the apt package index, install the owncloud
package:
sudo apt update sudo apt install owncloud
You can choose between SQLite, MYSQL/MariaDB and PostgreSQL. SQLite is the default database but it is not recommended for production, MariaDB which we will be using in this tutorial is the ownCloud recommended database.
Install the MariaDB package using the following command:
sudo apt-get install mariadb-server
When the installation is complete, run the following command to secure your installation:
mysql_secure_installation
Next, we need to create a database for our ownCloud installation.
mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE owncloud; MariaDB [(none)]> GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'my_strong_password'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> \q
To access the graphical ownCloud 9 installation wizard open the following URL in your browser http://your_ip_address/owncloud
, enter the admin account username and password, select ‘MySQL/MariaDB’ and enter the database name, database user and password. Finally, click on the “Finish setup” button located on the bottom of the page.
That’s it. You have successfully installed ownCloud version 9 on your Ubuntu VPS.
For more information about how to manage your ownCloud installation, please refer to the ownCloud documentation.
Of course, you don’t have to do any of this if you use one of our Software Installation Services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.