{"id":5973,"date":"2018-12-19T16:51:27","date_gmt":"2018-12-19T16:51:27","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=5973"},"modified":"2018-12-28T22:13:05","modified_gmt":"2018-12-28T22:13:05","slug":"install-nextcloud-on-ubuntu-linux-hint","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/12\/19\/install-nextcloud-on-ubuntu-linux-hint\/","title":{"rendered":"Install NextCloud on Ubuntu \u2013 Linux Hint"},"content":{"rendered":"<p>NextCloud is a free self-hosted file sharing software. It can be accessed from the web browser. Next cloud has apps for Android, iPhone and Desktop operating systems (Windows, Mac and Linux). It is really user friendly and easy to use.<\/p>\n<p>In this article, I will show you how to install NextCloud on Ubuntu. So, let\u2019s get started.<\/p>\n<p>On Ubuntu 16.04 LTS and later, NextCloud is available as a snap package. So, it is very easy to install.<\/p>\n<p>To install NextCloud snap package on Ubuntu 16.04 LTS and later, run the following command:<\/p>\n<p>$ sudo snap install nextcloud<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/1-7.png\" alt=\"\" width=\"871\" height=\"86\" \/><\/p>\n<p>As you can see, NextCloud snap package is being installed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/2-7.png\" alt=\"\" width=\"874\" height=\"63\" \/><\/p>\n<p>NextCloud snap package is installed at this point.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/3-8.png\" alt=\"\" width=\"922\" height=\"77\" \/><\/p>\n<h2>Creating NextCloud Administrator User:<\/h2>\n<p>Now, you have to create an administrator user for managing NextCloud. To do that, you have to access NextCloud from a web browser.<\/p>\n<p>First, find out the IP address of your NextCloud server with the following command:<\/p>\n<p>As you can see, the IP address of my NextCloud server is 192.168.21.128. It will be different for you. Make sure you replace it with yours from now on.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/4-7.png\" alt=\"\" width=\"1013\" height=\"325\" \/><\/p>\n<p>Now, from any web browser, visit the IP address 192.168.21.128. Now, type in your Administrator username and password and click on Finish setup.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/5-7.png\" alt=\"\" width=\"1360\" height=\"768\" \/><\/p>\n<p>As you can see, you\u2019re logged in. As you\u2019re using NextCloud for the first time, you are prompted to download the Next Cloud app for your desktop or smart phone. If you don\u2019t wish to download the NextCloud app right now, just click on the x button at the top right corner.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/6-7.png\" alt=\"\" width=\"1140\" height=\"644\" \/><\/p>\n<p>This is the NextCloud dashboard. Now, you can manage your files from the web browser using NextCloud.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/7-7.png\" alt=\"\" width=\"1140\" height=\"644\" \/><\/p>\n<h3>Using Dedicated Storage for NextCloud:<\/h3>\n<p>By default, NextCloud stores files in your root partition where the Ubuntu operating system is installed. Most of the time, this is not what you want. Using a dedicated hard drive or SSD is always better.<\/p>\n<p>In this section, I will show you how to use a dedicated hard drive or SSD as a data drive for NextCloud. So, let\u2019s get started.<\/p>\n<p>Let\u2019s say, you have a dedicated hard drive on your Ubuntu NextCloud server which is recognized as \/dev\/sdb. You should use the whole hard drive for NextCloud for simplicity.<\/p>\n<p>First, open the hard drive \/dev\/sdb with fdisk as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/8-7.png\" alt=\"\" width=\"939\" height=\"89\" \/><\/p>\n<p>\/dev\/sdb should be opened with fdisk partitioning utility. Now, press o and then press &lt;Enter&gt; to create a new partition table.<\/p>\n<p><u>NOTE:<\/u> This will remove all your partitions along with data from the hard drive.<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/9-7.png\" alt=\"\" width=\"934\" height=\"254\" \/><\/p>\n<p>As you can see, a new partition table is created. Now, press n and then press &lt;Enter&gt; to create a new partition.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/10-8.png\" alt=\"\" width=\"971\" height=\"100\" \/><\/p>\n<p>Now, press &lt;Enter&gt;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/11-7.png\" alt=\"\" width=\"935\" height=\"96\" \/><\/p>\n<p>Now, press &lt;Enter&gt; again.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/12-8.png\" alt=\"\" width=\"932\" height=\"49\" \/><\/p>\n<p>Press &lt;Enter&gt;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/13-7.png\" alt=\"\" width=\"935\" height=\"66\" \/><\/p>\n<p>Press &lt;Enter&gt;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/14-6.png\" alt=\"\" width=\"942\" height=\"82\" \/><\/p>\n<p>A new partition should be created. Now, press w and press &lt;Enter&gt;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/15-7.png\" alt=\"\" width=\"943\" height=\"171\" \/><\/p>\n<p>The changes should be saved.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/16-7.png\" alt=\"\" width=\"942\" height=\"137\" \/><\/p>\n<p>Now, format the partition \/dev\/sdb1 with the following command:<\/p>\n<p>$ sudo mkfs.ext4 \/dev\/sdb1<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/17-5.png\" alt=\"\" width=\"939\" height=\"99\" \/><\/p>\n<p>The partition should be formatted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/18-4.png\" alt=\"\" width=\"943\" height=\"324\" \/><\/p>\n<p>Now, run the following command to mount \/dev\/sdb1 partition to \/mnt mount point:<\/p>\n<p>$ sudo mount \/dev\/sdb1 \/mnt<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/19-3.png\" alt=\"\" width=\"931\" height=\"93\" \/><\/p>\n<p>Now, copy everything (including the dot\/hidden files) from the \/var\/snap\/nextcloud\/common\/nextcloud\/data directory to \/mnt directory with the following command:<\/p>\n<p>$ sudo cp -rT \/var\/snap\/nextcloud\/common\/nextcloud\/data \/mnt<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/20-3.png\" alt=\"\" width=\"945\" height=\"95\" \/><\/p>\n<p>Now, unmount the \/dev\/sdb1 partition from the \/mnt mount point with the following command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/21-3.png\" alt=\"\" width=\"935\" height=\"88\" \/><\/p>\n<p>Now, you will have to add an entry for the \/dev\/sdb1 in your \/etc\/fstab file, so it will be mounted automatically on the \/var\/snap\/nextcloud\/common\/nextcloud\/data mount point on system boot.<\/p>\n<p>First, run the following command to find out the UUID of your \/dev\/sdb1 partition:<\/p>\n<p>As you can see, the UUID in my case is fa69f48a-1309-46f0-9790-99978e4ad863<\/p>\n<p>It will be different for you. So, replace it with yours from now on.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/22-3.png\" alt=\"\" width=\"946\" height=\"128\" \/><\/p>\n<p>Now, open the \/etc\/fstab file with the following command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/23-3.png\" alt=\"\" width=\"966\" height=\"93\" \/><\/p>\n<p>Now, add the line as marked in the screenshot below at the end of the \/etc\/fstab file. Once you\u2019re done, press &lt;Ctrl&gt; + x, then press y followed by &lt;Enter&gt; to save the file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/24-3.png\" alt=\"\" width=\"1234\" height=\"427\" \/><\/p>\n<p>Now, reboot your NextCloud server with the following command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/25-3.png\" alt=\"\" width=\"713\" height=\"91\" \/><\/p>\n<p>Once your computer boots, run the following command to check whether the \/dev\/sdb1 partition is mounted to the correct location.<\/p>\n<p>$ sudo df -h | grep nextcloud<\/p>\n<p>As you can see, \/dev\/sdb1 is mounted in the correct location. Only 70MB of it is used.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/26-2.png\" alt=\"\" width=\"957\" height=\"149\" \/><\/p>\n<p>As you can see I uploaded some files to NextCloud.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/27-2.png\" alt=\"\" width=\"1140\" height=\"644\" \/><\/p>\n<p>As you can see, the data is saved on the hard drive that I just mounted. Now, 826 MB is used. It was 70MB before I uploaded these new files. So, it worked.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/12\/28-2.png\" alt=\"\" width=\"950\" height=\"151\" \/><\/p>\n<p>That\u2019s how you install NextCloud on Ubuntu. Thanks for reading this article.<\/p>\n<p><a href=\"https:\/\/linuxhint.com\/install_nextcloud_ubuntu\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>NextCloud is a free self-hosted file sharing software. It can be accessed from the web browser. Next cloud has apps for Android, iPhone and Desktop operating systems (Windows, Mac and Linux). It is really user friendly and easy to use. In this article, I will show you how to install NextCloud on Ubuntu. So, let\u2019s &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/12\/19\/install-nextcloud-on-ubuntu-linux-hint\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install NextCloud on Ubuntu \u2013 Linux Hint&#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-5973","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\/5973","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=5973"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/5973\/revisions"}],"predecessor-version":[{"id":6586,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/5973\/revisions\/6586"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=5973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=5973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=5973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}