{"id":7763,"date":"2019-01-10T06:13:52","date_gmt":"2019-01-10T06:13:52","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=7763"},"modified":"2019-01-12T10:04:43","modified_gmt":"2019-01-12T10:04:43","slug":"how-to-install-nextcloud-15-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/10\/how-to-install-nextcloud-15-on-ubuntu-18-04\/","title":{"rendered":"How to Install NextCloud 15 on Ubuntu 18.04"},"content":{"rendered":"<p><a href=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/01\/RH-742-nextcloud-ubuntu.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29416 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/01\/RH-742-nextcloud-ubuntu.jpg\" sizes=\"auto, (max-width: 742px) 100vw, 742px\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/01\/RH-742-nextcloud-ubuntu.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/01\/RH-742-nextcloud-ubuntu-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/01\/RH-742-nextcloud-ubuntu-300x150.jpg 300w\" alt=\"Install NextCloud on Ubuntu\" width=\"742\" height=\"372\" \/><\/a><\/p>\n<p>NextCloud is a free and open-source self-hosted file sharing and communication platform built using PHP. It is a great alternative to some of the popular services available on the market, such as Dropbox, Google Drive, OwnCloud, etc. With NextCloud, you can easily store your data on your\u00a0<a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noopener\">Ubuntu 18.04 VPS<\/a>, create and manage your contacts, calendars, to-do lists, and much more. In this tutorial, we will install NextCloud version 15 on an Ubuntu 18.04 VPS \u2013 version 15 is a major release that comes with a lot of new features and improvements.<span id=\"more-29387\"><\/span><\/p>\n<h2><strong>Prerequisites:<\/strong><\/h2>\n<p>\u2013 An Ubuntu 18.04 VPS<br \/>\n\u2013 A system user with root privileges<br \/>\n\u2013 MySQL or MariaDB database server version 5.5 or newer with InnoDB storage engine.<br \/>\n\u2013 Apache 2.4 with mod_php enabled<br \/>\n\u2013 PHP version 7.0 or newer<\/p>\n<h2><strong>Log in and update the server:<\/strong><\/h2>\n<p>Log in to your Ubuntu 18.04 VPS via SSH as user root:<\/p>\n<pre>ssh root@IP_Address -p Port_number<\/pre>\n<p>Don\u2019t forget to replace \u2018IP_Address\u2019 and \u2018Port_number\u2019 with the actual IP address of your server and the SSH service port.<\/p>\n<p>Run the following commands to make sure that all installed packages on your Ubuntu 18.04 VPS are updated to the latest available version:<\/p>\n<pre>apt update &amp;&amp; apt upgrade<\/pre>\n<h2><strong>Install Apache and PHP:<\/strong><\/h2>\n<p>We need to install the Apache web server in order to serve the NextCloud files. It can be done easily by using the following command:<\/p>\n<pre>apt -y install apache2<\/pre>\n<p>Once the web server is installed, enable it to automatically start after a server restart:<\/p>\n<pre>systemctl enable apache2<\/pre>\n<p>Verify that the web server is up and running on your server:<\/p>\n<pre>service apache2 status<\/pre>\n<p>This is what the output should look like:<\/p>\n<pre>apache2.service - The Apache HTTP Server\r\n   Loaded: loaded (\/lib\/systemd\/system\/apache2.service; enabled; vendor preset: enabled)\r\n  Drop-In: \/lib\/systemd\/system\/apache2.service.d\r\n           \u00e2\u00e2apache2-systemd.conf\r\n   Active: active (running) since Thu 2018-12-27 05:13:26 CST; 12min ago<\/pre>\n<p>Since NextCloud is a PHP-based application, our next step is to install PHP and some PHP extensions required by NextCloud:<\/p>\n<pre>apt -y install php php-cli php-common php-curl php-xml php-gd php-mbstring php-zip php-mysql<\/pre>\n<p>Restart the Apache web server to load the PHP modules:<\/p>\n<pre>systemctl restart apache2<\/pre>\n<p>Now check the PHP version installed on your server:<\/p>\n<pre>php -v\r\nPHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )\r\nCopyright (c) 1997-2018 The PHP Group\r\nZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies<\/pre>\n<h2><strong>Install MariaDB and create a database:<\/strong><\/h2>\n<p>NextCloud needs an SQL database to store information. For this purpose, we will install the MariaDB database server by executing the following command:<\/p>\n<pre>apt -y install mariadb-server<\/pre>\n<p>Just like with Apache, enable MariaDB to automatically start after server reboot:<\/p>\n<pre>systemctl enable mariadb<\/pre>\n<p>Next, run the \u2018mysql_secure_installation\u2019 post-installation script to set a password for the MariaDB root user and to further improve the security of your MariaDB server. Once all steps are completed, you can go ahead and log in to the MariaDB server as the root user. We will then create a new user and database \u2013 both of which are necessary for installing NextCloud.<\/p>\n<pre>mysql -u root -p\r\n\r\nMariaDB [(none)]&gt; CREATE DATABASE nextcloud;\r\nMariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud_user'@'localhost' IDENTIFIED BY 'PASSWORD';\r\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\r\nMariaDB [(none)]&gt; exit;<\/pre>\n<p>Don\u2019t forget to replace \u2018PASSWORD\u2019 with a strong password.<\/p>\n<h2><strong>Download and install NextCloud:<\/strong><\/h2>\n<p>Go to NextCloud\u2019s official website and download the latest stable release of the application. At the time of this article being published, the latest version of NextCloud is version 15.0.0.<\/p>\n<pre>wget https:\/\/download.nextcloud.com\/server\/releases\/nextcloud-15.0.0.zip<\/pre>\n<p>Once the zip archive is downloaded, unpack it to the document root directory on your server:<\/p>\n<pre>unzip nextcloud-15.0.0.zip -d \/var\/www\/html\/<\/pre>\n<p>All files will be stored under a directory named \u2018nextcloud\u2019.<\/p>\n<p>Remove the zip archive and change the ownership of the NextCloud files:<\/p>\n<pre>rm -f nextcloud-15.0.0.zip\r\nchow -R www-data:www-data \/var\/www\/html\/nextcloud<\/pre>\n<p>That was the last step of configuring your server and installing NextCloud through the command line. Now, you can open your preferred web browser and access http:\/\/Your_IP\/nextcloud to continue with the setup. Make sure to replace \u201cYour_IP\u201d with your server\u2019s IP address or domain name. If everything is properly configured, you will get the following screen:<\/p>\n<p><a href=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/nextcloud1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-29388 alignnone\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/nextcloud1-107x300.png\" sizes=\"auto, (max-width: 194px) 100vw, 194px\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/nextcloud1-107x300.png 107w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/nextcloud1-53x150.png 53w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/nextcloud1.png 340w\" alt=\"\" width=\"194\" height=\"544\" \/><\/a><\/p>\n<p>Create an administrative account, set the data folder and enter the MariaDB details for the user and database we created earlier in this tutorial.<\/p>\n<p>That\u2019s all \u2013 if you followed the steps in the tutorial, you will have successfully installed NextCloud version 15 on your Ubuntu 18.04 VPS. For more details about its configuration and usage, please check their official documentation.<\/p>\n<hr \/>\n<p>Of course, you don\u2019t need to Install NextCloud 15 on Ubuntu 18.04 yourself if you use one of our\u00a0<a href=\"https:\/\/www.rosehosting.com\/nextcloud-hosting.html\" target=\"_blank\" rel=\"noopener\">NextCloud Hosting<\/a>\u00a0services, in which case you can simply ask our expert Linux admins to install and set this up for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n<p><strong>PS.<\/strong>\u00a0If you liked this post on How To Install NextCloud 15 on Ubuntu 18.04, please share it with your friends on the social networks by using the buttons on the left, or simply leave a reply below. Thanks.<\/p>\n<p><a href=\"http:\/\/lxer.com\/module\/newswire\/ext_link.php?rid=264686\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>NextCloud is a free and open-source self-hosted file sharing and communication platform built using PHP. It is a great alternative to some of the popular services available on the market, such as Dropbox, Google Drive, OwnCloud, etc. With NextCloud, you can easily store your data on your\u00a0Ubuntu 18.04 VPS, create and manage your contacts, calendars, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/10\/how-to-install-nextcloud-15-on-ubuntu-18-04\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Install NextCloud 15 on Ubuntu 18.04&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7763","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7763","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=7763"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7763\/revisions"}],"predecessor-version":[{"id":8018,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7763\/revisions\/8018"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=7763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=7763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=7763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}