ARM, debian, docker, FOSS, linux, networking, nextcloud, nextcloudpi, OYB software, privacy, raspberrypi

NextCloudPi, a ready to use NextCloud image for Raspberry Pi

IMPORTANT: The contents of this blog post are a detailed explanation of NextCloudPi. However, the main landing page of the project is now and that is the place where information will be kept up to date.

I would like to introduce NextCloudPi, ready to use Raspbian 9 image with the latest Nextcloud 13.

NextCloudPi is now also available as an ARM or x86 docker container ( NEW 06-08-2017 )

NextCloudPi can now also be installed on any Debian 9 system ( NEW 11-12-2017 )

NextCloudPi can also be built for Armbian supported boards, like the Odroid HC1 ( NEW 12-04-2017 ).

NextCloudPi is an official NextCloud community project as of 05-31-2017.


  • Debian 9 stretch
  • Nextcloud 13.0.2
  • Apache 2.4.25, with HTTP2 enabled
  • PHP 7.0 (double the speed of PHP5!)
  • MariaDB 10
  • Redis memory cache ( NEW 11-12-2017 )
  • 4.9 Linux Kernel ( NEW 03-13-2017 )
  • Automatic redirection to HTTPS
  • ACPU PHP cache
  • PHP Zend OPcache enabled with file cache
  • HSTS
  • Cron jobs for Nextcloud
  • Sane configuration defaults
  • Pre-installed popular Apps for home use ( calendar, contacts, notes, tasks, news … )
  • Full emoji support ( NEW 05-24-2017 )
  • Postfix email
  • Secure


Extras are not activated by default. Configure them with sudo nextcloudpi-config


Get it

Please, if possible use and share the torrent to keep the hosting costs down.


At this moment, the images do not provide a desktop environment, though it can be added through apt.

Please, report any issues here.

Use the official forums to ask questions, opinions and participate.

Please, before asking technical questions in the forums, take a look at the FAQ and the wiki.

We need your help! There are many easy things that you can do to contribute.


NEW: you can follow the installation and setup steps in the Wiki

SD card for the Raspberry Pi

Follow the classic instructions to copy the image to an SD card.

tar -xvf NextCloudPi-lite_02-12-17.tar.bz2
sudo dd bs=4M if=NextCloudPi-lite_02-12-17.img of=/dev/sdx

Replace sdx  to your SD card device.

Windows users can install the image with Etcher as explained in this post.


You can install it in any architecture running the latest Debian with

# curl -sSL | bash


NEW: you can follow the installation and setup steps in the Wiki

Connectivity and basic setup

Upon first boot, you should do the usual, such as change the default Raspbian password, maybe configure the network connection, enlarge the partition with raspi-config , and enable SSH if you so desire.

If you are going to connect though a network cable, make sure it is plugged in before turning the Raspberry Pi on. If you are doing manual configuration of the network, such as setting up a static IP, reboot when you are done so that NextCloudPi can detect it.

In many cases you can just access by typing nextcloudpi.local in your browser. Otherwise, you need to discover what is your Raspberry Pi IP address. For this, you can use a network scanner such as nmap

$ nmap -sP '192.168.0.*'
Starting Nmap 7.50 ( ) at 2017-07-24 17:30 CEST                                                       
Nmap scan report for                         
Host is up (0.017s latency).                               
Nmap done: 256 IP addresses (1 hosts up) scanned in 3.33 seconds

, or you can read it from the screen if you have an HDMI monitor connected during power on. If you use Windows, you can use Angry IP Scanner.

You can connect to your home Wi-Fi through nextcloudpi-config

You can access your private Nextcloud just typing the IP or URL in the navigation bar of your browser. It will redirect you to the HTTPS site


The admin user is ncp, and the default password is ownyourbits. Login to create users, change default password and other configurations.

You can access the NextCloudPi web panel in HTTPS port 4443. The username is ncp and the password is ownyourbits.


The first run, the easiest is to run the configuration wizard. This is the whole process

USB external drive

By default, your data will be kept in your SD card. You will probably want to connect an external USB drive to your Raspberry Pi in order to host your files.

First, you can format your external drive with the nc-format-USB feature. FAT32 or NTFS filesystems are not supported.

Then, you can enable the nc-automount feature. This will result in your drives being auto-mounted to /media

Finally, set your Nextcloud data folder in the drive using nc-datadir.

Access from outside

In order to access your private cloud from the internet, you should setup a Dynamic DNS, so you can use a domain name that doesn’t change with your public IP.

I use no-ip free plan for my DDNS. The no-ip service is integrated in NextCloudPi.

Also, you need to setup port forwarding in your router so your router sends connections to your Raspberry Pi. For this, you can use the nc-forward-ports  feature ( details ).

You can explore some alternative ways of accessing your files in this post.

Get a trusted certificate

If you want to avoid the “Untrusted Certificate” warning and make everyone’s life easier, get a Let’s Encrypt signed certificate for your DNS domain through nextcloudpi-config or the web interface.

More extras

You can activate and configure the system and any extras from the web interface.

You can also do so from the command line with

sudo nextcloudpi-config

Follow the wiki or the dedicated posts on this blog for details on each entry.

Apache logs for Nextcloud are located at /var/www/nextcloud/data/{access,error}.log .


Please, keep in mind that you will be exposing your own private data to the internet and you are the only person responsible for its security. Update your system frequently to get the latest security updates.

Upon login, you will be notified for new NextCloudPi updates

in order to upgrade to the latest version, type

sudo ncp-update

Try it on QEMU first

You can try NextCloudPi first with  from the last post

sudo ./ NextCloudPi_03-13-17.img


Nextcloud is awesome. It allows us to own and control our information without relying on external companies. These companies could change things outside of our control or even shut down the service and we realize only too late that we do not own the software that we use. Nextcloud is certainly a huge tool to protect our privacy and our data.

The big issue though is that it is a web service, so it needs to run on top of an operating system. Setting that up implies long hours of installation, dealing with package versions, configuration and troubleshooting. Many people are not willing or do not have the knowledge to accomplish this task, and I think it is a big reason why it is not that popular outside of the geek niche.

I thought it would help to facilitate already configured images to the public with Nextcloud included, so I automated the process. Let’s go for it!

In the last post we learned how to use  to launch Raspbian on a QEMU virtual machine. We will use this to automatically generate a Raspbian image with Nextcloud 12 installed.

I recommend to setup  to use a static MAC address so you can always get the same IP through DHCP after each reboot. This is important to automate the process, and for that reason it comes as the default configuration.

Write down the IP that your Raspbian gets from DHCP, and launch

git clone
cd nextcloudpi
./ # change to your QEMU raspbian IP

This will get the code from github, and

  • Download latest Raspbian image.
  • Resize the partition.
  • Update the system.
  • Install Apache with HTTP2, PHP7, Mariadb and all that is needed to run Nextcloud.
  • Install Nextcloud.
  • Configure the system.

You can use your own image by setting DOWNLOAD=0 at the top of the script. You can also choose between Raspbian or Raspbian Lite by setting the IMG variable. See the code for details.

At the end of the process you end up with an image that you can write on an SD card and use on your Raspberry Pi.

The good thing about this method is that it is an automated process, so we can easily produce newer versions as Raspbian, Apache and Nextcloud receive updates.

Also note that you can change the following parameters at the top of


This was tested on Raspberry Pi 2 and Raspberry Pi 3.


The basic configuration and optimizations are already in place, so there are no warnings on the Admin section. We can see that we are using the recommended cron method.

Nextcloud main settings

Also, you can see the default maximum upload size to a sane value of 1G by default. PHP operations time out at one hour. This is important to allow for long uploads and downloads for big files or slow connections.

Other settings

In order to test that you are using HTTP2, look for X-Firefox-Spdy: h2  in the network tab.

HTTP2 test

PHP configuration

PHP Zend OPCache Settings
PHP ACPU settings

If you have ever manually configured a Nextcloud instance, the auto-configuration parameters by default are equivalent to this

Nextcloud default configuration



# Nextcloud installation on Raspbian through SSH
# Tested with 2017-01-11-raspbian-jessie.img (and lite)
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
# Usage:
#   cat | sshpass -praspberry ssh pi@$IP
# Notes:
#   Upon each necessary restart, the system will cut the SSH session, therefore
#   it is required to save the state of the installation. See variable $STATE_FILE
#   It will be necessary to invoke this a number of times for a complete installation

sudo su


set -x
set -e

test -f $STATE_FILE && STATE=$( cat $STATE_FILE 2>/dev/null )
if [ "$STATE" == "" ]; then


  SECTOR=$( fdisk -l /dev/sda | grep Linux | awk '{ print $2 }' )
  set +e 
  echo -e "d\n2\nn\np\n2\n$SECTOR\n\nw\n" | fdisk /dev/sda
  set -e

  echo 0 > $STATE_FILE 
elif [ "$STATE" == "0" ]; then

  resize2fs /dev/sda2

  apt-get update
  apt-get upgrade -y
  apt-get dist-upgrade -y
  apt-get autoremove

  echo 1 > $STATE_FILE 
elif [ "$STATE" == "1" ]; then


  echo "deb stretch main contrib non-free rpi" >> /etc/apt/sources.list
cat > /etc/apt/preferences <<EOF
Package: *
Pin: release n=jessie
Pin-Priority: 600
  apt-get update


  apt-get install -t stretch apache2 -y
  apt-get install -t stretch php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip -y
  apt-get install php7.0-APC -y
  apt-get install libxml2-dev php-zip php-dom php-xmlwriter php-xmlreader php-gd php-curl php-mbstring -y

  debconf-set-selections <<< "mariadb-server-5.5 mysql-server/root_password password $DBPASSWD"
  debconf-set-selections <<< "mariadb-server-5.5 mysql-server/root_password_again password $DBPASSWD"
  apt-get install mariadb-server php7.0-mysql -y


  cat >/etc/apache2/conf-available/http2.conf <<EOF
Protocols h2 h2c http/1.1

H2Push          on
H2PushPriority  *                       after
H2PushPriority  text/css                before
H2PushPriority  image/jpeg              after   32
H2PushPriority  image/png               after   32
H2PushPriority  application/javascript  interleaved

SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on

  cat >> /etc/apache2/apache2.conf <<EOF
<IfModule mod_headers.c>
  Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"

  cat > /etc/php/7.0/mods-available/apcu.ini <<EOF

  cat > /etc/php/7.0/mods-available/opcache.ini <<EOF

  a2enmod http2
  a2enconf http2 
  a2enmod proxy_fcgi setenvif
  a2enconf php7.0-fpm
  a2enmod rewrite
  a2enmod headers
  a2enmod env
  a2enmod dir
  a2enmod mime
  a2enmod ssl
  a2ensite default-ssl


  cd /var/www/
  wget$VER.tar.bz2 -O nextcloud.tar.bz2
  tar -xvf nextcloud.tar.bz2
  rm nextcloud.tar.bz2
  mkdir /var/log/nextcloud
  mkdir /var/www/nextcloud/.opcache


  printf "Creating possible missing Directories\n"
  mkdir -p $ocpath/data
  mkdir -p $ocpath/updater

  printf "chmod Files and Directories\n"
  find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
  find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750

  printf "chown Directories\n"
  chown -R ${rootuser}:${htgroup} ${ocpath}/
  chown -R ${htuser}:${htgroup} ${ocpath}/apps/
  chown -R ${htuser}:${htgroup} ${ocpath}/config/
  chown -R ${htuser}:${htgroup} ${ocpath}/data/
  chown -R ${htuser}:${htgroup} ${ocpath}/themes/
  chown -R ${htuser}:${htgroup} ${ocpath}/updater/
  chown -R ${htuser}:${htgroup} ${ocpath}/.opcache/

  chmod +x ${ocpath}/occ

  printf "chmod/chown .htaccess\n"
  if [ -f ${ocpath}/.htaccess ]
    chmod 0644 ${ocpath}/.htaccess
    chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
  if [ -f ${ocpath}/data/.htaccess ]
    chmod 0644 ${ocpath}/data/.htaccess
    chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess

  cat > /etc/apache2/sites-available/nextcloud.conf <<EOF
Alias /nextcloud "/var/www/nextcloud/"

CustomLog /var/log/nextcloud/access.log combined
ErrorLog /var/log/nextcloud/error.log

<Directory /var/www/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All

  <IfModule mod_dav.c>
    Dav off

  SetEnv HOME /var/www/nextcloud
  SetEnv HTTP_HOME /var/www/nextcloud
  a2ensite nextcloud

  mysql -u root -p$DBPASSWD <<EOF
GRANT ALL PRIVILEGES ON nextcloud.* TO $DBADMIN@localhost;

  cd /var/www/nextcloud/

  sudo -u www-data php occ maintenance:install --database \
  "mysql" --database-name "nextcloud"  --database-user "$DBADMIN" --database-pass \
  "$DBPASSWD" --admin-user "$ADMINUSER" --admin-pass "$DBPASSWD" 

  sudo -u www-data php occ background:cron

  sed -i '$s=^.*$=  '\''memcache.local'\'' \=> '\''\\OC\\Memcache\\APCu'\'',\n);=' /var/www/nextcloud/config/config.php

  sed -i "s/post_max_size=.*/post_max_size=$MAX_FILESIZE/"       /var/www/nextcloud/.user.ini 
  sed -i "s/post_max_size=.*/upload_max_filesize=$MAX_FILESIZE/" /var/www/nextcloud/.user.ini 
  sed -i "s/post_max_size=.*/post_max_size=$MAX_FILESIZE/"       /var/www/nextcloud/.htaccess
  sed -i "s/post_max_size=.*/upload_max_filesize=$MAX_FILESIZE/" /var/www/nextcloud/.htaccess

cat >> /var/www/nextcloud/.htaccess <<EOF
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteRule ^/?(.*) https://%{SERVER_NAME}/nextcloud/$1 [R,L]

  echo "*/15  *  *  *  * php -f /var/www/nextcloud/cron.php" > /tmp/crontab_http
  crontab -u www-data /tmp/crontab_http
  rm /tmp/crontab_http

  cat > /usr/local/bin/ <<'EOF'
IFACE=$( ip r | grep "default via" | awk '{ print $5 }' )
IP=$( ip a | grep "global $IFACE" | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 )
cd /var/www/nextcloud
sudo -u www-data php occ config:system:set trusted_domains 1 --value=$IP

  mkdir -p /usr/lib/systemd/system
  cat > /usr/lib/systemd/system/nextcloud-domain.service <<'EOF'
Description=Register Current IP as Nextcloud trusted domain

ExecStart=/bin/bash /usr/local/bin/

  systemctl enable nextcloud-domain


  apt-get autoremove -y
  apt-get clean
  rm /var/lib/apt/lists/* -r


# License
# This script is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this script; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA  02111-1307  USA

# Nextcloud installation on QEMU emulated Raspbian image
# Tested with 2017-01-11-raspbian-jessie.img (and lite)
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
# Usage:
#   ./ <IP> # Use the IP of your running QEMU Raspbian image
# Notes:
#   Set DOWNLOAD=0 if you have already downloaded an image. Rename it to nextcloudpi.img

IP=$1          # First argument is the QEMU Raspbian IP address
DOWNLOAD=1     # Download the latest image
EXTRACT=1      # Extract the image from zip, so start from 0
IMGFILE="NextCloudPi_$( date  "+%m-%d-%y" ).img-stage0"
IMGOUT="NextCloudPi_$( date  "+%m-%d-%y" ).img"


[[ "$DOWNLOAD" == "1" ]] && { wget$IMG -O $ || exit; }
[[ "$DOWNLOAD" == "1" ]] || [[ "$EXTRACT"  == "1" ]] && {
  unzip $ && \
  mv *-raspbian-*.img $IMGFILE && \
  qemu-img resize $IMGFILE +1G || exit

launch_install_qemu $INSTALL_SCRIPT $IMGFILE $IP || exit
pack_image $IMGFILE $IMGOUT

# License
# This script is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this script; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA  02111-1307  USA



Raspbian on QEMU with network access


Author: nachoparker

Humbly sharing things that I find useful [ github dockerhub ]


  1. Hey I’m trying to run this locally and I keep getting “invalid certificate.” It seems to be forcing all traffic through 443. Is there any way I can make it so http traffic is allowed? Or maybe I could have valid certs for local traffic somehow? While I’m messing with it I’d rather be able to make sure everything is secure and set up before opening it up to the world and I can get it a domain name.

    1. [EDIT] `nextcloudpi-config` now has an option to disable forcing HTTPS

      I like having secure defaults. If you are only going to use it in your local network it is not such a big deal, but make sure to go back to HTTPS one you have your public domain.

      In any case, even if you have HTTPS with an untrusted certificate, you can just add an exception on your browser. When you have your domain, follow the instructions for Let’s Encrypt on the “advanced configuration” section to get trusted HTTPS

  2. After running:

    sudo su
    DIR=/media/USBdrive/ncdata   # adjust this line
    service apache2 stop
    cp -ra /var/www/nextcloud/data/ $DIR
    cd /var/www/nextcloud
    sudo -u www-data php occ config:system:set datadirectory --value=$DIR
    service apache2 start

    I receive this error:

    Data directory (/mnt/Store/ncdata) is invalid
    Please check that the data directory contains a file “.ocdata” in its root.

    1. I just re-checked it and it works for me. Are you sure that the directory exists? Make sure to modify your fstab to mount your USB hard drive on every boot.

      I included the mkdir line in the instructions to make sure that the directory is created if it does not exist (/mnt/Store in your case).

      If we do not do this step, it works fine but everything stays on the SD card which is more limited in space.

      Write the image again on the SD card, then set up the USB drive mount to /mnt/Store, then copy and paste the instructions again. It should work

      1. Don’t know what happened on the first run. Started from scratch, mounted USB drive, and ran the lines, all good now. Raspi sitting next to the router attached to an old 2TB drive for Nextcloud with the data being rsynced to raid array. Cheers!

  3. I love the simplicity of this for newbie’s. I have very thing working well, except the virtual host. I am unsure as to which file I should be adding the lines to.

    need a pointer

    1. Thank you for your feedback

      My intention is that this is as easy to setup as possible, so I will simplify this for the next release, expected to come out tomorrow

      If you do not want to start from zero again, paste this on the command line

      sudo su
      cat > /etc/apache2/sites-available/000-default.conf <<'EOF'                                                                                                                                                                                    
          RewriteEngine On
          RewriteCond %{HTTPS} !=on
          RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
      cat > /etc/apache2/sites-available/nextcloud.conf <<'EOF'
          DocumentRoot /var/www/nextcloud
          CustomLog /var/log/nextcloud/access.log combined
          ErrorLog /var/log/nextcloud/error.log
          SSLEngine on
          SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
          SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
      a2dissite default-ssl
      service apache2 reload

      There is information about virtual hosts here

  4. Hi Nachoparker,

    I tried the method you described above for transferring the nextcloud data directory to an external USB drive, but there is still a problem, here is the listing of my try. Note that my nextcloud data directory is in /var/nextcloud/data.

     sudo su
    root@server1:/home/master# DIR=/mnt/nextcloud/data
    root@server1:/home/master# service apache2 stop
    Warning: Unit file of apache2.service changed on disk, 'systemctl daemon-reload' recommended.
    root@server1:/home/master# cp -ra /var/nextcloud/data/ $DIR
    root@server1:/home/master# cd /var/nextcloud
    root@server1:/var/nextcloud# sudo -u www-data php occ config:system:set datadirectory --value=$DIR
    Could not open input file: occ

    Any suggestions? Note that my USB drive is mounted at /mnt/nextcloud/…

    1. you are using /var/nextcloud. If you used my image you should be using /var/www/nextcloud. You have to be on the nextcloud installation folder for this line to work

      sudo -u www-data php occ config:system:set datadirectory –value=$DIR

      1. I have not installed nextcloud from your distribution, so you don’t have to answer. In any case my nextcloud works perfectly well as long as the data directory is on the sd card. It sits at /var/nextcloud/data on the sd card. The problem is how to tell nextcloud that the data directory should now be at /mnt/nextcloud/data which sits on an external USB drive… Thanks

        1. Ok, I see

          Then it should be just a matter of doing

          sudo su
          mkdir -p /mnt/nextcloud
          cp -ra /var/nextcloud/data /mnt/nextcloud
          service apache2 stop
          cd /var/nextcloud
          sudo -u www-data php occ config:system:set datadirectory –value=/mnt/nextcloud/data
          service apache2 start

          another way of doing the same thing would be to edit `/var/nextcloud/config/config.php` and changing the line of `datadirectory`

          'datadirectory' => '/mnt/nextcloud/data',

        2. Thanks for your help. Alas I had already done it both ways exactly as you describe. I think the problem is that the config.php file on my installation sits at /var/www/html/nextcloud/config, not in /var/nextcloud.

          As I said everything works fine if all is on the sd card, specifically data in /var/nextcloud/data and the config.php file in /var/www/html/nextcloud/config, again on the sd card. The reason the data directory was moved to /var/nextcloud comes from a suggestion that this is more secure… Here is theexplanation and the URL follows

          Secure the Nextcloud Data Directory

          It is highly recommended to make Nextcloud more secure by moving the “data” directory to a secure location. Let’s move it to /var/owncloud/data. That will prevent any unauthorized users from accidentally gaining access through the web browser.

          Move the data directory:
          $ sudo mkdir -p /var/nextcloud
          $ sudo mv -v /var/www/html/nextcloud/data /var/nextcloud/data

          Configure the new data location into Nextcloud. Using vi or another editor of your choice, edit the configuration file. Make a backup copy first, just in case there is a mistake with the edit:

          $ cd /var/www/html/nextcloud/config
          $ sudo cp -p config.php
          $ sudo vi config.php

          Change this line:

          ‘datadirectory’ => ‘/var/www/html/nextcloud/data’,
          to this:

          ‘datadirectory’ => ‘/var/nextcloud/data’,
          Be careful not to delete the comma at the end of the line. Save the file and exit the editor.

          Many thanks

  5. Very nice! Thanks for the work! One question, in what file would I add the

      RewriteEngine On
      RewriteRule   ^/$  /nextcloud/  [R=301,L]

    to redirect?

    1. See the answer to lstehr question above.

      I am uploading the new version right now anyway (2-18-17), so if you copy the new one to the SD card you won’t have to do that.

      In the new version, you access nextcloud by typing the IP or URL in the browser, do not need to specify `https://`, nor include `/nextcloud`

    1. The image is built to be run on the Raspberry Pi, so you can copy it from windows or linux, it does not matter.

      I do not use Windows myself, so I cannot recommend you a solution. Maybe another reader can, or maybe Google can help you 😉

      EDIT: added etcher as a recommendation to the post

  6. First, thanks a lot for publishing this great piece of work!

    I used to set up owncloud myself on a raspberry pi, but it was always hard and time-consuming to set up and maintain. Now I consider using your nextcloud image. I have one question:

    How will updating work? In particular, how to keep nextcloud up to date? Will it update with the usual apt-get upgrade?

    1. Hello, you are very welcome 🙂

      Well, if you look at the installation code I basically take the latest files from Nextcloud, so the installation is manual.

      As per the official docs,

      There are two options
      1) “Updater” app, which is a Nextcloud App. I have not tried this yet but I will try it first thing when NC 12 comes out. I will let you guys know how it goes if you follow the blog.
      2) Manual upgrade, using

      sudo -u www-data php occ upgrade

      3) I will continue releasing images, so when NC 12 comes out I will release another ready to copy image. If your data folder and database are on an external USB drive that could be relatively easy(or not).

      There is no raspbian package for Nextcloud that you can `apt-get install` as far as I know.

      Nextcloud’s weakest point is probably upgrading. Not an easy process for sure.

      I hope this all makes sense.

      1. Thanks for the swift clarification! Yes, this all makes sense. If the updater app works as expected, it will be great improvement over previous (owncloud) versions. Let’s hope for the best 😉

        Again: thanks for sharing!

        1. Update:

          a new minor release came out. In my first test using the updater app, there are a couple things to adjust for this to work out of the box.

          I will get them fixed for the upcoming release


          Update: it works on the latest release

  7. Thank you!!!!!!!!!!!!!!!

    The easiest tutorial for installing nextcloud on raspberrypi using https in the net.

    And (a little detail) it works!

  8. Hello! I am a total noob at all this stuff. I used your image and for the most part it is OK. I can’t seem to change the max file upload and download size. How do I do that? Thanks!

    1. [EDIT: `nextcloudpi-config` can now configure this with the `nc-limits` option

      in the files `/var/www/nextcloud/.user.ini` and `/var/www/nextcloud/.htaccess`

      you can use the following piece of code. Paste in the terminal

      sudo su
      MAX_FILESIZE=5G              # change this if you want. This is 5 Gigabytes
      sed -i "s/post_max_size=.*/post_max_size=$MAX_FILESIZE/"       /var/www/nextcloud/.user.ini
      sed -i "s/post_max_size=.*/upload_max_filesize=$MAX_FILESIZE/" /var/www/nextcloud/.user.ini
      sed -i "s/post_max_size=.*/post_max_size=$MAX_FILESIZE/"       /var/www/nextcloud/.htaccess
      sed -i "s/post_max_size=.*/upload_max_filesize=$MAX_FILESIZE/" /var/www/nextcloud/.htaccess

      I have not tested more than 2GB

      1. Hmmmm. I must be doing something wrong. Still not allowed to change it in next cloud and it is stuck at 1GB.

        1. Ok, I spotted the problem. There was a typo in my build scripts that I even copy-pasted to you without noticing. The right command is

          sudo su
          MAX_FILESIZE=5G              # change this if you want. This is 5 Gigabytes
          sed -i "s/post_max_size=.*/post_max_size=$MAX_FILESIZE/"             /var/www/nextcloud/.user.ini
          sed -i "s/upload_max_filesize=.*/upload_max_filesize=$MAX_FILESIZE/" /var/www/nextcloud/.user.ini
          sed -i "s/post_max_size .*/post_max_size $MAX_FILESIZE/"             /var/www/nextcloud/.htaccess
          sed -i "s/upload_max_filesize .*/upload_max_filesize $MAX_FILESIZE/" /var/www/nextcloud/.htaccess

          Any way, I am currently including this in `nextcloudpi-config` for the next release. It will be easier that way for everyone

      1. Yes…I did both those things. But when I enter your commands it seems to make that dir on the micro SD card. The drive is auto mounting. but I am not super clear on what steps to check to force it to use the the drive on sda2. Thanks so much!

        1. Here is what it says:

          /dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered)
          devtmpfs on /dev type devtmpfs (rw,relatime,size=469532k,nr_inodes=117383,mode=755)
          sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
          proc on /proc type proc (rw,relatime)
          tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
          devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
          tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
          tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
          tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
          cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
          cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
          cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
          cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
          cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
          cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
          cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
          systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
          debugfs on /sys/kernel/debug type debugfs (rw,relatime)
          mqueue on /dev/mqueue type mqueue (rw,relatime)
          configfs on /sys/kernel/config type configfs (rw,relatime)
          /dev/sda1 on /home/pi/RAID1 type vfat (rw,nosuid,relatime,sync,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
          /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)

        2. Okay, I can see that your drive is mounted at `/home/pi/RAID1`

          Suppose you want to use the folder `ncdata` inside your hard drive. This folder does not exist yet. Paste the following

          sudo su
          service apache2 stop
          mkdir -p `dirname "$DIR"`
          cp -ra /var/www/nextcloud/data/ $DIR
          cd /var/www/nextcloud
          sudo -u www-data php occ config:system:set datadirectory --value=$DIR
          service apache2 start

          Then, your private cloud data will be in the `ncdata` folder inside your external drive.

          I will also make this easier in the next release

  9. I’ve done it the other way around I installed the image without fail2ban and it worked for me. Trying to setup fail2ban but I’m missing something and not sure what I’m doing wrong so I’ll wait for this new image to save me the headaches.

    Great work by the way. 🙂

  10. Does this really work on either a RPi2 or RPi3? I thought that they would need different kernels.

    1. Well… it does… 😉

      Very nicely done. And quite fast, too. I wonder, if I could just replace my old setup with this one. However, my current installation is setup against LDAP and also hosts its data and database on a different server. I think, I should be fine by just copying over the config.php.

      Again, great piece of work!

  11. I want to use this for my Pi zero W that came yesterday. After writing the image to the SD card, putting a ssh.txt file to the root of the SD card in order for ssh access and after mounting the written SD card and altering /etc/network/interfaces before booting up the pi so that it uses the correct wlan connections and settings i cannot get a ssh connection to the pi. i also do not see it when using a dhcp scanner. does this image work on the pi zero w? the process of ssh.txt and interface file editing does work with the original image of rasbpian.

    1. Hello,
      I have not tested this with a Raspberry Pi Zero or an original Raspberry Pi, but it should work. It will be quite slow though. I was running Owncloud on my RPi B before RPi 2 came out and it was usable… but very slow. The zero has a bit more power.
      I will test it on zero when I have time. Also any feedback is welcome.
      To answer to your questions… the procedure for activating SSH with the ssh.txt file should work (see ).
      From the top of my head, in order to get network access you can edit `/etc/dhcpcd.conf`, and include something like this

      #Custom static IP address for eth0.
      interface eth0
      static ip_address=
      static routers=
      static domain_name_servers=

      It should come up as ``. I am writing this without testing it, just a pointer 🙂

      1. I will try this, thanks! Will report back if it works. I did not think of altering the dhcpd.conf but instead changed the entries in the /etc/network/interfaces file. Maybe that is why i do not get a connection (and this would explain the non working ssh also)

  12. So. your image does boot up on my pi zero w, but it won’t bring up wlan0. I guess there is a driver problem. Is your image based on Debian 9 stretch instead of the current stable branch? I booted up Debian 8 jessie on my zero w and wlan worked without problems, but as soon as i upgraded to stretch testing branch, the wlan also broke there. So I guess it is not a problem with your image in particular, but with Debian 9 stretch branch as for now. As the wlan chip on the zero w an the rpi 3 B are the same, the problem should occur on the rpi 3 also though. Anyone can confirm that or can anyone provide a solution?

    1. Debian 8 based, a release from Feb (about to release an update though)

      I have not had the opportunity to get my hands on a zero w yet, but what you say makes sense: same chip, so should work just the same.

      What is the output of `ip link` and `iw dev wlan0 info` and `ethtool -i wlan0`?

      (need to sudo apt-get ethtool)

      1. Fixed it! Copied the contents of /firmware/bcm…. directoy of a backup of jessie to the directory in stretch and overwrote the files there. now wlan works again. so this is a thing if one upgrades to stretch. Next thing to try is to copy these backup files to your image and see if that also fixes wlan in your image for my zero w.

  13. Can’t get your image to work correctly with the zero w. It does not bring up wlan0 at boot, always says “device not found” or “there is no such device”. I guess the wlan-driver is not loaded at all or can’t be loaded. Maybe this has something to do with the kernel in your image? I already installed the firmware for the wifi-chip (same as rpi3) and also copied over existing files in /firmware/brcm to the zero w from an original raspbian 8 image to your image (on the original raspbian image, the zero w works with wifi). still no success. Did you change the kernel in your image?

    Btw: These are the drivers that are used for the wlan/BT chip on the rpi3/zero w:

    1. I can tell you that raspbian didn’t enable wifi or bluetooth for Jessie in June. I don’t know about before that. So what you need to do is to go into your /boot and add ssh.
      If you have a male to female USB adapter, life might be easier than I had it…

      Anyway, that’s just pi0w info – you can enable your wifi and add ssh.
      Then, you should be good.

  14. Hello,

    I have a single RPI3 that I use as a multimedia center with OSMC, and would like to have Nextcloud on it too. Do you think you will do in the future an image based on OSMC instead of Raspbian lite, or do you have some pointers on how can I do it myself?


    1. I do not think I will create an image based on OMSC, but I do publish the code for building and configuring Nextcloud. If you follow the instructions above, you can install NexCloud on you any Raspbian based image!

  15. Why not Nginx ? It seems that Nginx , especially for small device’s like the PI is more suited.

    I’s searching all over the net to find a good tutorial “how to:

    raspbian lite

    and so on,,, Your write up is very close, but lack’s Nginx
    Would love to see the “perfect” tutorial for a nextcloud installation that can be used live with a hostname for example

    1. Well, nginx really shines in high load high concurrency situations. In this case you will not see a difference.

      I chose apache because it is what I was already using, and because it had easier support for HTTP2 at the time. If you really want to use nginx, just follow the rest of the building script. I share all the code.

      In any case, I have many plans for this blog. I already am starting to build some dockers that I plan to use on RPi. Nginx included. I want to experiment with lighttpd to see if I can make it work with Nextcloud, if you pull the container you will see that it is only 67.8 MB, so about a 10 MB increment from minidebian!

      Also, Let’s Encrypt is the next thing I am going to include in nextcloudpi-config

      Stay tuned!

      1. Hi men!
        Great guide and well scripted.
        I have a question about the HTTP2 mod on the latest raspbian Pi3. When I try to install the HTTP2 module on the lastest apache from the default disto I get the following error message:

        sudo a2enmod http2
        ERROR: Module http2 does not exist!

        How did you solve this problem?


  16. Thanks, awesome work!

    I came across your site by accident, I was looking for something to lets say pre-configure an image like Raspbian or whatever. All this so I would be able any time to replicate my current setup just in case something goes wrong.

    I’ve look at Nextcloud before, among numerous other possible solutions, such that I could access my PI from anywhere and show off photos of my little girl on whatever system. Like you I’ve got myself a domain name from and my router provides an auto update feature for noip, easy. After a zillion tries, I found setting for my monitor that works fine so I burn the image from my WIN 10 PC and replace the config.txt file with my version. Unfortunately for me, I decided to use the BTRFS file system for my 5T USB drive and I intend to get a few more. Anyway, all this to say I’m beginning to have memory problems and I want to setup a quasi fail safe system with redundancy, security and the works. At minimum, 2 PI3 in 2 distinct location and 2 large USB drive (BTRFS) each. Currently I’m setup to boot from a micro-SD card but the root file system is on a USB flash drive (EXT4). I want to be able to rebuild any part of the system as easily as possible.

    Your image file will definitely bring me very close to what I want. I see you provide indications and or snippets for many different options or solutions. For example with LetsEncrypt, I’ll use that one for sure. Just to give another example, I don’t want any of my users to be login all day long idle most of the time so I want to shut them down after some period. It’s not very complicated to do but every time you burn an image you have to start over from scratch. It’s prone to error, it’s very likely you’ll forget this or that and I’m sure you see me coming.

    Does your image provide and or would be easily adapted to self update as much as possible? I mean security wise at minimum? I’d like your advise also on how you would proceed to create a snapshot of the system such that I could (relatively) easily recover from some device failure, be it the PI itself, the card or the USB drives. Yes, it’s possible I’ll never use a micro-SD again and I’ll also go all the way with the BTRFS.

    Thanks again, I’m burning the image as we speak…

    1. well, thanks!

      I am busy right now, so I’ll answer in detail tomorrow ( it’s late here )

      Just wanted to say that 10 minutes ago I released a new image with some improvements. Burn that one instead 😉

  17. I’m glad I tried it and it work fined until I used this code to use :

    sudo su
    DIR=/ncdata   # adjust this line
    service apache2 stop
    cp -ra /var/www/nextcloud/data/ $DIR
    cd /var/www/nextcloud
    sudo -u www-data php occ config:system:set datadirectory --value=$DIR
    # the above line causes this response:
    "Cannot load Zend OPcache - it was already loaded Could not open input file: occ"
    service apache2 start

    I have install letsencrypt certs and dnsmasq as explained above and all seems to work fine, except that the nc data directory doesn’t work now.

    Any idea why?

  18. I tried again one line at a time and here is the result:

    sudo -u www-data php occ config:system:set datadirectory --value=/ncdata
    Cannot load Zend OPcache - it was already loaded
    Data directory (/ncdata) is invalid
    Please check that the data directory contains a file ".ocdata" in its root.
    An unhandled exception has been thrown:
    Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:144
    Stack trace:
    #0 /var/www/nextcloud/console.php(89): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #1 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
    #2 {main}

  19. After using the full img and using raspi-config to get a desktop after installing lightdm. There is no possibility to log in with the user pi. Wether you’ve changed the passwd or not

    1. Your issue is a Raspbian Lite issue, so I cannot help you right now. When I have time I will include the steps to get a desktop environment, but as of now that is out of scope.

      I suggest you look for the correct procedure to install and start a desktop environment in Raspbian Lite, as it ships without one.

  20. I’d like to add some observation and comments if I may, hopefully constructive.

    Yesterday, I burn the full image using win32diskimager, booted up the new image and then ran raspi-config to setup a few things, password, etc.

    All of this directly from PI but through SSH. When I came to the nextcloudpi-config part above (usage) the only choice I add where dns-masq and no-ip scripts. Why not the same as we see above?

    I notice you practically always refer to QEMU and if I’m not mistaking this mean one need another machine with some linux distro, right?

    Just when I installed the 2-18-17 version you where uploading behind the scene the 3-13-17 version and unless I mist something really big this would mean all of us would have to start over from scratch, yes?

    This is one of the reason I was searching for some mean to at minimum be assisted in some way to install and especially configure the packages and or services one need, by this I mean passwords (so your first login is with the proper password), the services I want to run like say ssh +++ setting it properly, everyone agrees, passwords is not a good idea so why not configure it right away for public key or at least having the choice. Maybe, yes password login but setup firewall for ssh over LAN only. One last thing, IMHO I don’t think most people will stay on a SD card file system for very long, a single video would bust most of the available space from the start. Why not have the possibility to set this up before installing nextcloud and even the complete web server for that matter. By this, either use an existing drive or drives, format it if necessary and set it up in fstab. Then go one.

    You obviously put a lot of effort into this and I don’t want you to think I don’t appreciate your work. I also know the one size fits all theory doesn’t work either but I recall some 40 years back when I installed my Redhat distribution on my my super duper Intel 386 with 256K + 256K ext of memory. All of these thing I speak above (almost) where part of the installation process, so why not have the same or similar for the PI. I almost forgot, that included setting locale, time zone, keyboard and many other stuff before your first login.

    I’m curious as well if it would be possible to “UPGRADE” instead of starting over each time you produce a new version? I know, much more work, just some thought.

    Thanks a million,

    PS. I don’t see a donation button anywhere here. Ounce I’m all setup and running I would certainly give something. I would go as far as proposing my help for translating stuff in French if it’s any help for others here.

    1. Hello Yves,

      First, thank you for your encouraging words and feedback.

      You wrote about many things! so I’ll try to answer to things one by one.

      First, this is an ‘in progress’ project.

      It is already usable but I am not done yet, so there are things that might change over time. Feedback that people like you provide is really valuable for me to realize what is more important for people.

      The first reason I started to do this is that for the third time I want to upgrade from owncloud and it is such a pain that I decided I could do it in an automated way and share the result.

      Many people would use this but lack the knowledge or time to do it. NC is a great product but it needs an underlying system (such as Raspbian). I figured I could help spread it this way.

      I am kind of planning things as I go, and seeing what people’s response is. For instance, I realised that many people struggle with setting things up in Linux, and that is why I came up with `nextcloudpi-config`

      With this I mean to say (again) that this is still in a maturing process and that is why the old release did not contain everything in `nextcloudpi-config`.

      I do plan now to work on figuring out some easy way to upgrade the system so people’s clouds get the latest security updates. As for NextCloud, the latest release was fixed to allow for upgrading using the `updater` app from NC.

      I still do not know how I will do it exactly, but I have some ideas.

      The next things I have in mind are

      – auto-upgrade for security
      – let’s encrypt in nextcloudpi-config
      – automount USB drives

      When that is working I do not know if I will continue adding things or not. (suggestions welcome). This means that until then, things can change (improve) quite a bit from release to release. In any case, you do not need to start from scratch to get the latest thing, as you can use the `` method to add my new things to your working image on a running RPi.

      I do not know if it makes sense. For example, imagine you are using the latest image, and then I come up with Let’s Encrypt and add it to my next release. You can always just add it to your working image without starting from zero by updating my git repo and running `./` (assuming that is your RPi IP).

      I’ll say that again because I want it to be clear for everyone.

      People that already are running NextCloudPi can just use and keep adding the latest things to their running setup. There is no need to start over 🙂

      You mention you had some problems moving the data folder. A bunch of people have come to me asking for help with this. Get the latest release. You can configure it from nextcloudpi-config. I have tested it in all cases I could think of, but of course if someone finds something just tell me.

      I do ask everyone to be patient. This all takes a lot of my time and I do my best to listen to what you say, but there is only so much time I can dedicate to this. I will get there, but not immediately.

      Talking about a data redundancy system I have a basic thing set up myself using raspberry pi and mirror USB drives. It is very basic, but I want to post about this at some point. I’ll make a post about this using rsync and brtfs, maybe write some little util. Again, when I am done wit Nextcloudpi

      QEMU is a virtual machine where I run Raspbian. I use it for testing and for building images (see my Raspbian on QEMU post). You do not need it for using Nextcloudpi on a Rasberry Pi.

      I am really flattered about your offer to help and donate. I do not accept donations because I just write this blog to spread what I like and what I consider good for people from the field of technology, like owning and controlling your own private data. Just that. Many thanks anyway!!!


  21. Hi,

    I would add a step in your installation instructions to first unmount the disk, like this: sudo diskutil unmount /dev/sdx

    Otherwise you will receive a resource busy error message.

  22. Hi,

    I’m trying to connect an external USB drive to store my data. I have mounted the drive (ext4) under /mnt/nextcloud. Then I have changed my config. php file to point the datadirectory to that location.

    For /mnt/nextcloud I have changed the owner to www:data recursively. I have also changed the permissions recursively to 700.

    In the NextCloud UI, I’m getting a ‘Data directory (/mnt/nextcloud) not writable’ error message. Just to test, I have given the /mnt/nextcloud dir a 777 permission, but the error message is always there (note I restart Apache each time, just in case).

    I have no idea what could be wrong here. Can you help me with this?

  23. I am using this amazing piece of software on a RPi3. I observe high ongoin cpu load (>3) generated by php-fpm. What do I need to change in the configuration to lower the cpu load and have a more responsive setup?

    1. can you explain what you mean by high CPU load?

      If I use it non-stop changing dirs, loading content and such I cannot get php-fpm over 40% CPU in brief spikes. I can only saturate the system to 1.6 load average like this.

      During an upload, the apache process can take up to 50% of the CPU in my testing. Up to 70% during a download

      I consider all this normal. NC is pretty responsive to me.

      What is your setup? have you changed the data directory or made any other changes? what class is your SD card?

  24. Thanks for your Raspberry Pi image for Nextcloud. I really hope the next version Raspberry Pi supports USB 3. Currently, Raspberry Pi 3 only has USB 2, it makes me concern the I/O speed when installing Nextcloud on Raspberry Pi.

    1. In my experience performance is pretty decent for private use. If you have a spare SD card just try it! it takes two minutes to have NextCloudPi working 😉

  25. Hi,

    Thank you for this image! I am trying to install the nextcloud app passman so i can replace lastpass. It won’t get past, and hangs when creating a new vault. I tried the passman demo and creating a new vault took 2 seconds. Is this a permission problem or something of the kind?, and how do i fix it?

    Thanks in advance!

    1. Hello,
      I have not tried that App but NextCloudPi is just a normal NextCloud, so it shouldn’t be different from other NextCloud installations.

      Do you have any extras installed or custom configurations? Did you activate modsecurity? I recommend to disable it whenever we are installing new apps or if we find something weird.

      It comes disabled by default

  26. When uploading anything over 2mb (i think) i get a error; request entity too large displayed in my browser.

    I tried;

    sudo su
    MAX_FILESIZE=5G              # change this if you want. This is 5 Gigabytes
    sed -i "s/post_max_size=.*/post_max_size=$MAX_FILESIZE/"             /var/www/nextcloud/.user.ini
    sed -i "s/upload_max_filesize=.*/upload_max_filesize=$MAX_FILESIZE/" /var/www/nextcloud/.user.ini
    sed -i "s/post_max_size .*/post_max_size $MAX_FILESIZE/"             /var/www/nextcloud/.htaccess
    sed -i "s/upload_max_filesize .*/upload_max_filesize $MAX_FILESIZE/" /var/www/nextcloud/.htaccess

    followed by a reboot but that didn’t fix it. ;/

    1. Hello,

      You do not need to use that code anymore. You can configure that in the `nc-limits` section of `nextcloudpi-config`

      Try from

       sudo nextcloudpi-config 

      In any case, I have successfully uploaded big files, for instance, 500 MB. I have never seen that error before. I do not think it is related to the upload limits. In general you can upload things up to ~700 MB according to my testing.

      Again… did you enable modsecurity in `nextcloudpi-config` by any chance? Any configuration? Did you move the data dir to an external USB? how big is your SD card?

      Can you copy the exact error message or provide a screenshot?

      1. Yes, I have moved the NC data to /data/ncdata, afterward I changed the limits in the next cloud piecing it. The error happened and then I added the code I pasted above. I also have modsecurity installed. Where can I find the log?

        1. Thank you!!

          I just disabled modsecurity and both my problems are gone, i can upload according to the nextcloudpi-config settings and passman works.

          Damnit, sorry! Going to read your references on the subject cuz i feel like an idiot.

        2. haha I am glad it works

          modsecurity needs more testing as people install Apps, I need to refine the rules gradually and that is why it is marked as experimental.

          If anyone runs into an issue like this, it would be awesome that they explain what App they were trying to install or what operation they were trying to perform and failed, and post the contents of `/var/log/apache2/modsec_audit.log`

  27. Hi,
    I’ve just installed your image and I’m impressed with how it has gone.
    I am however having difficulty connecting to my wifi network, which is important to me.

    I’m using a new raspi 3 model b with an external self powered usb drive. I have static IP addresses set at my router, and the address for this mac address is
    Everything works fine until I use nc-wifi when I select ok to choose a network, no networks are found.

    My /etc/network/interfaces file looks like this:

    # interfaces(5) file used by ifup(8) and ifdown(8)
    # Please note that this file is written to be used with dhcpcd
    # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
    # Include files from /etc/network/interfaces.d:
    source-directory /etc/network/interfaces.d
    auto lo
    iface lo inet loopback
    iface eth0 inet manual
    allow-hotplug wlan0
    iface wlan0 inet manual
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    allow-hotplug wlan1
    iface wlan1 inet manual
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

    and ifconfig wlan section like this:

    wlan0     Link encap:Ethernet  HWaddr b8:27:eb:d3:15:23  
              inet6 addr: fe80::ea4c:5c2b:652b:1269/64 Scope:Link
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    The wifi was working fine when I tried a plain raspbian image, and the ethernet connection works fine now picking up the static address from the router.

    I’m stuck, how do I get the wifi to work?

    1. when you go to `nc-wifi`, hit ‘P’ (for preferences) and in the box “wireless interface” type “wlan0”.

      Hit F10 to save, and then ‘R’ to scan

      I will automate that step on the next release

    1. [EDIT: this manual configuration is not necessary anymore, just use `nc-automount` in `nextcloudpi-config`]

      you have to set it up in `/etc/fstab` to mount at every boot.

      1) write the line in `/etc/fstab`
      2) type ‘sudo mount -a’

      It should now show up. Look up on google “fstab USB drive debian” and you’ll find tons of info.

      I will make this easier on upcoming releases

      1. i figured this out and mounted it to `/media` but how do i get around the permissions?
        i chmoded the mount dir to 775 and also changed ownership to pi but when i try to chdir or ls `/media` i get a permission denied.

          GNU nano 2.2.6                                          File: /etc/fstab
        proc            /proc           proc    defaults          0       0
        /dev/mmcblk0p1  /boot           vfat    defaults          0       2
        /dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
        /dev/sda1       /media          ntfs    defaults          0       0
        # a swapfile is not a swap partition, no line here
        #   use  dphys-swapfile swap[on|off]  for that
  28. the “swapon -s” return
    Filename Type Size Used Priority
    /dev/sda1 partition 67108860 0 -1

    what shoud I put in the “nc-swapfile”? is it /dev/sda1?


    1. Are you using NextCloudPi? if so, you must have changed it to use a partition as swap.

      The default is `/var/swap` and is a swapfile of ~100MB.

      In `nc-swapfile`, type something like `/media/USBdrive/swapfile`, not a partition like `/dev/sda1`.

      You should have a USB drive connected and mounted to `/media/USBdrive` first

  29. Did every thing to mount USB and chmod 770 but I get still an error moving the data and database directory to USB.

    what exactly the permission should be?

    1. moving the data directory only seems to work but still I could not find the directory for the new user that I created on the disk though the files show in web interface. The “admin” user and the files are on the disk.

      I have a 2nd pi that is connected to a hard disk. The data partition is NTFS. And here I got in to permission problem. I get “Please change the permissions to 0770 so that the directory cannot be listed by other users.”

      I have “UUID=F21841E01841A487 /media/nxtclud ntfs-3g nofail,uid=pi,gid=pi,umask=0770 0 0” in fstab.

  30. i got this error on my firefox but i can go through with ie by clicking on trused.

    Your connection is not secure

    The owner of XXX.XXX.X.XXX has configured their website improperly. To protect your information from being stolen, Firefox has not connected to this website.

    also when i tried connecting the nextcloud windows app and the pi it gives me this error. is it ok to tick trust this certificate anyway?
    "Cannot connect securely to XXX.XXX.X.XXX:

    The host name did not match any of the valid hosts for this certificate The certificate is self-signed, and untrusted

    with Certificate raspberrypi Organization: Unit: Country:

    can you explain the error received and possible action i should take? sorry just being paranoid

      1. the tutorial involves me getting a domain in no-ip right? for now i dont have intention on making my server online yet. is there a solution for just local offline?

        1. I am afraid not. Only if a certification authority (CA) verifies that your certificate is valid it can be trusted. That is why it is called third party authentication. You need internet access for the CA to verify that you are who you say you are in the certificate.

          In most cases, just accepting the warnings and adding the exceptions works fine. Most software I have seen allows for use of self-signed certificate.

          It works anyway, it is just that it warns you about that.

    1. well, I am considering including other DDNS clients, but the priority is very low. Other people have asked for duckdns and freemyip.

      I would have to run a poll or something to measure the interest.


  31. thx 4 the quick request. I have think its only a small quick change in a script. but it looks like its problem.
    I also want thanks for your great job. in the moment i let it run on a RPi3. In next time i get the Nextcloudbox and than i put it there. I saw here also a tut how to bind external hdd. If i have problems i think i can ask there.

  32. Hello,
    here some really noobs question
    1. I get next time the Nextcloudbox. So i want to install the NextCloudPi on the card.But i want the accounts and data transfer to the hdd.Maybe after a new installation i have all my data back (Useraccounts and Data are not deleted). Have somebody something like a step by step tutorial how to make this ? I saw the post from Marck Buckmann, but i think this is only to store the data on the hdd, not the accounts. If everything work like i want, what i need to do after a fresh install of the SD ?
    2. I read to change the passwords. OK. pi/raspberry on the pi and admin/ownyourbits in the browser. Do i need change more passwords somewhere ?
    Again, i really happy about your project and the most things are really easy to make.Great great job and support of you.

      1. You can export news(.opml), contacts(.vcf) and calendar/tasks(.ics) and then re-import them.

        I do not think you can export the users though.

        You can also change the database password if you want, but you also have to change it in `/var/www/nextcloud/config/config.php`

        The external drive allows you to use a HDD that appears as a special folder inside your data directory.

        The difference with nc-data is that you move all of your data directory to the USB drive

        1. Hello,
          i think that is what i mean
          “The difference with nc-data is that you move all of your data directory to the USB drive”
          After a new installation of th Card i only need to bind the folder on the hdd and everything is like before.Or?

  33. Thanks a million for providing us with NextCloudPi. It’s great work, and we very much appreciate your effort. Thank you!

  34. Hello! That you for putting this together. Although I am having some issues with the Let’s Encrypt piece, I HAVE had the overall server up and running for about a month, now, and there haven’t been any issues. Keep up the good work!

  35. Thanks for this ready to go .img (so easy to install nextcloud now since I had problems doing it myself, with community tutorials hehe)

    I have problems using an external usb, I tell you what I did:

    lsblk #(to see pluged usb device)
    sudo mkdir /media/usbstick #(to create the mountpoint)
    sudo mount -t vfat /dev/sdb1 /media/usbstick #(to mount)

    In Nextcloud I added the external drive “/media/usbstick” and it shows up green and accesible but it says [You don’t have permission to upload or create files here] 🙁

    I would like to use it as a usb stick to plug and unplug when I want to get files from there.
    Also will be great if it can auto detect when I plug but first part for me is to be able to write or read in it 😀 thank you in advance for any help here.

    1. Automount is the next thing on the roadmap of features

      NextCloud from the point of view of your system is the user `www-data`. You need to make sure that `www-data` has permissions to write/read/access that folder

      Investigate the options to mount vfat, such as `umask`.

      1. Thank you, I’ve found how to, and learnt about umask and chmod/chown options, if anyone looks for this: I’ve set 755 permissions to the mountpoint folder for the nextcloud user www-data, remember to give it also in the fstab with umask:0002 for the automont.

        I havn’t tried to unplug the usb while Nextcloud is active, but will be nice to know if I can plug and unplug as much as I need to while the raspi stills powered on with Nextcloud running and if it won’t break my FS.
        For now I’m doing sudo shutdown -h now and then poweroff the raspi for unpluging the usb

        Now I’m also trying the encryption module, It works great, it doesn’t secure the filenames.

        1. awesome, good job

          for safely unmounting, you would have to `sudo umount /media/USBdrive` (or whatever is the mount point). It will fail if you are using any file at that moment.

          what is the encryption module? some NextCloud app?

  36. every thing is working good. But 16GB SDcard on my pi2 gets quickly filled up though I migrated data and database folders to hard-disk. Checked the file system to see where all the card space is gone and there is a 13.5 GB taken by /var/log/. Is that normal?

    1. wow, that is not normal at all.

      Did you install any extra software?

      Let’s see, what is the output of the following command

      `find /var/log | while read f; do du -s $f; done | sort -nr`

      1. It doesn’t let me Reply to your question again so I quote you here.

        nachoparker says: what is the encryption module? some NextCloud app?

        The moudle (under applications) :
        Default encryption module 1.4.1
        por Bjoern Schiessle, Clark Tomlinson (Licencia AGPL)

        I tested it, works perfect, it is not too secure becouse you can still see the thumbnails created from gallery previews in the thumbnails folder (the community knows and is trying to fix it, for now you have to disable thumbnails)

  37. Noob question. I’m new to linux, so I’m new to setting up fstab or auto mounting/ etc. I have the nextcloud Box setup w/ Pi 3. For nextcloudPi, do I need to- 1.) setup nextcloudPi via its SD card– 2.) fstab? or format? or mount? The WD Labs PiDrive? Any pointers or links to a step by step tutorial would be greatly appreciated. Please & Thanks You.

    1. Actually my recommendation is that you wait for two days until I finish the automount feature. I keep answering this common question, so I think it is better to make it easier for users. I am almost done.
      You can also browse the comments above.

      1) setup stuff through nextcloudpi-config
      2) format to ext4 the HDD
      3) set it up in `fstab`

      In two days (hopefully)
      1) setup through nextcloudpi-config, including activating automount feature

      1. (Whining voice) “2 days is soooo long! I want one now!!” Just kidding, you put a lot of hard work in. For this I thank you. Maybe I can use that quemu program to learn w/o physically touching the Pi3. Or just do it to learn in “now” steps & erase SD card & format PiDrive w/ my pc in 2 days to test your new version.

        If this goes well, I can probably convince a few other people to do the same setup & finally dump Dropbox/google services/iCloud sync. (So, excited to do this!)

        1. awesome!!

          I do everything on the QEMU virtual machine, but I warn you that it is pretty slow.

          It is great though to try things out, break stuff and learn.

          For mounting an external USB though, you are probably better learning on a real system with USB 😉

          You can just erase the SD card over and over if you mess up. Just be carefull to `sudo halt` and unplug before removing the SD card, or it might get damaged.

          Good luck with that!

  38. My router supports DDNS with no -ip. Should I use that? Or is that complicating things & might mess up the lets encrypt step for SSL?

  39. Just a heads up. Today I couldn’t get my HDMI to work on first boot. So I tried to log in via SSH on my local lan, & was able to via default raspberry user credentials. I only use it to shut down (Sudo halt) the pie, until I can get a new hdmi monitor. Am I supposed to be able to log in ssh to pi on 1st boot?

      1. Interesting….using the version from- (3-13-2017), I was able to ssh in from a computer on my local LAN, on fresh first, first time putting an sd card in Pi3. I copied img using etcher, not sure if that matters. Also, I’m new to Linux, so I wasn’t sure if that is a default setting or not.
        Also, I plugged in a different HDMI monitor & now that’s how I’m going to do setup. I just wanted to pass along that info about ssh. I can send pics if you’d like.

        1. I am on vacation now so I have limited internet access.

          Thank you very much for the feedback and offering. That was a mistake in the construction of the image. It is fixed now for people that download the new image.
          Enjoy that cloud! It seems that you got it working

    1. [EDIT: I recommend to use `nc-backup` before trying this. If it fails, just go back with `nc-restore`]

      I know, but that is not the issue with NextCloudPi because I ‘fixed’ the permissions. I created that issue to report it to them. (look, it is reported by nachoparker 🙂 )

      I fixed the permissions so you could upgrade from 11.0.1 to 11.0.2.

      BUT do not try to upgrade to 11.0.3 in any case, because when I tested it I discovered that it fails.

      I also reported this other bug to the NextCloud developers, as you can see here

      If you already did and NC is broken for you, unfortunately, you will have to manually restore your backup (it is performed automatically during the upgrade process).

      Today I uploaded a fresh version of NextCloudPi with NC 11.0.3, but you would have to start over (recopy your files, re-import your calendars, etc)

      Sadly, it seems that the updater is not very stable. At this point I do not recommend it.

      1. The upgrade from 11.0.2 to 11.0.3 fails prior to the actual upgrade because of the permissions check. So NC is fine, it’s just still on 11.0.2. At this stage the only way out as I see it is to manually set the permissions back to sane values, which I do not see as a workaround in any of the pages I read. I’ll wait a little longer until the NC people sort it out. But, removing the hardening of permissions in the documentation isn’t going to solve the problem for those already stuck with the hardened permissions…

  40. How come i setup my pi, got wifi to work, everything works great, but i cannot get acces to the nextcloud part of it.

    It tells me its unsecure in chrome, though letsencrypt is setup properly.

    http error 500. 🙁

      1. Thanks for sharing. Once you had your dongle recognized by the raspberry pi… Did you try connecting through `nc-wifi` in `nextcloudpi-config`?

        That is the recommended method in NextCloudPi and it should be easier. If you had a problem with that please let me know

        1. I initially tried the nextcloudpi-config option to configure my wifi, but it would never accept my passphrase. The issue was that I needed to download and install the linux driver for my dongle, before it wanted to play right. Since I was at the command line, I just stayed there to configure the wireless dongle and the only problem I had after installing the driver is that the dongle would not be recognized after I rebooted my Pi. After some research I found that using the lsmod command along with modprobe, I was able to wake up my wireless dongle.

          The challenge was to figure out how to issue this command at start up. I just created a .sh script with
          modprobe 8188CUS

          made it executable and placed this script in my etc/init.d directory and I was good to go.

        2. I see, good job

          As long as it works for you that’s fine. If you want to learn further, a more standard approach is to configure the wifi module to start upon boot in `/etc/modules.d` or `/etc/modprobe.d`, depending on the distro .

          Then nextcloudpi-config or what you did wpa supplicant script on boot will make it connect on boot


  41. Maybe i could PM you the adress for the box, i would gladly give you telnet-access.

    Actually it’s open right now, just give me a way of giving you the adress in private.

  42. The fact is that i cannot access it. It just gives me an blank page.

    Everything has been an success, though i’ve yet to try an usb-drive to the box, thats the next step.

    I’ve successfully managed to setup this on LAN cable, but its my first try on wifi, and it cannot work.

    I setup letsencrypt after i connected and had a working wifi connection.

  43. I’ve tried to set this up with my raspberry pi 3.
    The problem is that apache is reaaaaaally slow. I can hardly load nextcloud or anything else.
    Also, when I reload nextcloud (or anything else), the SSH session gets killed.
    Any ideas on this? I didn’t expect it to be so slow.

  44. If I want to start from scratch? I was just testing some things before. Are the steps to re-image my SD card & place back in Pi, then use fstab to mount my USB HDD? Then setup extras via nextcloudpi-config ?
    Thanks for your hard work NachoParker!!

    1. Yeah, just copy the image again and setup fstab, then reconfigure with nextxloudpi-config.
      after vacation I will include automount so the fstab step can be automatic

  45. Ok, I managed to fix the slow apache / ssh kill problem (it was the power supply).
    But I now have another big problem.
    I want the nextcloud data to be on my Synology NAS. I therefore mounted the share via CIFS in /etc/fstab, and it gets mounted without any error and nextcloud can read the data folder, BUT it cannot write or delete anything in there.
    So for example if I want to create a folder in Nextcloud I just get an error.
    It must be a permission problem, but I don’t know how to fix it.

    This is inside of /etc/fstab:
    //192.168.X.X/abc/xyz /mnt/xyz/ cifs defaults,owner,noauto,nofail,user=##,passwd=##,uid=33,gid=33,rw,noperm,x-systemd.automount, 0 0

    I set uid=33 and gid=33 so the files inside of the mounted folder are owned by www-data (so Apache can read it) but this “rw” for read/write doesn’t work. I also tried to set the permissions to 770 with “dir_mode” and “file_mode” but this didn’t change anything until I set ‘nounix’ aswell (then the files/folders are really 770), but then ls -l only shows some ???? at the mountpoint.

    NFS is not an option as my NAS uses different users than the PI for the http folders.
    Because of this, nextcloud doesn’t even write anything in the log (as it somehow doesn’t have the permission to write in it, strangely).
    Is it maybe an Apache problem? That it doesn’t grant the access?

    I would be so glad if anyone could help me solve my problem! Thank you so much!
    And thanks a lot for the image, nachoparker!

    1. I am on vacation now so I have limited internet access.

      Try to follow my post on samba or of tutorials.

      Make sure the folder has write permissions for 33 before mounting. Then mount with correct permissions and user 33. Set up the server with nextcoudpi-config

  46. After some effort I finally was able to get my Edimax wireless dongle to get recognized. I then needed to do some research on how to get it recognized after each reboot. I needed to do a modprobe command to get my dongle to wake up. So I created shell script and placed it in my init.d directory and everything is okay with wifi.

    When I first launch the browser on a Windows PC using my ip addresss/nextcloud I get this error message:

    “You are accessing the server from an untrusted domain.

    Please contact your administrator. If you are an administrator of this instance, configure the “trusted_domains” setting in config/config.php. An example configuration is provided in config/config.sample.php.
    Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain.”

    Do I need to run each option in the nextcloud config option before I can expect to have a functional Cloud service on my Raspberry Pi? As things stand now I can’t login to my nextcloud server due to the error above. I know this is supposed to make things easier on inexperienced users which I would include myself, but I’m stuck in the mud right now and don’t know how to get out.

    1. I am on vacation right now. whatever you write on the browser must be in config.php trusted domains section.
      Nextcloudpi puts your ip automatically or it should, you can check online how to edit that file and add the IP or URL

      Can’t help more, I am on vacation, writing from my phone

      You are almost there

      If I am not detecting your IP correctly I would be interested to know why. Please open an issue on github with relevant info. at least output of

      ip address

        1. nachoparker thanks for your response while on vacation. I am currently looking into OpenMediaVault as another option with my raspberry pi.

  47. nachoparker says:
    “Like I said… either copy your files/calendars/whatever and install a fresh NCP 11.0.3 or do the update manually”

    That fix isn’t acceptable since I’ve already made many non-NC configurations, and rebuilding an entire system just because of some messed-up file permissions is not a good advice.
    On that note, I will move to a ubuntu/snap build of NC since that way a cock-up in setting up NC won’t result in rebuilding the entire system.

    1. Hope you will be satisfied with the changeover. However, do not forget that the GNU license is clear:
      # This script is distributed in the hope that it will be useful,
      # but WITHOUT ANY WARRANTY; without even the implied warranty of
      # GNU General Public License for more details.
      For me… Thanks NachoParker! Excelent work.

    2. Like I said, I fixe the permissions for the upgrade from 11.0.1 to 11.0.2.

      When I tested the upgrade to 11.0.3 I did not have an issue with permissions (I had a different issue, which I reported to NC), but I would be interested in seeing what happened to your NCP instance.

      Would you kindly open an issue on the github for the project? post details of configuration, the error message, etc

      Also, if it is a problem with permissions, you can just fix the permissions yourself so the updater does not complain, but like I said, I do not recommend using the updater because NextCloud still has to work in improving it.

      In any case, it would be great to get feedback of any problem that I did not encounter, and in case it needs to be dealt with, fix it

      thank you

  48. Sorry for this stupid question but i know nothing about Linux.
    I installed this fantastic piece of software and everything works fine – but.
    I’m used to use owncloud for synchronizing contacts to windows phones. Now i want to switch to nextcloud. Therefore i need to download the certificate to install it on the phone. I did this let’s encrypt config but cannot find the certificate file which i assume is called something like .pem


    1. You don’t need to install any self signed certificate. Letsencrypt signs the certificate for you and your phone can verify it without installing anything

      Please read the post about letsencrypt carefully for a longer explanation

  49. Love the work you’ve done and really appreciate it. I took the time to use your image when I had to migrate to another DDNS provider after I had to get a new router (no DD-WRT so I couldn’t do a custom one). Anyway, I’ve got an A- on the Mozilla Observatory and a B on Security Headers. Both mention Content-Security-Policy containing ‘unsafe-eval’ which should be removed. My question is, where did you set this policy? I set it from scratch when I followed another tutorial on my previous install, but rather than search for it, I’d figure I’d ask you first. There is also the Public-Key-Pins and Referrer-Policy. I feel like only the Referrer Policy can be set, but not the other, since I’m using a DDNS, correct?

      1. Just wondering if you’ve been able to get a chance to look at these issues?

        1. Hi

          If I remember correcty, CSP is determined by the Nextcloud server code.
          Same thing with the referer policy, it is set to ‘never’ in the server html

          I don’t see the relationship with DDNS

  50. I just found NextcloudPI and am interested in using it to set up a Nextcloud instance for my home.
    I am confused and want to make sure I get this right.

    I am trying to create an image (using Raspbian Lite?) to run Nextcloud on a RPi3. I already have an external hard disk. In reading your instructions, I am confused about the Qemu stuff. Since I am running directly on a RPi, do I need Qemu at all? I think not.

    Do I just create a bootable image of your nextcloudpi image file and boot on a RPi? Once I’ve done that, is Nextcloud installed in running, or do I need to use the install script to install Nextcloud? I think I just need to run nextcloudpi-config to setup everything, correct?

    Thanks for all your work on this!

    1. You can download the image and copy it to the SD card. Boom working in 3 minutes.

      Then, use nextcloudpi-config to configure things like USB hard drive and other extras

      If you want to build the image yourself, you can use QEMU for that and the resulting image you can copy it to an SD card. It will have nextcloud working

      Or you can install nextcloud on any raspbian with the scripts provided, directly on the rpi

      Those are the options

  51. This is impressive and works flawlessly right from your image. Just a question and I am not an expert mind you. I read on another site that it is recommended to use nginx on a Raspberry Pi because Apache is so resource demanding. Do you have any opinion on this one way or the other?

    Again, thank you for this excellent project

    1. Hi
      So many people asking the same thing haha I should write a post about it.
      Basically nginx shines in high concurrency situations… If you are hosting a web with hundreds of connections per second..

      For a personal hosting only accessed by you you won’t feel a difference

      Apache has many modules, and they can be loaded dynamically, meaning that is easier from apt without compiling to install and manage.

      Nginx is only starting to do this and is still not easy to accomplish

      If you read my post about NC security

      I really value the added security of modsecurity for Apache.

      Those are my reasons, but of course it will depend on each use case

      Look this for more details

    1. You should first run “sudo raspi-config” and then choose the first option to access to nextcloudpi-config.

  52. Dear friend, I would like to migrate from apache2 to nginx as my nextcloud server proxy, is there any recommanded processes I can do?

  53. Hi nachoparker,

    Thank you for this excellent installation method, I’ve been struggling with owncloud for a while.
    I’m stuck now at the point of trying to add an external USB storage. I use exFAT file system, so I know I need exfat-utils.
    No matter how I mount it, it does not work.

    Could you please be more specific on what is “properly configured to automount upon boot”?

    I’m aware on the need to use fstab, but I could not make it work so far.

    Thank you.


  54. Hey,
    thanks for great work! why not provide an image based on full rasbian?
    or….when can I find step by step guide to install your NC over raspbian without QEMU?

    1. I am on vacation so can’t help much but look into the code.

      if the IP for your raspi is for example, you can install the LAMP with


      And nextcloud with


      Look for instance in

      If you need more info for example about different user and password from defaults look at post

  55. Hello,

    Thanks for the great work. Everything works out perfectly! I am just left with one more question, is it possible to use a VPN as well / is it recommended?


      1. And would you recommend to enable Server-side encryption in the Nextcloud Encryption settings?

  56. Hello friend,

    Thanks for your amazing works.

    I currenttly have nextcloud installed on my SD card, and the card’s I/O speed limits to about 10~20MB/S, I have two methods to improve I/O performance for optimizing nextcloud:

    1. Using a higher speed SD card for example UHS-3 level(But I read that Raspberr Pi 3 doesn’t support this speed level SD card);
    2. Storaging NC’s database and files in an external USB driven hard disk.

    Which method above can effectively improve Raspberry Pi 3’s I/O performance? Or both? Or another method?


  57. I’m trying to up the max execution time from 3600 seconds the 7200 seconds to allow for larger files or slower connections. How can I adjust this?

  58. Hello,

    I am currently having the problem, that my Nextcloud config at /var/www/nextcloud/config/config.php is always resetting as soon as I reboot my RPi. This causes the problem, that my domain isn’t in the white list anymore and I have basically no access to my cloud. So I have to edit the file each time my RPi is rebooting.

    Do you have any idea how I cloud solve that?

    Btw great work!

    1. You are probably editing the trusted domain list directly in config.php

      Then, add your trusted domain in position number 3 or greater of the list. Number 1 is overridden on boot to your IP, and number 2 is used by dnsmasq / noip in nextcloudpi-config

      Either that, or disable the behavior

      `sudo systemctl disable nextcloud-domain`

  59. Hi,
    I downloaded the 612 MB Image and put it on the SD Card. Afterwards. I was able to access nextcloud via local IP. Afterwards I issued a new certificate with Letsencrypt. Then I changed the external data on /media/USBdrive/ncdata and saved it in fstab.
    I am getting the issue with ocdata but the error attempts only when I redirect to my website when connected in LAN. CA is ok Outside I am not getting so far and receiving fault ” unsecure connection with err_cert_authority_invalid but inside LAN OK. I created ocdata via bank and saved in root =>” /” and changed owner to www-data. READ PERMISSION is granted. All without success. A reinstall is to critical I had in the past issues with Certificate so better no new install. What can be the problem and how can I solve it. Any ideas.? Best regards flipthemouse

  60. Hello,

    Do you know how I can remove index.php in the URL bar? I already checked a couple of guides but non worked.

    Thanks for your help!

  61. Hello!
    im pretty new.. so i understood right that i have to do following things:

    – Iso -> SD Card
    – Input no-ip data
    – DDns data
    – open Ports
    Then i should be rdy to connect from internet?

    1. Yes.

      Steps 2 and 3 are the same, noip is a DDNS but you can use other if you want.

      You also should set up dnsmasq to update your trusted domains. In the future this won’t be needed

  62. I am having a terrible time getting the NC data stored on a usb stick. I have tried the 2 items in Nexcloudpi-config and also tried to edit the fstab file. I can mount my usb as /media/USBstick, but I get an error when I try to access the web login. It states that the directory does not have proper permissions. I cannot seem to figure this out. Can you post a sample of all steps to setup a usb stick that is sda1 and anything needed to make it mount at boot. Thanks

  63. Hy, ich Follow your instruction to install nextcloud on Pi.
    But i have a problem.

    My domain isnt trusted and i get an error, to trust it.

    Now i have found anyone about Config/config.php to add a trusted domain.

    How i must do it and where find i this file ?

  64. Dear NachoParker:

    This has been the easiest and best cloud setup I have ever used. I used to have ownCloud setup on my RaspberryPi then I read about ownCloud vs NextCloud goals objectives regarding Open EchoSystem (development transparency). I wanted to make the jump from ownCloud to NextCloud with clean setup and you have amazed me with the simplicity of setup including usage of fail2ban and ddns as well as additions added to your image and creating free SSL cert and ModSecurity bundled…all I can say is WOW!

    Thank you so much for your dedicated time to create this and so much for continuing to embrace “Peace of Mind”. Keep up the awesomeness…looking forward to many other bright features.

  65. Hey,
    just installed this nice image on my RPi3 (4GB microSD). Thanks for the nice work :). I added the PiDrive from WDLabs as a ext4 to the system and moved the files with “nextcloudpi-config: nc-databse and nc-datadir” to the mounted drive at /media/PiDrive. In the folders for the db and data are some nextcloud files, but by copying files on the cloud, nextcloud claims there is no space left. Do I have to do something else?

    Kind regards 🙂

  66. Hi,
    Thanks for your work and sharing it. I am successfully booted into the image on a Raspberry Pi 3.

    Few things here that I am not able to work out:
    * I am currently running it locally through an IP address and the browser says it is not secure. How can I solve that? I read that I can disable the https connection but I want to use it via Internet as well then that is not an option! When I ask the browser to remember the exemption for the IP address then the nextcloud gives a message asking to “Add as trusted domain”. I need to do it every time I change/update the domain?
    * SSH is not enabled by default ?

    1. SSH is not enabled by default. This is standard and is the default behaviour in Raspbian and is also desired to prevent people unadvertedly having an open SSH port with default `pi` credentials.

      Read the post about Let’s Encrypt in order to obtain a trusted certificate. Actually, read all the posts, in particular the one about dnsmasq in order to use a domain name instead of an IP so you can access from inside or outside.

  67. Hi men!
    Great guide and well scripted.
    I have a question about the HTTP2 mod on the latest raspbian Pi3. When I try to install the HTTP2 module on the lastest apache from the default disto I get the following error message:

    sudo a2enmod http2
    ERROR: Module http2 does not exist!

    How did you solve this problem?


  68. Hi man,

    thanks a lot for the nice work and effort. I am not very skilled with web servers. After following your guide, I cannot open the website. This is what happens when I type The browser complains about it cannot be trusted, but I just clicked ‘proceed anyway’, and then:

    This page isn’t working is currently unable to handle this request.
    HTTP ERROR 500

    mmm I am quite lost and I do not know where to look at, any hints?


  69. I want to upload a 7 gig file but keep getting bad request error. Here is the message from the log. Max file size has been changed in both .htaccess and user.ini for 20000M
    Sabre\DAV\Exception\BadRequest: HTTP/1.1 400 expected filesize 7039108893 got 2147483647

    1. I was able to get some more information. It can upload fine via the windows program but only happens on the web interface. I have an older version of nextcloud with php5 and the web interface didn’t have that issue.

      1. That seems like a NextCloud issue to me. I have also tried different sizes from the web interface and there seems to be a practical limit of ~800 MB.

        What I did not suspect is that the sync client would not have that problem. That sounds strange.

        I suggest you seek for help at the nextcloud forums or report the bug on NC github, I think it can be a bug with the web client.

        [EDIT: there is an architectural limit of 2GB due to php 32bit limitations. I am working on a fix for this]

        1. Hello, did you fix this issue ? We are in 08/2017 and I still have the same problem (Bad request for a big file). Please feel free to share the solution if you have found it. Thank you.

  70. Would there be any restrictions on number of user accounts? Is there like 1 admin user and 1 regular user?
    I had idea to create several users for family members. Managed to create one. Every additional user i want to add makes the webserver unresponsive until i reboot the pi through ssh.

  71. Hello,
    just 2 questions; I’m using your last image:
    1: I want to use the last version of fail2ban but I see it’s already installed but not active. can you confirm?
    2: looking at apache log files I’ve seen the external ip address connecting to nextcloud is never the one of my ISP; which apache module is causing this behavior?

    1. I think I fixed it, not sure how but I left comments in the github link about both my setup process steps, how it appeared to break, and then how I tried to fix, ended up with NO web GUI, then how I reversed it and now it’s working ok.

      1. awesome, good job!

        that is very useful info for me to have someone else testing things and reporting how it went.

        I’ll have a look at it later 😉

  72. Dear Nachopacker,
    Good to see you are so active. Tried today the new Nextcloud 12 image, still has issues with adding multiple users, however works in a way. Here’s what i am doing.
    – Created SSD card, changed user pi password and enabled ssh
    – Logged in on my local nextcloud as admin
    – On admin -> users, added user1, works ok
    – On admin -> users, added user2, now webserver becomes unresponsive
    – By ssh sudo shutdown -r now
    – Logged in on my local nextcould as admin, check admin -> users

    On NextCloudPi 12 the user2 was created after all,
    on previous NextCloudPi there was no user2.

    So still undesired that admin -> users screen hangs the webserver.
    However it now succeeds in a way.

    1. Hello Rrrr

      I just setup NC12 from scratch image and I was able to login as admin and create user1 and user2
      I gave user1 admin group membership
      user2 I created a new group called users for it
      see my above posts but somewhere I lost access to the GUI and am maybe wondering if it was permissions (likely) or 2nd user add that broke it, although in my case rebooting didn not resolve it.

      At any rate if you look at the github link above I comented and resolved my permissions issue BUT I was also able to delete and re create user1 and user2 and they both work without any adverse web GUI issues, you might consider trying that? just a suggestion since it worked for me.

  73. Hey! Great work! Loving how easy it is to setup everything. I’ve got only one problem: Can’t setup my external drive. The automount works flawlessly, but when I go to the nc-datadir option and set it to /media/Cloud (the drive’s name is Cloud) I get a message: “/media/Cloud is not empty” and nothing happens… The drive was formatted to ext4 on my Mac and has only the lost+found directory inside… What am I missing?

    1. hi,
      for `nc-datadir` you need to input either an empty folder that you have created or a folder name that does not exist and it will be created for you.

      But if you input a folder that is not empty will refuse to use it.

  74. Thanks for a great article. Very helpful.

    Curious if you are aware of pagekite? Seems to be a smarter alternative to using DDNS. No router port forwarding settings to deal with. And for added security, why not use ZeroTier to create an encrypted network between the nextcloud on the pi and devices which will access it?

  75. Hey Nachoparker,

    I updated my PHP 7.0 using sudo apt-get update + upgrade and then updated my NC instance to v12.
    Now I’m having the same error as these folks.
    The admin console keeps saying that my opcache isn’t configured properly.

    Is there anything I can do using nextcloudpi-config to fix this without losing all my data? I’ve modified the php.ini files in cli and fpm, restarted apache. Modified opcache.ini file. Restarted, no avail 🙁

    I should note that my Rpi3 installation was originally done with Nextcloudpi and it’s been running incredibly smoothly!

    1. how did you update? did you update through the internal updater ?

      Did you move your datadir? do you have anything else? contacts? calendars?

  76. Hi there, the other day the installation just died. apache seems to be up and running, i can ssh into nextcloudPi but no webdav nor https to the cloud. any suggestions for troubleshooting?

    best sfb

      1. thanks nachoparker for replying;

        no, maybe an unattended one but other than that, no – it was the hottest day yet in Berlin an the device was real hot. otherwise no.

        When i connect to the server via browser it just gives me a blank page no error or anything like it, I really don’t know where to start troubleshooting

        1. Same here!
          Mine just died aswell..
          At first, Apache didn’t start anymore.
          Now it’s running but it doesn’t load any page anymore…
          Maybe it has something to do with the letsencrypt renewal?
          It’s about 1 month now since I installed it. Any thouhts on this?
          Apache Log doesn’t tell anything spectacular.

        2. Same here. Just stopped working. SSH works but nothing else.
          i moved my data so i tried:
          tail -f /media/USBdrive/ncdata/nextcloud/data/*.log
          but i get a permission denied.

          I hope somebody can help.

  77. Can’t make it work 🙁

    I installed NextCloudPi but when I open the IP of the the Pi in the browser (from PC in local LAN), it gives me the following message on a page with NextCloud logo in the background (translated from german by me and my english is not that good):

    You access the server from a not trusted domain.

    [ EDITED: transferred to ]

    Thought this would be easier 😉 Any advice would be highly appreciated!

    Best Regards

      1. Sorry, this was just the first page google took me to. I saw that people get questions about NextCloudPi answered here, so I posted my question here as well.

  78. Sorry for the delay, here is what the log says:

    '==> /var/www/nextcloud/data/access.log /var/www/nextcloud/data/error.log /var/www/nextcloud/data/nextcloud.log <==
    {"reqId":"WRTjwH8AAQEAAAQXTHgAAABI","remoteAddr":"","app":"core","message":"Trusted domain error. \"\" tried to access using \"\" as host.","level":2,"time":"2017-05-11T22:20:50+00:00","method":"PROPFIND","url":"\/remote.php\/dav\/","user":"--","version":""}'

    I understand there is no place on the device left, which makes me wonder whether I configured the hard drive correctly, on the other hand there had been far more data on the device than the sd-card would store?

    but there seems to be some certificate trouble too.
    Can you make sense of it?

  79. This part was lost in the reply: log_config:warn] [pid 1366:tid 1698690096] (28)No space left on device: [client] AH00646: Error writing to /var/www/nextcloud/data/access.log

      1. all right, sd ran out of space. though the data folder is located on a harddrive. cloned the system on to a lager sd, now everything works again. thanks nacho

  80. Hi, as I understand it, because of the architecture rasbian os , the maximum download file is only 2GB?

    File handling
    Maximum upload size
    16 GB
    (max. possible: 2 GB)

  81. I flashed the img, navigate to the IP and it was taking forever to load. Then this:

    Service Unavailable

    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
    Apache/2.4.25 (Raspbian) Server at Port 443

    Not what I was expecting to see. What is the issue? Thank you

  82. If I wanted to install this on an existing running raspian installation (I do not want to create a new image, but add this to an existing one), I should run ./ with the
    Resize and part of the Update sections removed?

    1. You are right, Nextcloud and also the extras can be installed individually.

      From your PC, remove those sections, and then the following command will install the webserver and database through SSH (assuming your rpi in


      The following will install nextcloud on top of it


      See the documentation about user and password

      I am currently separating the first step in two, so the resizing and updating would be in step 0 for this same purpose.

  83. I must be missing some code. All the code posts I see above are called and You reference and in your post above. What have I missed?

    1. Sorry, that file structure has changed a bit, and the code from the original post was also a little bit old. I just updated it.

      In any case, check out the git repo if in doubt 😉

      If you get stuck or have further technical questions about the project, I recommend that you access the forums or the corresponding github section (see links at the top of the post)

  84. I changed the admin password, but in the file /var/www/nextcloud/config/config.php there is the line ‘dbpassword’ => ‘ownyourbits ‘. Is this a security problem?

    1. That is the database password. Definitely a good thing to change it, not only in that file but also for the database. In any case, if some attacker had permissions to read that file, they would already have permissions to access the database content through NC.

  85. Hey this guide/project really helped me. Do you have a Bitcoin address I could tip?

    1. Thanks for your generosity, but for now this is a hobby project and I do not take donations.

      If anybody wants to help, contributions, testing and feedback are really welcome 🙂

  86. Thank you for the image!
    I cannot access the console after the system boot up, what is the default password for nextcloudpi?

  87. i have 1 external usb hdd, i would like to use it for “nextcloud” “torrent download” and “samba share” for my TV.

    can i do this? i’ve concerns about permissions. (e.g. hdd includes 2 folders one for Nextcloud and one for samba share and torrent download)

    a few times i did samba share FIRST for my tv and THEN installed Nextcloud or Owncloud and never get permissions to write nextcloud data to external drive

  88. Hello! Great Guide and easy install.
    But I cannot sync my CardDav and CalDav with my different Devices: Thunderbird/Lightning, Android CalDAV-Sync and CardDAV-Sync. Any ideas?
    File sync works.
    Just tell me if you need more information or if I should ask somewhere else.

      1. WTF! This was it, thank you very much! A shame something like that make it into a stable release but mistakes happen.

        1. Strange problem occurred. Your solution worked with my user account on the Android device but not in Thunderbird, more strangely the admin account syncs fine with Thunderbird. I only chance dav to caldav but it still disables itself but works fine on android.

        2. Sorry for the Spam but I created a new calender and it works now. Something more is buggy the some missing letters.

        3. I cheered too fast! It still doesn’t work with my user account in thunderbird. I will shut up now

  89. NextCloudPi is great, but we ran into a problem early on, and almost gave up and moved on to something else because we didn’t realize what was happening.

    We have a hard drive connected and made the mistake of using the nc-database option to move the database to the hard drive. After doing that, any time the Pi was rebooted and we tried to access the web interface, it would go to a blank white screen. Moving the database to a different location would make it work again, but only until the next reboot. We finally moved it back to the SD card, and then the web interface would come up after a reboot without an issue.

    The first problem is we didn’t remember where it was originally saved, we would have liked to have put it back there but didn’t remember the original directory path. So maybe for the nc-database option, “restore to original location” should be a choice. Would you please reveal where the database is normally saved if you haven’t moved it?

    But the second is I think we have stumbled across a race condition and NextCloud is losing (or winning, actually, but that’s not what we want). My guess that NextCloud is coming up before the external drive(s) are fully mounted. So maybe what you need is an additional option in the nc-database script or elsewhere that allows you to specify a “sleep” time in the NextCloud startup, to give hard drives time to spin up and initialize.

    Thank you for all the time you have put into this!

    1. Thank you very much.

      I am getting many reports of that, like this Issue.

      Getting a white screen is an indicative that the USB drive is not on, has been removed, has decided to go to stand by or something similar.

      I am going to make it more clear in the `nextcloudpi-config` instructions that this is a potential issue with moving the database.

      Your second issue… I am afraid I do not understand it very well.

      In any case, I would like to ask everyone to report issues, ask technical questions and feature requests in the corresponding Github section for the project.

      It is much cleaner and easier to manage, keep conversations separate, request for more information and such.

      Thanks for the feedback

  90. Mr Lizard, it works perfectly and smothly. My I suggest a new feather : add an automatic renew of the ssl certificate?

  91. Hi! I’m so glad I came to look at this. I remember I had posted a couple months back, but never received a heads-up e-mail of your response. I don’t believe that matters all that much, today, because…

    I’m going to perform a full upgrade using the version 12.0.0 image at the top of this page. I have the image, now, but am holding off upgrading for a week. This will be a complete fresh install into a formatted SD card and formatted external HDD (the ones in use, today) I wish there was a simple command line command that would kick off an upgrade, otherwise I would do it, this weekend.

    1. What do you mean a command line that would kick off an update?

      If it is what I think it is, you have `ncp-update` for that.

      Looking at your previous comment

      It seems that you have a very old version of NCP that did not have remote updates yet.

      I recommend that you do the upgrade as you are planning to do, and from then on, you will be able to upgrade from the command line without having to start from scratch.

      1. It must be. It appears I may have had pulled and older full version. I have a couple of them. I kicked off that command and received…

        sudo: ncp-update: command not found

        It appears a full upgrade from scratch is needed. I did some screen grabs to know what to put back in. It won’t take too too long. Luckily, I pulled the 12.0.0 for this upgrade and let folks know I’ll be performing it, next weekend.

        I did notice syncing large video files (and/or groups of the same) takes quite a long time to sync and that just direct uploads from inside the application, itself, seems to yield better results.

    1. Hi,
      I have not tried it. Somebody around here made it work on a raspi zero though.

      My guess is that it should work, although it will be slow. Last time I checked, you could flash Raspbian on a Raspberry Pi 1, and this is based on Raspbian so it should work.

      Let us know if you try!

  92. Someone have problem com “smbclient”? In my image, external storage show “smbclient” in not installed.

    1. As of today it does not come pre-installed. You have to install it yourself with `apt-get install smbclient`.

      It is true that it deserves being included in the build. I will do that for the next release.

      [EDIT] it comes pre-installed now

  93. I have done a full build using the image and it works phenominally. Excellent work!

    I had one issue that was encountered after running the LetsEncrypt process in the config utility. I don’t know if it was present, beforehand, but I just rectified it after a day mulling it over.

    What was happening was …

    [ADMIN EDIT] Shadowstreik replicated this info in this github issue, so I will remove the details from here.

  94. Hello, i used Etcher to write the image on a sd card, but Etcher says “Invalid image” “NextCloudPi_06-28-17.tar.bz2 is not a supported image type.”
    I Hope you can help me. Should i use a other Programm to write?

  95. Hi,
    Very nice work. 😉

    Two questions :
    – I’ve enable Let’s Encrypt, resulting a certificate valid for only two month. How do I renew (automaticly) the certificate ? Do I have to “sudo nextcloudpi-config” every two month ?

    – I’ve been using a Pi 2 + owncloud + external USB SSD (no encrypted datas) for 2 years. I’m seting up a Pi 3 + Nextcloud (+ moved USB SSD from Pi2). If I want the same directory with ocdata to be used by Nextcloud (not the database), How do I make Nextcloud scan for files in the directory and updating Nextcloud database (assuming the path is right in config.php) ?

    1. Hi,

      Please, create two separate entries on Github with your questions.

      I will gladly answer over there, so other people with similar doubts can find them. Also, it is cleaner than mixing different questions here.


  96. I have a Pi 3 and love the package. I am new to the pi and this is my first Pi project. I have a public IP address that I want to use for my pi. I have made the changes to the dhcpcd.conf file and I have rebooted but I am still getting the old IP that was used during install. Where else do I need to change the IP?

  97. I didn’t learn the first time and i accidentally changed my ncdatabase to ncdata on my harddrive instead of changing my my ncdata directory. Where was the database directory orignally?

  98. Hi! I was re-reading this post and saw the portion about QEMU which led me to my question…

    Is there a post, or a process not yet mentioned, that covers the creation an IMG of an already configured NCP instance? IOW, I have my instance all configured and data loaded, how do I create an image file (IMG)?

    Thank you.

    1. Hi,

      Well, you can save a copy of your SD card at any time. Actually, that is a good thing to do in case your SD becomes corrupt.

      It is also possible to use QEMU to generate an already configured image. You would have to clone the repo, introduce your configuration and start the build.

      It takes like 4 hours to complete.

  99. Hi,
    I hope you can help me. Trying to install additional packages to a plain nextcloudpi installation (after apt-get update / dist-upgrade) fails…
    For installing FHEM package I first need to install some perl helper packages, e.g. libdevice-serialport-perl:sudo apt-get install libdevice-serialport-perl
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    libdevice-serialport-perl : Depends: perlapi-5.20.0
    E: Unable to correct problems, you have held broken packages.

    Why is a package on hold, which is it and why is it broken?


  100. Cheers

    Does anyone have the status.php error?

    Everything was working ok and suddently i have an error connecting to server

    “cant connect to nextcloud at https://ipserver/status.php

    Anyone knows why?
    help is much appreciated

  101. Hi,

    didn’t know if its a bug or a feature:
    I’ve used a 8 GB SD Card on my RPi and installed nextcloud apps but after a view apps I got the information that there is not enough space. I change the installation to a 64 GB card and got the same problem.

    Is there any restriction in the installed apps?

  102. I set up a system with your image and it works like a charm. But when i try to synch my hdd (300 GB – 132000 Files), the system crashes and i have to reboot it. This didn’t happen with my “normal” nextcloud install i had before…

    1. I have not tried Nextberry, but I think that
      – It installs Nextcloud upon first boot
      – It doesn’t have extras or web interface, I think, or it has different ones
      Its just another different alternative build

  103. I tried to run NextCloudPi on my RasPi 2 from the most recent image (NextCloudPi_08-08-17.img) but I am failing to connect to either the Nextcloud or the Webinterface even directly after installation with a 503 error: “Service Unavailable – The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.”

    To me it looks like there is something wrong with the Apache / PHP configuration, as apache is throwing errors on every attempt to connect. Here are the first lines of the /var/log/apache2/error.log:

    [admin edit]

    Hope you can help me to fix this? Would love to get this up and running for my own little cloud. I allready tried different SDHC-cards and power supplies which were all working ok before and also md5 and etcher verification suggest that the image should be ok.

      1. Hi, I did check on github but didn’t find anything matching. The only somehow related issue is #88 ( but it is lacking the error messages in the apache log.

        So far I simply don’t have a github account and didn’t want to create one for asking this single question. But maybe there are coming more, so I’ll create an account and ask again.

  104. I am getting the following error while setting up Lets Encypt:
    – The following errors were reported by the server:

    Domain: XXXXXXXX
    Type: connection
    Detail: Fetching

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A/AAAA record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you’re using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

  105. Mr Lizard,
    I’ve got headache with the wi-fi connection. After a week of August vaccation I lost the connection, Weired, I decided to start form the new image file.
    1/ wifi is not reconized and I need to update the Pi to activate it (I have a chinese pi board, not sure this is important to know)
    2/ then, I use to make the wifi setup through the wpa_supplicant.conf file and it sounds stange and does not work any more (I tried differents ways of setup : wpa_supplicant or nc-wifi). Did you change something on the latest version?

    1. Hi olivier,

      Let’s talk about that on github 😉

      — COPYPASTE —
      Hi, please ask technical questions or report issues on github. That way other people with the same issue can benefit from the answer.

      Check first that it has not been asked before

  106. Hi

    Just upgraded to stretch and nextcouldpi seem to have stopped working, any ideas where I should look.



  107. Hello,

    If I install nextcloudpi on a Pi, can I access it from outside my home network ?

    Thank you

  108. Hi!
    First of all, thank you for your work! It works flawlessly and saved me a lot of time trying to putting a working Nextcloud server together on my Raspberrypi 3
    I have a question: as I moved both ncdatabase and swap on the same external HDD that I use for ncdata, it seems like the HDD never goes into standby (I issue the appropriate hdparm -S command at boot time from rc.local, to make the HDD go to sleep after 1h).
    Can you tell me if this behavior is caused by the swap of ncdatabase? Is really the database so busy even when Nextcloud is “at idle” (i.e., not operating on files?). If so, would it be dangerous for the lifespan of the sdcard to move it back?
    On the other hand, can this behaviour be caused by the swap file? I guess this is not the case, as the swap file hasn’t be touched anyway until now, but still…
    Have you any suggestion to point me inthe right direcction to discover WHY the HDD never goes to sleep?

    Thanks a lot in advance!

    1. Hi,

      Thanks for your words. Please, read the following

      — COPYPASTE —
      Hi, please ask technical questions or report issues on github. That way other people with the same issue can benefit from the answer.

      Check first that it has not been asked before

  109. Hi
    This package is great. Thank you so much for the ready to use solution.

    I have few questions though cause I’m a newbie to Linux-Rasp stuff.

    Using USB to store files and DB.
    How can I verify that files are actually is stored on USB drive and /or discover if the USB drive is mounted successfully? (I’m probably asking a standard Linux question here)
    In case that DB and files are stored on USB, is there any fail-safe option for booting if the USB device fails?
    Using USB for storage is affecting system performance?

    1. Hi,

      see the following copypaste

      — COPYPASTE —
      Hi, please ask technical questions or report issues on github. That way other people with the same issue can benefit from the answer.

      Check first that it has not been asked before

  110. Hi
    I just started with pi3 and all OS around I want on this exactly your way, nextcloud. after all, is was work but I need put trusted side – my ddns for access outside, and also edit ports, my 80 and 443 is using by different accessories.
    before I use VM and there ubuntu and owncloud. there I was all setup do in terminal. but there is complete different.
    could be easily but not for me 😀 you got port forward problem is when I put my new port 84 is still there port 80 is well that I need take it out.
    is any possible change to change everything in terminal – putty -ssh ??

Comments are closed.