Categories: Ubuntu 18.04

How to Install Nextcloud on Ubuntu 16.04 (Xenial)

Nextcloud provides data access using web interface. It also provides options to sync and share across devices—all under your control. This tutorial will help you to install Nextcloud on Ubuntu 16.04 LTS Xenial Linux operating system.

Step 1 – Prerequsites

The first of all, to set up Nextcloud you must have running LAMP server on your Ubuntu 18.04 LTS Bionic system. If you already have running LAMP stack skip this step else use the following commands to install it.

Install PHP

Let’s start with the installation of PHP version 5.6 or higher version on your Ubuntu 16.04 LTS Xenial systems.

wget

Sponsored
-q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add - sudo echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list
sudo apt-get update
sudo apt-get install -y php php-gd php-curl php-zip php-xml php-mbstring

Install Apache2

sudo apt-get install -y apache2 libapache2-mod-php

Install MySQL

sudo apt-get install -y mysql-server php-mysql

Step 2 – Download Nextcloud Archive

After successfully configuring lamp server on your system, Let’s download latest Nextcloud from its official website.

cd /tmp
wget //download.nextcloud.com/server/releases/nextcloud-13.0.5.zip

Now extract downloaded archive under website document root and set up appropriate permissions on files and directories.

cd /var/www/html
sudo unzip /tmp/nextcloud-13.0.5.zip
sudo chown -R www-data:www-data nextcloud
sudo chmod -R 755 nextcloud

Now, remove the archive file.

sudo rm -f /tmp/nextcloud-13.0.5.zip

Step 3 – Create MySQL Database

After extracting code, let’s create a MySQL database and user account for configuring Nextcloud. Use following set of command to login to MySQL server and create database and user.

mysql -u root -p
Enter password:

mysql> CREATE DATABASE nextcloud;
mysql> GRANT ALL ON nextcloud.* to 'nextcloud'@'localhost' IDENTIFIED BY '_Pa$$w0rd_';
mysql> FLUSH PRIVILEGES;
mysql> quit

Step 4 – Run Nextcloud Web Installer

Access the Nextcloud directory in the web browser as below. Change localhost to your server IP address or domain name.

 http://localhost/nextcloud/

Enter new admin credentials to create an admin account and provide the location of the data folder.

Sponsored

Now slide your page down and input the database credentials and click on Finish Setup.

After completing setup you will get admin dashboard. Where you can create a user, groups, assigned them permissions etc.

Congratulations, You have a working Nextcloud instance on your Ubuntu 16.04 LTS Xenial system.

The post How to Install Nextcloud on Ubuntu 16.04 (Xenial) appeared first on TecAdmin.

Go to Source
Author: Rahul

Ubuntu Server Admin

Recent Posts

VirtualBox 7.2.2 Fixed TPM 2.0 Emulation & KVM Conflict

Oracle VirtualBox, announced the first maintenance update for the 7.2 release series few days ago.…

1 day ago

Firefox 143.0 is out with Microsoft Copilot AI Integration

Firefox 143.0, the new monthly release of the popular free open-source web browser, is available…

1 day ago

VLC 3.0.22 Adds Qt6 & AMD AI Frame Interpolation Support [Ubuntu PPA]

VLC, the popular free open-source media player, rolled out the new 3.0.22 version few days…

1 day ago

Dash to Panel updated with GNOME 49 (Ubuntu 25.10) Support

Dash to Panel, the popular Gnome Shell extension, updated few days ago with support for…

2 days ago

Ubuntu Weekly Newsletter Issue 909

Welcome to the Ubuntu Weekly Newsletter, Issue 909 for the week of September 7 –…

3 days ago

Canonical announces it will support and distribute NVIDIA CUDA in Ubuntu

Today Canonical, the publisher of Ubuntu, announced support for the NVIDIA CUDA toolkit and the…

3 days ago