How to Make Your Own Personal Cloud with NextCloud and Ubuntu

Have you ever wanted to have your own private Dropbox, something that lets you manage and distribute files online but with no company telling you about data limits, bandwidth restrictions or even disabling certain file-types? Great news! This dream can easily be made a reality with the help of software known as Nextcloud.

This software makes it so anyone with a server can host and distribute their own storage and effectively have their own cloud! In this guide we’ll go over everything you need to know to make your own personal cloud storage solution – from going over the hardware required, getting the operating system in order, and even setting up syncing clients. Let’s get started!

Note: Nextcloud is a fork of Owncloud which is another self-hosted Dropbox clone.

Let’s discuss the types of servers that are best to set up a home cloud powered by the NextCloud storage software. To start, the server should be running the latest version of Ubuntu server (or at the very least be running a version that supports snaps). Why Ubuntu server and not something like Redhat or CentOS? Simple, the developers of NextCloud currently distribute a snap package with the latest NextCloud software, something that these other operating systems don’t offer.

Additionally, NextCloud, when installed in other ways, takes a long time to set up and is not very user-friendly. By installing the snap version, zero setup is required, and everything pretty much works.

The developers have said in the past that it is hard to update NextCloud when they are based on distributions or integrated repositories. Ubuntu’s snap technology allows them to get the latest security updates to you as soon as possible on their own terms.

Hardware devices that are perfect for making your own cloud solution:

  • Any used or old DDR2-era (or better) 64bit PC/laptop that can stay on 24/7
  • Raspberry Pi 2 or 3 that can run Ubuntu Snappy Core
  • Any home or enterprise grade server

nextcloud-download-ubuntu-server

Users will need to make a USB image to install the latest version of Ubuntu server. Download the ISO disk image from this page.

Raspberry Pi 2/3 users

The Pi doesn’t currently run a traditional version of the Ubuntu server. Instead, users must use Ubuntu Snappy Core. Download the image here. Extract the image in the terminal:

Follow the Ubuntu wiki to get started with Snappy Core’s first boot. You will need to sign up with Canonical, using an email address.

nextcloud-raspberry-pi-snappy-core

With the disk image downloaded, it’s time to make the USB (or SD) install medium. Download the USB/SD tool Etcher. Follow the instructions on the page to create your installation USB or SD if you are using a Raspberry Pi 2/3. It is an easy three-step process.

Plug in your USB device and configure your machine to boot from it via the BIOS. For some, this key may be F2 or DEL. For others, it is Esc. It is best to research the manual to be sure.

nextcloud-ubuntu-server-boot-menu

With Ubuntu server loaded, select the correct language on the language screen, then press Enter on the option “Install Ubuntu Server.” This will take the user through a menu that asks what the keyboard layout and country is. Select the appropriate options and move on to the next page.

nextcloud-select-language-ubuntu-server

Users will then be asked to enter a hostname for Ubuntu server. Enter “ubuntu-server,” “ubuntu-nextcloud,” “Ubuntu” or something to that effect. Then, using the arrow keys, navigate to the “Continue” button, and press Enter to move to the next page.

nextcloud-set-ubuntu-server-hostname

On the next page the installation tool will ask the user to set up a username and a password that goes with this username. Enter a username, and a secure but memorable password, then select “Continue” to move to the next page.

nextcloud-ubuntu-server-enter-username

Next in the installation process, the user must tell Ubuntu server how to install to the hard drive. Select “guided – use entire disk.” This lets the system automatically set up partitions. No tinkering or manual partitioning is necessary. With this option selected, the installation will begin.

nextcloud-ubuntu-server-select-partition-setup

Soon after the initial Ubuntu server data finishes copying to the system, users will have to tweak a setting. The security updates a feature, to be exact. This feature, when enabled, allows the system to automatically install security updates. Select “install automatically.”

nextcloud-select-packages-to-install-ubuntu-server

Lastly, before the installation finishes, some packages are needed. Using the spacebar, find “LAMP server” and select it. Additionally, select “OpenSSH server” if you want remote shell access ready to go. When the packages are selected, press the Enter key to install them to the system.

nextcloud-ubuntu-server-snap-package

Ubuntu Server is installed to the system. Now it is possible to get NextCloud working. Install the software on the system with this command:

nextcloud-find-internal-ip-address

With NextCloud installed, use the command ifconfig to find the internal IP address of the server. Using the web browser on a phone, tablet or computer, go to the internal IP address as if it were a website.

nextcloud-create-admin-account

This will bring up the Nextcloud Setup Wizard. This wizard will prompt the user to set up an admin account with a password.

After creating the Admin account in next Cloud, the webUI will load, and the user will then have complete administrative control. Access Nextcloud at any time by heading to (in the web browser) the internal IP address used earlier.

Files from the admin account can be uploaded directly from the web via the browser (just like Google Drive, Dropbox and One Drive). Don’t like the web? Download the official sync client for Linux, Mac or Windows. There’s also an Android and iOS app, too.

Uploading files

nextcloud-upload-a-file

Upload a file or directory to your Nextcloud by clicking the “+” icon, then clicking the upload button.

Creating new users

nextcloud-user-menu

Users cannot register on Nextcloud. Instead, the admin must make a new account. Go to the top-right corner of the web UI and click on “admin.” Find “Users” and select it. This will bring you to the user management area.

Using the UI, set the username and password for the new user. Additionally, add the user to a new group by clicking “+ Add group.”

nextcloud-make-new-user

To modify how much storage a particular user is allowed to use, go to “Quota” and either select a preset option or enter your own storage quota limit.

Syncing

To sync, enter the local IP address into the Nextcloud sync client.

nextcloud-ip-address

Next, enter your username and password.

nextcloud-login-to-sync-client

With the information entered, the Nextcloud client will create a Nextcloud folder on your local machine. Place anything you wish to sync inside it. The sync tool will detect it and upload the files.

nextcloud-start-syncing

Cloud storage is a fact of modern-day life. Everyone has a Dropbox, a Google Drive, or something to that effect. As a result, large technology companies have large servers which hold precious, private information. For some, the trade-off and privacy risk is alright. They feel that Dropbox, etc., are reliable and versatile, and they’re willing to take the risk.

Nextcloud isn’t for those types of people. This software is for those who see the benefits of cloud storage but want to totally control their data. It is my hope that with this guide more and more people will embrace Nextcloud and break free of proprietary cloud storage services.

Do you host your own cloud solution? Why or why not? Tell us below!

Image credit: Christine und Hagen Graf

10 comments

  1. “To start, the server should be running the latest version of Ubuntu server (or at the very least be running a version that supports snaps). Why Ubuntu server and not something like Redhat or CentOS? Simple, the developers of NextCloud currently distribute a snap package with the latest NextCloud software, something that these other operating systems don’t offer.”

    Don’t know where you got your information, but it’s wrong. From the “System Requirements” page ( https://docs.nextcloud.com/server/11/admin_manual/installation/system_requirements.html ):

    “Recommended Setup for Running Nextcloud

    For best performance, stability, support, and full functionality we recommend:

    Red Hat Enterprise Linux 7 / Ubuntu 16.04 LTS

    Supported Platforms

    Server: Linux (Debian 7, SUSE Linux Enterprise Server 11 SP3 & 12, Red Hat Enterprise Linux/CentOS 6.5 and 7 (7 is 64-bit only), Ubuntu 14.04 LTS, 16.04 LTS)”

    So, not only is RHEL **supported**, it’s **recommended** for use, as an alternative to Ubuntu. And CentOS, Debian and SUSE are **also supported**, contrary to your statement.

    “Do you host your own cloud solution? Why or why not?”

    Yes, I use ownCloud. Why? I was using Dropbox, but dropped them like a hot potato when it was revealed that they had full access to user’s data (they had access to the encryption keys) and when they hired someone who believes that Internet users should have no privacy. Since then, I haven’t paid attention to anything having to do with Dropbox and so don’t know if these two things are still true, but I couldn’t care less…their lies destroyed any credibility they have and I’ll never go back.

    • Keyword: snaps. Unless Redhat is shipping SnapD, your “refutation” to my claim isn’t a refutation at all.

      Yeah, they’re supported on those operating systems, and you can spend 30 minutes setting them up manually, or use snap, and do it in 5 minutes.

  2. Thanks for the guide. How do you make secure connections to this service (https)? Also connecting externally from the Internet via phone (4G) may require some firewall changes. I see Android has a client. I want to upload pics from my phone as I take them but i don’t want the inconvenience of connecting to a vpn before uploading or is this there another way?

  3. I’ve been using Owncloud, which Nextcloud is a fork of, for a few years now. If I’m honest the main reason is that I didn’t have the finances to pay for the quantity of cloud storage that I’d need to backup all my data to the cloud. From a backup perspective it is a bit of a compromise, my server is in my home and therefore does not provide protection against a major disaster (e.g. fire). I refer to it as Dropbox on steroids as it does all I used to do with Dropbox and more.

    I have been experimenting with Nextcloud for a few weeks now as this fork of Owncloud has some nice additional features, and I will make the switch soon. I was not aware of the snap distribution method and that will make things a little easier than the manual installation that I’ve been doing up to now. Manual installation does have some benefits though as it has enabled me to have multiple instances on the same test server.

    I appreciate that this article is all about easy installation instructions to enable people to quickly dip their toe in the water. However, there is one recommendation that I would make to the server installation section. I would not take the default partitioning option. If you create a small partition for the installation, a small partition for swap space and use the rest for a partition for the Nextcloud data, it will be easier when it is time to upgrade Ubuntu. By using a separate data partition you can select to not format that partition during the upgrade and save yourself from having to restore or reseed the data after the upgrade. During the upgrade it will still be wise to take a precautionary backup of the data if you don’t have it elsewhere and you will need to backup and restore the database and config file so that you can get Nextcloud to “see” the data again. To the less technical, with small data quantities, this may if course be more trouble than just starting from scratch each time, but I reckon most people that decide to experiment with this will in reality be able to follow Nextcloud’s upgrade instructions too.

  4. I would suggest adding a brief statement aboout security. You point out privacy concerns but do not address security. I believe you want both. Maybe mention a simple sudo command to turn on UFW firewall. You might also suggest briefly addressing traversing a firewall since you have it behind one in your configuration. You may also want to add something about whether it is advisable to put Nextcloud out in front of a firewall. You might also want to put in a testing section. Test behind a firewall and test in front of a firewall. But thanks for the great article.

  5. Hello,
    I have followed this tutorial exactly, but when i get to the step where i go to the internal ip address it takes me to the “apache2 ubuntu default page”

    I’m not particularly ubuntu competent, can anyone point me in the right direction? (probably something stupid)

    Thanks!

      • The snap does not copy the files to the /var/www/html folder. Unless it is just slow to do so???

        • Because the step where you selected to install a LAMP server was redundant. The SNAP package includes all the necessary dependencies, but because you installed a LAMP package already, it took precedent.

Comments are closed.

Sponsored Stories