2 Ways To Install NextCloud on Ubuntu 18.04 LTS / Ubuntu 17.10

0

NextCloud is an open source file synchronization and sharing solution, the fork of ownCloud. It is like a Google Drive / Dropbox that permits you to store and share your documents, pictures, and videos in a centralized location.

READ: How To Integrate Google Drive on Ubuntu 18.04 LTS

READ: How To Install Dropbox on Ubuntu 18.04 LTS

System Requirements

Nextcloud works on top of LAMP stack,

Linux: Ubuntu (18.04 & 16.04), Redhat Enterprise Linux 7/6, CentOS 6 / 7, Debian 9.

READ: How to NextCloud on Ubuntu 16.04 / Debian 9

READ: How to Install Nextcloud on CentOS 7/6 & / RHEL 7/6

Apache 2.4 with mod_php

Database: MariaDB or MySQL, PostgreSQL 9 / 10, Oracle 11g.

PHP 5.4+

NextCloud Enterprise is also available with full enterprise support, including phone and email access to Nextcloud developers.

Features

  • Access your files anywhere.
  • Share your files with the others and protect the public links with a password.
  • Supports Two-factor authentication
  • Tracking changes to your files.
  • Access files stored in external cloud storage service providers such as Amazon, Google, and Dropbox.

More here.

Install NextCloud on Ubuntu 18.04 / Ubuntu 17.10

You can install Nextcloud on Ubuntu using Snap or LAMP stack.

Method 1: Install Nextcloud using snap

You can easily install Nextcloud using the Snap command.

sudo snap install nextcloud

The Nextcloud installation may take few minutes to complete. Verify the Nextcloud installation using the below command.

sudo snap list nextcloud

Output:

Name       Version      Rev   Tracking  Developer  Notes
nextcloud  13.0.2snap1  6916  stable    nextcloud  -

Setup Nextcloud

Open a browser and navigate it to Nextcloud URL.

http://your-ip-addr-ess/

Create an admin account then click Finish setup.

Install NextCloud on Ubuntu 18.04 using Snap - Nextcloud Setup
Install NextCloud on Ubuntu 18.04 using Snap – Nextcloud Setup

You will now get the home page of Nextcloud where you can upload or download your documents.

Install NextCloud on Ubuntu 18.04 using Snap - Nextcloud Apps
Install NextCloud on Ubuntu 18.04 using Snap – Nextcloud Apps
Install NextCloud on Ubuntu 18.04 using Snap - Nextcloud Portal
Install NextCloud on Ubuntu 18.04 using Snap – Nextcloud Portal

Method 2: Install Nextcloud using LAMP stack

Prerequisites

We will install the necessary PHP extension for NextCloud.

sudo apt update
sudo apt install -y php-gd php-json php-mysql php-curl php-mbstring php-intl php-imagick php-xml php-zip php-sqlite3

Now, we will install Apache web server and MariaDB server for Nextcloud.

sudo apt install -y apache2 mariadb-server libapache2-mod-php

Apache Modules (Must):

You need to enable few modules to get NextCloud work properly.

sudo a2enmod rewrite

You can also enable additional Apache modules.

sudo a2enmod headers
sudo a2enmod dir
sudo a2enmod env
sudo a2enmod mime

Restart the Apache service.

sudo systemctl restart apache2

Download Nextcloud

NextCloud offers you the zipped archives for server admin’s to download and manually set it up on top of a LAMP stack.

cd /tmp/
wget https://download.nextcloud.com/server/releases/latest.tar.bz2
tar -jxvf latest.tar.bz2
sudo mv nextcloud /var/www/html/
sudo mkdir /var/www/html/nextcloud/data

Update the ownership of files inside the NextCloud root directory so that web server can write data into it.

sudo chown -R www-data:www-data /var/www/html/nextcloud/

Create MySQL Database

If you are setting up a MariaDB server for the first time, then

READ: How To Secure MySQL Server with mysql_secure_installation

Ensure MariaDB server service is running.

Log in to MariaDB server using the root user to create a database.

You do not need to enter the root password when you execute the mysql with sudo, and just press enter when MariaDB prompts for the root password.
sudo mysql -u root -p

Create a database called “nextclouddb

create database nextclouddb;

Grant “nextclouduser” to access the “nextclouddb” database on localhost with a password “password“.

grant all on nextclouddb.* to 'nextclouduser'@'localhost' identified by 'password';

Exit from the MariaDB prompt.

quit

Setup NextCloud

Open a web browser and navigate to it Nextcloud setup.

http://your-ip-addr-ess/nextcloud

Fill up the setup page with admin information for creating an admin account and the location of the data folder.

You can choose either SQLite or MySQL. If you decided to use SQLite database, then you do not have to enter database details. Using SQLite server in a production environment is not recommended, so, we will use MariaDB here.

Enter the database details in the below page.

Install NextCloud on Ubuntu 18.04 using LAMP Stack - Nextcloud Setup
Install NextCloud on Ubuntu 18.04 using LAMP Stack – Nextcloud Setup

Alternately, you can download the NextCloud clients available for Desktop, Android, and iOS to sync documents across your devices.

Install NextCloud on Ubuntu 18.04 using LAMP Stack - Nextcloud Apps

Install NextCloud on Ubuntu 18.04 using LAMP Stack – Nextcloud AppsOn the home page of NextCloud. Clicking “+ sign” button and then Upload to begin uploading the files.

Install NextCloud on Ubuntu 18.04 using LAMP Stack - Nextcloud Portal
Install NextCloud on Ubuntu 18.04 using LAMP Stack – Nextcloud Portal

That’s All.

Further Reading

You might also like

2 Ways To Install NextCloud on Ubuntu 18.04 LTS / Ubuntu 17.10

0