Install and Configure ownCloud on Ubuntu 16.04
Updated by Angel Guarisma Written by Angel Guarisma
OwnCloud is an open-source, cloud-based, file hosting service you can install on your Linode. OwnCloud offers a quick installation process, works out of the box, and has an extensive library of plugins available. Its cross-platform compatibility means you can access your files from most major operating systems, browsers, and mobile devices.
Before You Begin
Familiarize yourself with our Getting Started guide and complete the steps for setting your Linode’s hostname and timezone.
This guide will use
sudowherever possible. Complete the sections of our Securing Your Server guide to create a standard user account, harden SSH access and remove unnecessary network services.
Update your system:
sudo apt update && sudo apt upgrade
Add the repository key to apt, and install ownCloud:
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 sh -c "echo 'deb http://download.owncloud.org/download/repositories/9.1/Ubuntu_16.04/ /' > /etc/apt/sources.list.d/owncloud.list" sudo apt update sudo apt install owncloud
Log in to your MySQL database, and enter your root password:
mysql -u root -p
Create a new database for ownCloud, and replace
strong_passwordwith a new, secure password:
CREATE DATABASE ownCloud; CREATE USER ownCloud@localhost; SET PASSWORD FOR 'ownCloud'@'localhost' = PASSWORD('strong_password');
Assign the new user to the database:
GRANT ALL PRIVILEGES ON ownCloud.* to ownCloud@localhost; FLUSH PRIVILEGES; exit
Log into MySQL as the newly created user:
mysql -u ownCloud -p
You can check the current user in MySQL using the
Which will display something similar to:
+--------------------+ | current_user() | +--------------------+ | ownCloud@localhost | +--------------------+ 1 row in set (0.00 sec)
Create an Administrator Account
After ownCloud is installed and MySQL is configured, point your browser to
ip_address_or_domainis your IP or FQDN) and create an administrator account:
Click Storage & database and enter the database login information:
Welcome to ownCloud:
Install ClamAV and Configure ownCloud
Install ClamAV, an open source antivirus engine which works with ownCloud’s antivirus plugin:
sudo apt install clamav clamav-daemon
clamavpackage starts a daemon on your system.
Enable the antivirus app in ownCloud. Select Apps from the menu, then Not enabled to find “Antivirus App for files” and click Enable:
Configure the antivirus mode in ownCloud to reflect the changes to your system:
To add new users and groups, select Users in the dropdown menu in the upper right-hand corner:
Secure the System
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This guide is published under a CC BY-ND 4.0 license.