How to Install ownCloud on Elementary OS Latest

OwnCloud is a free and open-source cloud storage solution that allows you to store and sync your files, contacts, calendars, and more. In this tutorial, we will guide you through the process of installing ownCloud on Elementary OS Latest.

Step 1: Update the system

Before installing any new software, it is always a good idea to update the system to ensure that all packages and dependencies are up to date.

Open the terminal and run the following command:

sudo apt update && sudo apt upgrade

Step 2: Install LAMP stack

OwnCloud requires a LAMP stack to run, which stands for Linux, Apache, MySQL, and PHP. Execute the following command in the terminal to install the LAMP stack:

sudo apt install apache2 mariadb-server mariadb-client php libapache2-mod-php php-mysql php-curl php-gd php-imagick php-mbstring php-json php-xml php-zip

During the installation, you will be prompted to set a root password for the MariaDB database server. Choose a secure password and keep this information safe.

Step 3: Configure the MariaDB database server

After installing the LAMP stack, you need to configure the MariaDB database server specifically. Follow these steps:

  1. Open the terminal and enter the following command to enter the MySQL shell:
sudo mysql -u root -p
  1. Enter the root password that you set during installation when prompted.

  2. Create a new database for ownCloud:

CREATE DATABASE owncloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
  1. Create a new user and grant privileges to the ownCloud database:
CREATE USER 'ownclouduser'@'localhost' IDENTIFIED BY 'your-strong-password';
GRANT ALL ON owncloud.* TO 'ownclouduser'@'localhost';
FLUSH PRIVILEGES;

Remember to replace 'your-strong-password' with your own password.

  1. Exit the MySQL shell:
EXIT;

Step 4: Download and install ownCloud

  1. Download the latest version of ownCloud from their official website: https://owncloud.org/download/. Choose the ZIP file.

  2. Extract the content of the ZIP file to the Apache web directory:

sudo unzip owncloud-x.y.z.zip -d /var/www/html/

Remember to replace 'x.y.z' with the actual version number.

  1. Change the file owner and group of the ownCloud directory to the Apache user:
sudo chown -R www-data:www-data /var/www/html/owncloud/

This command ensures that the files inside the ownCloud directory are owned by the user 'www-data', which is the Apache user.

  1. Set the correct permissions for the ownCloud directory:
sudo chmod 750 /var/www/html/owncloud/
  1. Enable the Apache rewrite module:
sudo a2enmod rewrite

Step 5: Configure Apache for ownCloud

  1. Create a new Apache configuration file for ownCloud:
sudo nano /etc/apache2/sites-available/owncloud.conf
  1. Add the following lines to the file:
Alias /owncloud "/var/www/html/owncloud/"
<Directory /var/www/html/owncloud/>
  Options +FollowSymlinks
  AllowOverride All
  Require all granted
 <IfModule mod_dav.c>
  Dav off
 </IfModule>
 SetEnv HOME /var/www/html/owncloud
 SetEnv HTTP_HOME /var/www/html/owncloud
</Directory>
  1. Save and exit the file.

  2. Enable the new Apache configuration file:

sudo a2ensite owncloud.conf
  1. Restart Apache for the changes to take effect:
sudo systemctl restart apache2

Step 6: Access ownCloud

  1. Open a web browser and navigate to: http://localhost/owncloud/

  2. Follow the on-screen instructions to complete the ownCloud installation process.

  3. Enter the database connection information that we configured in Step 3 when prompted:

Database user: ownclouduser
Database password: your-strong-password
Database name: owncloud
Database host: localhost
Table prefix: (leave blank)
  1. Set up an administrator account with a username and password.

  2. Once the installation is complete, you can log in to ownCloud to start using it.

Congratulations, you have successfully installed ownCloud on Elementary OS Latest!

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!