Home / Linux / How to Install Nextcloud in Ubuntu

How to Install Nextcloud in Ubuntu

How to Install Nextcloud in Ubuntu

Nextcloud is an open-source, highly effective and safe PHP-based content material collaboration platform constructed for file synchronization and sharing. It gives a protected, safe, and versatile resolution that enables customers to share a number of information and directories (or folders) on their pc, and synchronize them with a Nextcloud server.

The resolution consists of the Nextcloud server software program, which runs on a Linux system, shopper functions for Linux, Microsoft Windows and macOS, in addition to cell shoppers for Android and Apple iOS.

Nextcloud comes with enterprise options for people (or small enterprises), giant enterprises and repair suppliers. To arrange a Nextcloud server requires a LAMP stack (Linux, Apache, MySQL/MariaDB, PHP) put in in your server.

This information reveals how to set up the Nextcloud server on the Ubuntu Linux server with Apache and MariaDB as the net server and database software program respectively.

Step 1: Installing LAMP on Ubuntu

1. To set up a LAMP stack, open a terminal window and join to your Ubuntu server by way of SSH. Then run the next command to set up Apache, MariaDB server and PHP packages, plus the required and really helpful PHP modules.

$ sudo apt-get replace
$ sudo apt-get set up apache2 mariadb-server libapache2-mod-php7.2 php7.2-gd php7.2-json php7.2-mysql php7.2-curl php7.2-mbstring php7.2-intl php-imagick php7.2-xml php7.2-zip

2. Once the set up of the packages is full, the installer will setup the Apache2 and MariaDB companies to begin for now and allow them to robotically begin at system boot.

To examine if the 2 companies are began and enabled, run the next systemctl instructions.

$ systemctl standing apache2
$ systemctl standing mariadb
$ systemctl is-enabled apache2
$ systemctl is-enabled mariadb

Note: If for one purpose or the opposite the above companies will not be began and enabled, begin and allow them as proven.

$ sudo systemctl begin apache2
$ sudo systemctl begin mariadb
$ sudo systemctl allow apache2
$ sudo systemctl allow mariadb

three. Next, safe the MariaDB server set up by working the safety script that ships with the bundle as proven.

$ sudo mysql_secure_installation

Then reply the next questions when prompted (keep in mind to set a robust and safe root password):

  • Enter present password for root (enter for none): enter
  • Set root password? [Y/n] y
  • Remove nameless customers? [Y/n] y
  • Disallow root login remotely? [Y/n] y
  • Remove check database and entry to it? [Y/n] y
  • Reload privilege tables now? [Y/n] y
Secure MySQL Server InstallationSecure MySQL Server Installation

Secure MySQL Server Installation

Step 2: Install Nextcloud in Ubuntu

four. After securing the database set up, you want to create a database and database person for Nextcloud. So, log into the MariaDB server to entry the MySQL shell.

$ sudo mysql -u root -p 

And run the next sql instructions (substitute “[email protected]!#@%$lab” together with your safe password).

MariaDB [(none)]> CREATE DATABASE nextcloud; 
MariaDB [(none)]> CREATE USER [email protected] IDENTIFIED BY '[email protected]!#@%$lab'; 
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nextcloud.*  TO [email protected] IDENTIFIED BY '[email protected]!#@%$lab'; 
MariaDB [(none)]> FLUSH PRIVILEGES; 
MariaDB [(none)]> EXIT;

5. Now go to the Nextcloud Download Page, then click on on Download Nextcloud Server => Download Nextcloud to seize a .zip archive or run the next instructions to obtain it from the command-line utilizing wget command.

$ sudo wget -c https://download.nextcloud.com/server/releases/nextcloud-18.0.0.zip

6. Next, extract the archive contents and duplicate the extracted nextcloud listing/folder into your internet server’s doc root. Also set the suitable possession on the nextcloud listing, as follows.

$ sudo unzip nextcloud-18.zero.zero.zip
$ sudo cp -r nextcloud /var/www/html/
$ sudo chown -R www-data:www-data /var/www/html/nextcloud

Step three: Configure Apache to Serve Nextcloud

7. The subsequent step is to create an Apache configuration file for Nextcloud underneath the /and so forth/apache2/sites-available listing.

$ sudo vim /and so forth/apache2/sites-available/nextcloud.conf

Copy and paste the next traces in the file (substitute /var/www/html/nextcloud/ in case your set up listing is totally different).

Alias /nextcloud "/var/www/html/nextcloud/"

<Directory /var/www/html/nextcloud/>
  Require all granted
  Options FollowSymlinks MultiViews
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off

 SetEnv HOME /var/www//html/nextcloud
 SetEnv HTTP_HOME /var/www/html/nextcloud

Then save the file and shut it.

eight. Next, allow the newly created website and different Apache modules in the Apache configuration construction as proven.

$ sudo a2ensite nextcloud.conf
$ sudo a2enmod rewrite
$ sudo a2enmod headers
$ sudo a2enmod env
$ sudo a2enmod dir
$ sudo a2enmod mime
Enable Apache Modules for NextcloudEnable Apache Modules for Nextcloud

Enable Apache Modules for Nextcloud

9. Finally, restart the Apache2 service for the current modifications to take impact.

$ sudo systemctl restart apache2 

Step four: Complete Nextcloud Installation by way of Graphical Wizard

10. Now you want to full the set up by way of the graphical set up wizard from an internet browser. Open your browser and level it to the next deal with:


11. Once the set up wizard masses, create a nextcloud superuser/admin person account. Enter the username and password. Besides, click on on the Storage and Database hyperlink to entry further set up configuration choices in your Nextcloud information listing and database.

Then fill in the database connection particulars as proven in the next screenshot and click on Finish Setup.

Nextcloud Setup WizardNextcloud Setup Wizard

Nextcloud Setup Wizard

12. When the set up is full, you will note the next window. Click on the ahead arrow that can seem on the proper facet of the blue window to proceed and observe the prompts.

Nextcloud Installation WizardNextcloud Installation Wizard

Nextcloud Installation Wizard

13. Then in the following window, click on Finish Setup to begin utilizing your new Nextcloud server.

Nextcloud Setup FinishedNextcloud Setup Finished

Nextcloud Setup Finished

14. The following screenshot reveals the Nextcloud internet browser shopper’s major dashboard.

Nextcloud DashboardNextcloud Dashboard

Nextcloud Dashboard

For extra info and server configurations, see the Nextcloud admin handbook and to find out how to use it, learn the Nextcloud person handbook.

That’s all! In this text, we have now proven how to arrange Nextcloud server software program in the Ubuntu Linux server, utilizing the Apache internet server and MariaDB database. If you may have any questions regarding this information or any additions, attain us by way of the remark type under.

About Agent

Check Also

Linux – Transcendent Delight : linux

Linux – Transcendent Delight : linux

Linux – Transcendent Delight : linux I am right here to share my absolute delight …

Leave a Reply

Your email address will not be published. Required fields are marked *