ownCloud is an open-source, self-hosted file sharing and collaboration platform that allows you to store, edit, and share data securely. It offers similar functionalities to popular cloud storage services like Google Drive and Dropbox, with the added benefit of you being able to host it on your own server. In this tutorial, we will guide you through the installation of ownCloud on Ubuntu Server Latest.
Before we begin, ensure the following prerequisites are met:
Log in as a sudo user and run the following command to update the system packages:
sudo apt update && sudo apt upgrade
ownCloud requires a web server to run. Apache is a popular web server that can be installed using the following command:
sudo apt install apache2 -y
Once Apache is installed, start the service and enable it to start on boot:
sudo systemctl start apache2
sudo systemctl enable apache2
ownCloud requires a database to store its data. MariaDB is a popular open-source database that can be installed on Ubuntu Server using the following command:
sudo apt install mariadb-server -y
Once MariaDB is installed, start the service and enable it to start on boot:
sudo systemctl start mariadb
sudo systemctl enable mariadb
During installation, you will be prompted to set a root password for the database server. Choose a strong password and keep it safe.
Run the following command to secure the MariaDB installation:
sudo mysql_secure_installation
ownCloud is built using PHP, which requires some extensions to be installed. Install PHP and the required extensions using the following command:
sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-json php-mbstring php-xml php-zip -y
After installation, verify the installed PHP version with the following command:
php -v
ownCloud can be downloaded using the following command:
cd /tmp && wget https://download.owncloud.org/community/owncloud-complete-20211011.tar.bz2
Extract the downloaded archive and move the extracted files to the /var/www/html/ directory:
tar -xvjf owncloud-complete-20211011.tar.bz2
sudo mv owncloud /var/www/html/
The ownership of the ownCloud files needs to be updated to the Apache user:
sudo chown -R www-data:www-data /var/www/html/owncloud
Create a new Apache configuration file for ownCloud:
sudo nano /etc/apache2/sites-available/owncloud.conf
Add the following content to the file:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/owncloud
<Directory /var/www/html/owncloud>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Save and close the file. Enable the new Apache configuration and restart the Apache service:
sudo a2ensite owncloud
sudo systemctl restart apache2
Now we will configure ownCloud through the web interface:
ownCloud may take a few minutes to set up.
After the setup is complete, you will be redirected to the ownCloud login page. Log in with the admin credentials that you created in Step 7. Once you have logged in, you can start using ownCloud to store, edit, and share your data securely.
In this tutorial, we have shown you how to install and set up ownCloud on Ubuntu Server Latest. With ownCloud, you can self-host a secure and private cloud storage and collaboration platform that offers similar functionalities to popular commercial cloud storage services.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!