NextCloudPi gets automount, backups, NextCloud online installation, NextCloud 12 and more

The latest release of NextCloudPi is out!

This release brings us the latest NextCloud 12 release. Check the new stuff here.

In order to improve support for upgrading, three new tools have been added to nextcloudpi-config.

These tools will allow you to save or restore a backup of your NextCloud instance, and even download and install any NextCloud version from the internet.

Last but not least, the automount feature aims to make the setting up process easier, specially for less experienced Linux users.

As usual, please report any problems here, and feedback is welcome.

Upgrade NextCloudPi to NextCloud 12


If you are already running NextCloudPi chances are you will not want to start from scratch in order to get the latest update.

Also, NextCloud internal updater is not as reliable as we would like as of today, so there is a risk of breaking things if we try to upgrade from the admin panel. I have found and reported a couple bugs myself.

For users wanting to upgrade to NC 12 I recommend:

  1. run ncp-update , in order to get the latest features
  2. run nc-backup  from nextcloudpi-config
  3. try the internal updater app in the admin panel
  4. if it fails, restore the backup with nc-restore, then
  5. Copy your files somewhere else, and export your contacts, calendars, news and such
  6. run nc-nextcloud  to download and install NextCloud 12
  7. Copy your files back. Import contacts, calendars, news and such

Backup and Restore

There is a newer version of this feature. This documentation for backups is obsolete.

You can use nc-backup  to create a backup of your files and database.

This includes all users’ files unless you have moved your data directory with nc-datadir.

A .bak file will be generated.

You can restore an exact copy of your NextCloud instance any NextCloudPi instance through nc-restore.

nc-restore will overwrite any existing NextCloud installation

NextCloud online installation


This feature can also be handy and save us time and trouble in certain situations.

nc-nextcloud simply downloads and installs whatever NextCloud version we want. This means that the day NextCloud 14 comes out, we will be able to install it in our NextCloudPi. This would not be an upgrade, but a clean installation.

It provides an easy way of replacing or updating our NextCloud instance without having to start from scratch if we have other customizations in place that we don’t want to lose.

nc-nextcloud will overwrite any existing NextCloud installation


Note: the feature has been rewritten and the behaviour is slightly different now but the usage holds the same

Since NextCloudPi came out, the configuration step where the most people are having trouble by far is mounting their external USB hard drive to host their files. This involves editing /etc/fstab and being careful with permissions.

It is a fairly common setup, so I decided that it would be helpful to make it easier.

Just activate it and your /media folder will be populated with an entry such as /media/USBdrive that will be already mounted for you for each connected USB drive. If the filesystem contains a label, a symbolic link will also appear in /media/.

 $ ls -l /media
total 8
lrwxrwxrwx   1 root root   16 May 24 15:23 cloudDrive -> /media/USBdrive1
drwxrwxr-x+ 11 pi   pi   4096 May 24 15:23 USBdrive
drwxr-xr-x   4 root root 4096 Jan  1  1970 USBdrive1

In this example, the first inserted USB drive does not have a label, but the second does, so a symbolic link appears to uniquely identify it.

If you want to use several USB mounts, you should reference the drive by its label in order to have a predictable path to it. This way, your configuration will not depend on the order in which USB sticks were plugged in.

For instance if we want to move the data folder to a connected USB drive with label cloudDrive with nc-datadir

Be aware that if we want to move the data folder to an external drive, NTFS and FAT filesystems should be avoided. The reason is that they are not standard Unix like filesystems and do not support Linux style owners and permissions.

For security reasons, the data directory should be restricted to be used by the www-data user, whereas the database directory has to belong to the mysql user. Mounting on a filesystem that does not support permissions would mean breaking that security layer. Not recommended at all.

On top of that, the performance of the NTFS driver compared to an ext4 in Linux is lousy. Last time I tried it hogged my Raspberry B CPU very badly.

Note that you still have to either unmount the drive or halt the system in order to extract the USB

Author: nachoparker

Humbly sharing things that I find useful [ github dockerhub ]


    1. a number of people have asked for this (also I will look into it in the next ‘cycle’.

      For now, I think that the main features are in place, so cycle ‘one’ is pretty much finished featurewise.

      There will be a period though of testing, feedback, polishing first.

  1. Hi nachoparker, thanks for your invaluable work! I’m struggling with file uploads greater than 2 GB. I’ve changed the respective config.php lines and the .htaccess (IIRC) lines, but no avail. Whenever the Windows client tries to sync a file above 2 gigs it loses connection to the server and reads “operation failed”. How can I fix this?
    Also I’d like to ask if you would recommend moving the database onto the external drive? Last time I tried NC didn’t start. Maybe because of the lacking MySQL permission…
    Last thing: is NTFS performance really that bad? I currently have around 30 gigs of files on my NC with server-side encryption on. Should I go through the hassle of switching to a different filesystem? Which one would you recommend? Thank you!

    1. Hello,

      I just improved big uploads. I expect to finish testing of the new image today. I would like to hear your feedback on this topic one I release it (the date on the download image name will change).

      Please, in the future use the github issue tracker to report things that don’t work (well) 🙂

      I do like moving the database to prevent wear of the SD and speed, but it is not super important I guess.

      There have been recent improvements to `nc-database` and permissions are checked for during the process of changing the database location. I would also love for people to help me with this by reporting errors, so I can fix them or automate things further to prevent common situations where people misconfigure things.

      It has been a number of years since I last tried using ntfs-3g on my rasbperry pi but yes, I HAD TO do switch to ext4 because it was hogging my CPUs.

      You can check if that is the case for you. I definitely recommend it.

  2. Hi nachoparker,

    Have downloaded both NextCloudPi 12 and 11 multiple times from different PCs and connections, but the files fail MD5 checksum. Also, winzip reports the data is corrupted. Just me? Thanks.


  3. Hi Nachoparker, I do not know what I’m doing wrong…I cannot migrate my files from the card to my attached usb drive. Each time I try, I get a permissions error for both the nc database and the nc data dir.

    NextCloudPi installer configuration Launching nc-datadir
    ERROR: the user www-data does not have access permissions over /media/USBdrive
    Done. Press any key…

    What am I failing to do?

    Thank you for this wonderfull programing!!

    Cheers from San Antonio!

      1. Thank you for the quick reply! My external drive is formatted ex4 and I am using your nc-automount.

        /media = lrwxrwxrwx 1 root root 15 May 31 17:49 NextCloud -> /media/USBdrive
        /dev = lrwxrwxrwx 1 root root 3 May 31 19:55 mmcblk0 -> sda

        nc-database = “ERROR: the user mysql does not have access permissions over /media/USBdrive”

        nc-datadir = “ERROR: the user www-data does not have access permissions over /media/USBdrive”

        Any advice is greatly appreciated!

  4. Nacho!

    THANK YOU! I just installed Nextcloudpi and it is awesome and SUPER easy. Thank you again for all this hard work.

    Still working on getting everything set up the way I want, so I may have some questions once I get further into it. I have to setup let’s encrypt and forward ports on my router next.

    Also, one more question, I have a Dynamic DNS service using my own domain that points to my static IP address from my ISP. I am NOT using NO-IP. Do you see any issue here? I’ll be pointing to my domain ( Any additional advice you have for setting this up?


    1. Hi!
      There is no problem using a different DDNS.
      First, forward port 443, 80 if you want also, then run `letsencrypt` from `nextcloudpi-config` and write your existing DDNS domain.

    1. Hello,

      Please, if you want to ask general questions, or general help use the forums

      If you have a specific technical question, check first if it has not been already asked

      If it is a new technical question, or something does not work, please report it to be fixed at

      Thanks for the feedback

    1. Sure, that’s easy.

      I like to answer to technical questions on Github, so it’s better to track and other people can benefit from the answer.

      Please, open an issue and we will follow up over there.

Leave a Reply

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