Table of Contents
Today, in this article, we show you how to to define up Nextcloud on Ubuntu. Similar to Dropbox, Nextcloud, a derivative of ownCloud, is a file sharing service that lets you save your private stuff like documents and photos in one place. With Nextcloud, all your features are open source, which is a distinction. It also eliminates the need for a third-party cloud hosting service, giving you back control and security of your private data.
For those who don’t know, Nextcloud is a collection of cloud-based apps that include email, forms, contacts, calendar, video and audio chat, and document and file management. In fact, for anyone interested, Nextcloud can quickly replace services like Microsoft 365 or Google Workspace. Since we’ve been using Nextcloud since the beginning, we’re sure that anyone can get something out of it. Below are the steps to install Nextcloud on Ubuntu.
Steps to Install Nextcloud on Ubuntu
Installing LAMP on Ubuntu
Step 1: to install a LAMP stack, open a terminal window and connect to your Ubuntu server via SSH. Then run the following command to install Apache, MariaDB server and PHP packages, in addition to the required and recommended PHP modules.
$ sudo apt-get update$ sudo apt-get install apache2 mariadb-server libapache2-mod-php7.2 php7.2-gd php7.2-js
Step 2: When the installation of packages is complete, the installer will configure the Apache2 and MariaDB services to start for now and enable them to start automatically at system startup. To verify that both services are started and enabled, run the following systemctl commands.
$ systemctl status apache2$ systemctl status mariadb$ systemctl is enabled apache2$ systemctl is enabled mariadb
Step 3: Next, set the MariaDB server installation by running the security script that came with the package as shown.
$ sudo mysql_secure_installation
Install Nextcloud on Ubuntu
Step 1: After securing the database installation, you need to create a database and a database user to next cloud. Then log in to MariaDB server to access the MySQL shell.
$ sudo mysql -u root -p
Step 2: Now go to Nextcloud download page and click Download Nextcloud Server => Download Nextcloud to grab a .zip file or run the following commands to download it from the command line using wget command.
$ sudo wget -c https://download.nextcloud.com/server/releases/nextcloud-18.0.0.zip
Step 3: Then extract the contents of the file and copy the extracted file next cloud directory/folder in the document root of your web server. Also set the appropriate property in the nextcloud directory as follows.
$ sudo unzip nextcloud-18.0.0.zip$ sudo cp -r nextcloud /var/www/html/$ sudo chown -R www-data:www-data /var/www/html/nextcloud
Configure Apache to serve Nextcloud
Step 1: The next step is to create an Apache configuration file to next cloud under /etc/apache2/sites-available directory.
$ sudo vim /etc/apache2/sites-available/nextcloud.conf
Step 2: Then enable the newly created site and others Apache modules in the Apache configuration framework as shown.
$ sudo a2enmod nextcloud.conf$ sudo a2enmod rewrite$ sudo a2enmod headers$ sudo a2enmod env$ sudo a2enmod dir$ sudo a2enmod mime
Step 3: Finally, restart the Apache2 Service for recent changes to take effect.
$ sudo systemctl restart apache2
Complete Nextcloud installation via graphical wizard
Step 1: Now you need to complete the installation through the graphic installation wizard from a web browser. Open your browser and point to the following address:
http://SERVR_IP/nextcloud/OUhttp://SERVER_ADDRESS/nextcloud/
Step 2: After the installation wizard loads, create a next cloud superuser/administrator user account. Enter the username and password. Also, click the Storage and Database link to access additional installation configuration options for your Data from the next cloud directory and database.
Step 3: When the installation is complete, Click on the forward arrow that will appear on the right side of the blue window to proceed and follow the instructions.
Step 4: Then in the next window, click finish Setup to start using your new next cloud server.
Final Words
We hope you like our article about how to install Nextcloud on Ubuntu. A free self-hosted file sharing program is called NextCloud. It is accessible with a web browser. Android, iPhone and desktop operating systems have Next Cloud apps (Windows, Mac and Linux). It’s really simple to use and easy to use.