Sie sind auf Seite 1von 126

8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

OWN YOUR BITS (HTTPS://OWNYOURBITS.COM/)


Technology with a focus on Open Source

debian (https://ownyourbits.com/category/linux/debian/), linux (https://ownyourbits.com/category/linux/), networking


(https://ownyourbits.com/category/networking/), nextcloud (https://ownyourbits.com/category/nextcloud/), raspberrypi
(https://ownyourbits.com/category/raspberrypi/)

NextCloudPi, a ready to use NextCloud image for Raspberry


Pi
February 13, 2017 (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/) | by nachoparker
(https://ownyourbits.com/author/cisquero_admin/)

(https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/)

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

NextCloudPi is an o cial (https://ownyourbits.com/2017/06/01/nextcloudpi-becomes-o cial/) NextCloud project as of 05-31-


2017.

Features:

Raspbian (https://www.raspbian.org/) 8 Jessie


Nextcloud (https://nextcloud.com/) 12.0.1
Apache 2.4.25, with HTTP2 enabled
PHP 7.0 (double the speed (http://blog.teamtreehouse.com/5-new-features-php-7) of PHP5!)
MariaDB 10
4.9 Linux Kernel ( NEW 03-13-2017 (https://ownyourbits.com/2017/03/13/nextcloudpi-gets-nextcloudpi-con g/) )

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 1/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

nextcloudpi-con g for easy setup (https://ownyourbits.com/2017/03/13/nextcloudpi-gets-nextcloudpi-con g/) ( RAM


logs, USB drive and more )
Automatic redirection to HTTPS
ACPU PHP cache
PHP Zend OPcache enabled with le cache
HSTS
Cron jobs for Nextcloud
Sane con guration defaults
Full emoji support ( NEW 05-24-2017 (https://ownyourbits.com/2017/05/24/nextcloudpi-gets-automount-backups-
nextcloud-online-installation-nextcloud-12-and-more/) )
Secure (https://ownyourbits.com/2017/03/25/nextcloud-a-security-analysis/)

Extras:

NextCloudPi Web Panel ( NEW 07-24-2017 (https://ownyourbits.com/2017/07/24/nextcloupi-gets-a-web-interface/) )


Wi-Fi ready ( NEW 03-31-2017 (https://ownyourbits.com/2017/03/31/nextcloudpi-gets-remote-updates-logs-to-ram-
easy-wi -and-more/) )
Automatic security updates, activated by default. ( NEW 03-21-2017 (https://ownyourbits.com/2017/03/21/automatic-
security-updates-on-a-debian-system/) )
Lets Encrypt (https://letsencrypt.org/) for trusted HTTPS certi cates.( NEW 03-16-2017
(https://ownyourbits.com/2017/03/17/lets-encrypt-installer-for-apache/) )
Fail2Ban (https://www.fail2ban.org/wiki/index.php/Main_Page) protection against brute force attacks. ( NEW 02-24-
2017 (https://ownyourbits.com/2017/02/24/nextcloudpi-fail2ban-installer/) )
Dynamic DNS support for no-ip.org (http://freeddns.noip.com/) ( NEW 03-05-2017
(https://ownyourbits.com/2017/03/05/dynamic-dns-for-raspbian-with-no-ip-org-installer/) )
dnsmasq (http://www.thekelleys.org.uk/dnsmasq/doc.html) DNS server with DNS cache ( NEW 03-09-2017
(https://ownyourbits.com/2017/03/09/dnsmasq-as-dns-cache-server-for-nextcloudpi-and-raspbian/) )
ModSecurity (http://modsecurity.org/) Web Application Firewall ( NEW 03-23-2017
(https://ownyourbits.com/2017/03/23/modsecurity-web-application- rewall-for-nextcloud/) )
NFS ready to mount your les over LAN ( NEW 04-13-2017 (https://ownyourbits.com/2017/04/13/share-your- les-in-
your-lan-with-nfs/) )
SAMBA (https://www.samba.org/) ready to share your les with Windows/Mac/Linux ( NEW 04-16-2017
(https://ownyourbits.com/2017/04/16/share-your- les-in-your-lan-with-samba/) )
USB automount ( NEW 05-24-2017 (https://ownyourbits.com/2017/05/24/nextcloudpi-gets-automount-backups-
nextcloud-online-installation-nextcloud-12-and-more/) )
Remote updates ( NEW 03-31-2017 (https://ownyourbits.com/2017/03/31/nextcloudpi-gets-remote-updates-logs-to-
ram-easy-wi -and-more/) )
Uno cial Nextcloud News App (https://github.com/nextcloud/news) installer ( NEW 05-24-2017
(https://ownyourbits.com/2017/05/24/nextcloudpi-gets-automount-backups-nextcloud-online-installation-
nextcloud-12-and-more/) )
NextCloud backup and restore ( NEW 05-24-2017 (https://ownyourbits.com/2017/05/24/nextcloudpi-gets-automount-
backups-nextcloud-online-installation-nextcloud-12-and-more/) )
NextCloud online installation ( NEW 05-24-2017 (https://ownyourbits.com/2017/05/24/nextcloudpi-gets-automount-
backups-nextcloud-online-installation-nextcloud-12-and-more/) )
Format USB drive to ext4 ( NEW 07-03-2017 (https://ownyourbits.com/2017/07/03/nextcloudpi-gets-nc-news-
format-usb-port-forwarding-emoji-support-and-more/) )
UPnP (https://en.wikipedia.org/wiki/Upnp) automatic port forwarding ( NEW 07-03-2017
(https://ownyourbits.com/2017/07/03/nextcloudpi-gets-nc-news-format-usb-port-forwarding-emoji-support-and-
more/) )

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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 2/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

NextCloudPi is now also available for the Raspberry Pi as an ARM docker container. ( NEW 06-08-2017
(https://ownyourbits.com/2017/06/08/nextcloudpi-docker-for-raspberry-pi/) )

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

(https://ownyourbits.com/wp-content/uploads/NextCloudPi_08-08-17.torrent)NextCloudPi 12.0.1 torrent ( 765 MB )


md5sum ea00b0174016e875554485a83165e45b

(magnet:?xt=urn:btih:d0a958b442dc27306b3ba1b9f7966e81aa0bb482&dn=NextCloudPi%5F08-08-
17&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce)NextCloudPi 12.0.1 magnet link ( 765 MB )
md5sum ea00b0174016e875554485a83165e45b

(https://ownyourbits.com/wp-content/uploads/NextCloudPi_08-08-17.tar.bz2)NextCloudPi 12.0.1 image ( 765 MB )


md5sum ea00b0174016e875554485a83165e45b

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

Please, report any issues here (https://github.com/nextcloud/nextcloudpi/issues).

Please, before asking technical questions, look here (https://github.com/nextcloud/nextcloudpi/issues?


utf8=&q=%20label:question%20) if it has been asked before.

Use the o cial forums (https://help.nextcloud.com/c/support/appliances-docker-snappy-vm) to ask questions, opinions and


participate.

We need your help! There are many easy things that you can do to contribute (https://ownyourbits.com/2017/07/07/how-can-
you-help-own-your-bits/).

Installation
Follow the classic instructions (https://www.raspberrypi.org/documentation/installation/installing-images/linux.md) 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 (https://etcher.io/) as explained in this post
(https://www.raspberrypi.org/magpi/pi-sd-etcher/).

Usage
https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 3/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Usage
Connectivity and basic setup
Upon rst boot, you should do the usual, such as change the default Raspbian password, maybe con gure 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 con guration of the network, such as setting up a static IP, reboot when you are done so that NextCloudPi can detect it.

First, 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 ( https://nmap.org ) at 2017-07-24 17:30 CEST

Nmap scan report for 192.168.0.131


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.

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

https://<rpi_ip_or_url>

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

You can access the NextCloudPi web panel (https://ownyourbits.com/2017/07/24/nextcloupi-gets-a-web-interface/)in HTTPS port
4443

https://<rpi_ip_or_url>:4443

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 4/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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 les.

First, you can format your external drive with the nc-format-USB feature. FAT32 or NTFS lesystems 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
doesnt change with your public IP.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 5/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

I use no-ip (https://ownyourbits.com/2017/03/05/dynamic-dns-for-raspbian-with-no-ip-org-installer/) free plan for my DDNS.


The no-ip service is integrated (https://ownyourbits.com/2017/03/05/dynamic-dns-for-raspbian-with-no-ip-org-installer/) 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 (https://ownyourbits.com/2017/07/03/nextcloudpi-gets-nc-news-format-usb-port-
forwarding-emoji-support-and-more/) ).

You can explore some alternative ways of accessing your les in this post (https://ownyourbits.com/2017/04/18/di erent-ways-
to-access-your-nextcloud- les/).

Get a trusted certi cate


If you want to avoid the Untrusted Certi cate warning and make everyones life easier, get a Lets Encrypt
(https://ownyourbits.com/2017/03/17/lets-encrypt-installer-for-apache/) signed certi cate for your DNS domain through
nextcloudpi-config or the web interface (https://ownyourbits.com/2017/07/24/nextcloupi-gets-a-web-interface/).

More extras
You can activate and con gure the system and any extras from the web interface
(https://ownyourbits.com/2017/07/24/nextcloupi-gets-a-web-interface/).

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 6/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

You can also do so from the command line with

sudo nextcloudpi-config

(https://ownyourbits.com/wp-content/uploads/2017/03/ncp-conf.jpg)

Follow the dedicated posts (https://ownyourbits.com/category/nextcloud/) on this blog for details on each entry.

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

Updating
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 (https://ownyourbits.com/2017/03/21/automatic-security-updates-on-a-debian-
system/) to get the latest security updates.

Upon login, you will be noti ed for new NextCloudPi updates

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 7/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

in order to upgrade to the latest version, type

sudo ncp-update

Try it on QEMU rst


You can try NextCloudPi rst with qemu-pi.sh from the last post (https://ownyourbits.com/2017/02/06/raspbian-on-qemu-
with-network-access/)

sudo ./qemu-pi.sh NextCloudPi_03-13-17.img

Details
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, con guration 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 con gured images to the public with Nextcloud included, so I automated the process.
Lets go for it!

In the last post (https://ownyourbits.com/2017/02/06/raspbian-on-qemu-with-network-access/) we learned how to use qemu-


pi.sh 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 qemu-pi.sh 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 con guration.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 8/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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

git clone https://github.com/nextcloud/nextcloudpi.git


cd nextcloudpi
./batch.sh 192.168.0.145 # change to your QEMU raspbian IP

This will get the code from github (https://github.com/nextcloud/nextcloudpi), and

Download (https://www.raspberrypi.org/downloads/raspbian/) 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.
Con gure 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.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 9/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Also note that you can change the following parameters at the top of install-nextcloud.sh

ADMINUSER=admin
DBADMIN=ncadmin
DBPASSWD=ownyourbits
MAX_FILESIZE=1G

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

Screenshots
The basic con guration 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.

(https://ownyourbits.com/wp-content/uploads/2017/02/settings.jpg)

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 les or slow connections.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 10/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

(https://ownyourbits.com/wp-content/uploads/2017/02/settings2.jpg)

Other settings

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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 11/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

(https://ownyourbits.com/wp-content/uploads/2017/02/http2_proof.jpg)

HTTP2 test

PHP con guration

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 12/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

(https://ownyourbits.com/wp-content/uploads/2017/02/phpinfo2.jpg)

PHP Zend OPCache Settings

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 13/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

(https://ownyourbits.com/wp-content/uploads/2017/02/phpinfo1.jpg)

PHP ACPU settings

If you have ever manually con gured a Nextcloud instance, the auto-con guration parameters by default are equivalent to this

(https://ownyourbits.com/wp-content/uploads/2017/02/auto_settings.jpg)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 14/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Nextcloud default con guration

Code
lamp.sh Shell

#!/bin/bash

# Nextcloud LAMP base installation on Raspbian


# Tested with 2017-03-02-raspbian-jessie-lite.img
#
# 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:
#
# ./installer.sh lamp.sh <IP> (<img>)
#
# See installer.sh instructions for details
#
# 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
#
# More at https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/
#

APTINSTALL="apt-get install -y --no-install-recommends"


export DEBIAN_FRONTEND=noninteractive

install()
{
# GET STRETCH SOURCES FOR HTTP2 AND PHP7
##########################################

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

# INSTALL FROM STRETCH


##########################################

$APTINSTALL apt-utils
$APTINSTALL cron
$APTINSTALL -t stretch apache2
$APTINSTALL -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.
mkdir -p /run/php

# Randomize mariaDB password


# Suggested by @enoch85 and taken from the nextcloud vm ( https://github.com/nextcloud/vm/blob/master/lib.sh#L46 )
DBPASSWD=$(tr -dc "a-zA-Z0-9@#*=" < /dev/urandom | fold -w "$(shuf -i 30-35 -n 1)" | head -n 1)
echo -e "[client]\npassword=$DBPASSWD" > /root/.my.cnf
chmod 600 /root/.my.cnf

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"
$APTINSTALL -t stretch mariadb-server php7.0-mysql
mkdir -p /run/mysqld
chown mysql /run/mysqld

# CONFIGURE APACHE
##########################################

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
SSLCipherSuite 'EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aR
EOF

cat >> /etc/apache2/apache2.conf <<EOF

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 15/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
</IfModule>
EOF

# CONFIGURE PHP7
##########################################

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


extension=apcu.so
apc.enable_cli=0
apc.shm_size=256M
apc.ttl=7200
apc.gc_ttl=3600
apc.entries_hint=4096
apc.slam_defense=1
apc.serializer=igbinary
EOF

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


zend_extension=opcache.so
opcache.enable=1
opcache.enable_cli=1
opcache.fast_shutdown=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
opcache.file_cache=/tmp;
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

# CONFIGURE LAMP FOR NEXTCLOUD


##########################################

$APTINSTALL ssl-cert # self signed snakeoil certs

# configure MariaDB ( UTF8 4 byte support )


sed -i '/\[mysqld\]/ainnodb_large_prefix=on' /etc/mysql/mariadb.conf.d/50-server.cnf
sed -i '/\[mysqld\]/ainnodb_file_per_table=1' /etc/mysql/mariadb.conf.d/50-server.cnf
sed -i '/\[mysqld\]/ainnodb_file_format=barracuda' /etc/mysql/mariadb.conf.d/50-server.cnf

mysql_secure_installation <<EOF
$DBPASSWD
n
y
y
y
y
EOF
}

configure() { :; }

cleanup()
{
apt-get autoremove -y
apt-get clean
rm /var/lib/apt/lists/* -r
rm -f /home/pi/.bash_history

systemctl disable ssh


}

# 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 16/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits
#
# 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

nc-nextcloud.sh Shell

#!/bin/bash

# Nextcloud installation on Raspbian over LAMP base


# Tested with 2017-03-02-raspbian-jessie-lite.img
#
# 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:
#
# ./installer.sh nc-nextcloud <IP> (<img>)
#
# See installer.sh instructions for details
#
# More at https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/
#

VER_=12.0.1
MAXFILESIZE_=2G
MEMORYLIMIT_=768M
MAXTRANSFERTIME_=3600
DBADMIN=ncadmin
DESCRIPTION="Install any NextCloud version"

export DEBIAN_FRONTEND=noninteractive

show_info()
{
[ -d /var/www/nextcloud ] && \
whiptail --yesno \
--backtitle "NextCloudPi configuration" \
--title "NextCloud installation" \
"This new installation will cleanup current
NextCloud instance, including files and database.

You can later use nc-init to configure to NextCloudPi defaults

** perform backup before proceding **

You can use nc-backup " \


20 90
}

install() { :; }

configure()
{

## RE-CREATE DATABASE TABLE


echo "Starting mariaDB"

# launch mariadb if not already running (for docker build)


pgrep -x mysqld &>/dev/null || { mysqld & }

# wait for mariadb


pgrep -x mysqld &>/dev/null || { echo "mariaDB process not found"; return 1; }

while :; do
[[ -S /var/run/mysqld/mysqld.sock ]] && break
sleep 0.5
done

echo "Setting up database..."

# workaround to emulate DROP USER IF EXISTS ..;)


local DBPASSWD=$( grep password /root/.my.cnf | cut -d= -f2 )
mysql -u root -p$DBPASSWD <<EOF
DROP DATABASE IF EXISTS nextcloud;
CREATE DATABASE nextcloud
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
GRANT USAGE ON *.* TO '$DBADMIN'@'localhost' IDENTIFIED BY '$DBPASSWD';
DROP USER '$DBADMIN'@'localhost';
CREATE USER '$DBADMIN'@'localhost' IDENTIFIED BY '$DBPASSWD';
GRANT ALL PRIVILEGES ON nextcloud.* TO $DBADMIN@localhost;
EXIT
EOF

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 17/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

## DOWNLOAD AND (OVER)WRITE NEXTCLOUD


cd /var/www/

echo "Downloading Nextcloud $VER_..."


wget -q https://download.nextcloud.com/server/releases/nextcloud-$VER_.tar.bz2 -O nextcloud.tar.bz2 || return 1
rm -rf nextcloud

echo "Installing Nextcloud $VER_..."


tar -xf nextcloud.tar.bz2
rm nextcloud.tar.bz2

## CONFIGURE FILE PERMISSIONS


local ocpath='/var/www/nextcloud'
local htuser='www-data'
local htgroup='www-data'
local rootuser='root'

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 ${htuser}:${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/

chmod +x ${ocpath}/occ

printf "chmod/chown .htaccess\n"


if [ -f ${ocpath}/.htaccess ]; then
chmod 0644 ${ocpath}/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
fi
if [ -f ${ocpath}/data/.htaccess ]; then
chmod 0644 ${ocpath}/data/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
fi

# create and configure opcache dir


OPCACHEDIR=/var/www/nextcloud/data/.opcache
sed -i "s|^opcache.file_cache=.*|opcache.file_cache=$OPCACHEDIR|" /etc/php/7.0/mods-available/opcache.ini
mkdir -p $OPCACHEDIR
chown -R www-data:www-data $OPCACHEDIR

## SET APACHE VHOST


cat > /etc/apache2/sites-available/nextcloud.conf <<'EOF'
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
DocumentRoot /var/www/nextcloud
CustomLog /var/www/nextcloud/data/access.log combined
ErrorLog /var/www/nextcloud/data/error.log
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
</VirtualHost>
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
LimitRequestBody 0
SSLRenegBufferSize 10486000
</Directory>
</IfModule>
EOF
a2ensite nextcloud
echo "Setting up Apache..."

cat > /etc/apache2/sites-available/000-default.conf <<'EOF'


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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 18/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits
</VirtualHost>
EOF

echo "Setting up system..."

## SET LIMITS
sed -i "s/post_max_size=.*/post_max_size=$MAXFILESIZE_/" /var/www/nextcloud/.user.ini
sed -i "s/upload_max_filesize=.*/upload_max_filesize=$MAXFILESIZE_/" /var/www/nextcloud/.user.ini
sed -i "s/memory_limit=.*/memory_limit=$MEMORYLIMIT_/" /var/www/nextcloud/.user.ini

# slow transfers will be killed after this time


cat >> /var/www/nextcloud/.user.ini <<< "max_execution_time=$MAXTRANSFERTIME_"
cat >> /var/www/nextcloud/.user.ini <<< "max_input_time=$MAXTRANSFERTIME_"

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

echo "Don't forget to run nc-init"


}

cleanup()
{
rm -f /home/pi/.bash_history

systemctl disable ssh


}
# 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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

github (https://github.com/nextcloud/nextcloudpi)

References
https://docs.nextcloud.com/server/11/admin_manual/contents.html (https://www.raspberrypi.org/forums/viewtopic.php?
f=36&t=160874)

https://www.raspberrypi.org/forums/viewtopic.php?f=36&t=160874 (https://www.raspberrypi.org/forums/viewtopic.php?
f=36&t=160874)

Raspbian on QEMU with network access (https://ownyourbits.com/2017/02/06/raspbian-on-qemu-


with-network-access/)

Previous
Raspbian on QEMU with network access (https://ownyourbits.com/2017/02/06/raspbian-on-qemu-with-network-access/)
Next
Squeeze disk space on a Debian system (https://ownyourbits.com/2017/02/18/squeeze-disk-space-on-a-debian-system/)

Author: nachoparker

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 19/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits
Humbly sharing things that I nd useful [ github (https://github.com/nachoparker) dockerhub
(https://hub.docker.com/u/ownyourbits/) ]
View all posts by nachoparker (https://ownyourbits.com/author/cisquero_admin/)

312 Comments on NextCloudPi, a ready to use NextCloud image


for Raspberry Pi
Noein says:
February 15, 2017 at 12:56 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-25)

Hey Im trying to run this locally and I keep getting invalid certi cate. It seems to be forcing all tra c through 443.
Is there any way I can make it so http tra c is allowed? Or maybe I could have valid certs for local tra c somehow?
While Im messing with it Id 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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=25#respond)

nachoparker (https://github.com/nachoparker) says:


February 15, 2017 at 8:14 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-27)

[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 certi cate, you can just add an exception on your
browser. When you have your domain, follow the instructions for Lets Encrypt on the advanced
con guration section to get trusted HTTPS

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=27#respond)

Mark Buckman says:


February 15, 2017 at 1:10 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-26)

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:

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 20/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Data directory (/mnt/Store/ncdata) is invalid


Please check that the data directory contains a le .ocdata in its root.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=26#respond)

nachoparker (https://github.com/nachoparker) says:


February 15, 2017 at 4:45 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-28)

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 ne 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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=28#respond)

Mark Buckman says:


February 19, 2017 at 5:00 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-
45)

Dont know what happened on the rst 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!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=45#respond)

nachoparker (https://github.com/nachoparker) says:


February 19, 2017 at 5:25 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-46)

Haha I am glad. Another person to own their bits

lstehr says:
February 17, 2017 at 1:56 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-30)

I love the simplicity of this for newbies. I have very thing working well, except the virtual host. I am unsure as to
which le I should be adding the lines to.

need a pointer

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=30#respond)

nachoparker (https://github.com/nachoparker) says:

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 21/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

February 18, 2017 at 9:35 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-35)

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'
<VirtualHost _default_:80>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
</VirtualHost>
EOF

cat > /etc/apache2/sites-available/nextcloud.conf <<'EOF'


<IfModule mod_ssl.c>
<VirtualHost _default_:443>
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
</VirtualHost>
</IfModule>
EOF
a2dissite default-ssl
service apache2 reload

There is information about virtual hosts here

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-
04-lts (https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-
ubuntu-14-04-lts)
https://httpd.apache.org/docs/2.4/vhosts/examples.html
(https://httpd.apache.org/docs/2.4/vhosts/examples.html)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=35#respond)

debonaire says:
February 17, 2017 at 3:08 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-32)

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.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 22/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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/


Thanks

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=32#respond)

nachoparker (https://github.com/nachoparker) says:


February 17, 2017 at 5:06 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-33)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=33#respond)

debonaire says:
February 18, 2017 at 8:13 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-
38)

I have not installed nextcloud from your distribution, so you dont 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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=38#respond)

nachoparker (https://github.com/nachoparker) says:


February 19, 2017 at 8:29 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-41)

Ok, I see

Then it should be just a matter of doing

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 23/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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',

debonaire says:
February 20, 2017 at 8:04 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-51)

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

As I said everything works ne if all is on the sd card, speci cally data in /var/nextcloud/data
and the con g.php le in /var/www/html/nextcloud/con g, 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. Lets 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

Con gure the new data location into Nextcloud. Using vi or another editor of your choice, edit
the con guration le. Make a backup copy rst, just in case there is a mistake with the edit:

$ cd /var/www/html/nextcloud/con g
$ sudo cp -p con g.php con g.php.org
$ sudo vi con g.php

Change this line:

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 24/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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 le and exit the editor.

http://unixetc.co.uk/2016/11/20/simple-nextcloud-installation-on-raspberry-pi/
(http://unixetc.co.uk/2016/11/20/simple-nextcloud-installation-on-raspberry-pi/)

Many thanks

Trin says:
February 19, 2017 at 12:46 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-40)

Very nice! Thanks for the work! One question, in what le would I add the

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

to redirect?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=40#respond)

nachoparker (https://github.com/nachoparker) says:


February 19, 2017 at 8:37 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-42)

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
wont 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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=42#respond)

Juan says:
February 23, 2017 at 10:10 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-57)

Some of us do not use Linux i our PC


Is posible to get an image compatible with a program to burn it in the SD throught Windows?
May be with Rufus (https://rufus.akeo.ie/ (https://rufus.akeo.ie/)) or with Win32diskimager
(http://sourceforge.net/projects/win32diskimager (http://sourceforge.net/projects/win32diskimager))

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=57#respond)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 25/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

nachoparker (https://github.com/nachoparker) says:


February 24, 2017 at 7:21 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-58)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=58#respond)

Jason says:
April 26, 2017 at 6:30 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-346)

I used https://etcher.io/ (https://etcher.io/) on MacOS. It also has a windows version.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=346#respond)

nachoparker (https://github.com/nachoparker) says:


April 26, 2017 at 7:04 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-347)

thanks for the suggestion. Actually I ended up including etcher in the post instructions time ago

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=347#respond)

Rafael says:
March 1, 2017 at 10:16 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-78)

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?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=78#respond)

nachoparker (https://github.com/nachoparker) says:


March 1, 2017 at 4:40 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-81)

Hello, you are very welcome

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

As per the o cial docs,

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 26/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://docs.nextcloud.com/server/11/admin_manual/maintenance/upgrade.html
(https://docs.nextcloud.com/server/11/admin_manual/maintenance/upgrade.html)

There are two options


1) Updater app, which is a Nextcloud App. I have not tried this yet but I will try it rst 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.

Nextclouds weakest point is probably upgrading. Not an easy process for sure.

I hope this all makes sense.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=81#respond)

Rafael says:
March 1, 2017 at 7:29 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-82)

Thanks for the swift clari cation! Yes, this all makes sense. If the updater app works as expected, it
will be great improvement over previous (owncloud) versions. Lets hope for the best

Again: thanks for sharing!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=82#respond)

nachoparker (https://github.com/nachoparker) says:


March 8, 2017 at 6:00 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-101)

Update:

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

I will get them xed for the upcoming release

Update: it works on the latest release

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 27/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Joan says:
March 3, 2017 at 11:06 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-88)

Thank you!!!!!!!!!!!!!!!

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

And (a little detail) it works!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=88#respond)

Steve O. says:
March 6, 2017 at 1:32 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-89)

Hello! I am a total noob at all this stu . I used your image and for the most part it is OK. I cant seem to change the
max le upload and download size. How do I do that? Thanks!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=89#respond)

nachoparker (https://github.com/nachoparker) says:


March 6, 2017 at 10:45 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-93)

[EDIT: nextcloudpi-config can now con gure this with the nc-limits option

in the les /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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=93#respond)

Steve O. says:
March 6, 2017 at 11:07 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-95)

Thanks! That is great! I will try it tonight!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=95#respond)

Steve O. says:
March 7, 2017 at 6:34 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-97)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 28/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=97#respond)

nachoparker (https://github.com/nachoparker) says:


March 8, 2017 at 5:57 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-100)

I will make this easier in the next release

Thank you for your feedback

Steve O. says:
March 8, 2017 at 6:04 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-102)

Thanks so much for the help! Totally awesome!

nachoparker (https://github.com/nachoparker) says:


March 10, 2017 at 5:40 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-109)

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
sed -i "s/upload_max_filesize=.*/upload_max_filesize=$MAX_FILESIZE/" /var/www/nextcloud/.user
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

Steve O. says:
March 6, 2017 at 2:51 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-90)

Also I can not seem to get Nextcloud to write to my external storage?

Thanks!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=90#respond)

nachoparker (https://github.com/nachoparker) says:


March 6, 2017 at 10:41 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-92)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 29/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

did you set up fstab to mount your external storage?


did you run the commands I posted with the right path?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=92#respond)

Steve O. says:
March 6, 2017 at 11:06 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-94)

YesI 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!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=94#respond)

nachoparker (https://github.com/nachoparker) says:


March 6, 2017 at 11:15 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-96)

what is the output of

mount

Steve O. says:
March 7, 2017 at 6:34 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-98)

Here is what it says:

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 30/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits
/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
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
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
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset

nachoparker (https://github.com/nachoparker) says:


March 8, 2017 at 4:59 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-99)

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
DIR=/home/pi/RAID1/ncdata
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

Jamie says:
March 8, 2017 at 10:52 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-103)

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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 31/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Great work by the way.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=103#respond)

budy says:
March 9, 2017 at 12:43 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-104)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=104#respond)

budy says:
March 9, 2017 at 3:27 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-105)

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 di erent server. I think, I
should be ne by just copying over the con g.php.

Again, great piece of work!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=105#respond)

Chris (http://kajell.de) says:


March 9, 2017 at 8:29 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-106)

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 le 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 le editing does work with the original image of rasbpian.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=106#respond)

nachoparker (https://github.com/nachoparker) says:


March 10, 2017 at 7:19 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-107)

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 le should work (see
https://ownyourbits.com/2017/02/06/raspbian-on-qemu-with-network-access/
(https://ownyourbits.com/2017/02/06/raspbian-on-qemu-with-network-access/) ).
From the top of my head, in order to get network access you can edit /etc/dhcpcd.conf , and include something
like this

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 32/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

#Custom static IP address for eth0.


interface eth0
static ip_address=192.168.0.8/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=107#respond)

Chris (http://kajell.de) says:


March 10, 2017 at 2:17 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-
108)

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 le. Maybe that is why i do not get a connection
(and this would explain the non working ssh also)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=108#respond)

Chris (http://kajell.de) says:


March 11, 2017 at 9:06 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-113)

So. your image does boot up on my pi zero w, but it wont 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 con rm that
or can anyone provide a solution?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=113#respond)

nachoparker (https://github.com/nachoparker) says:


March 11, 2017 at 9:27 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-114)

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)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=114#respond)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 33/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Chris (http://kajell.de) says:


March 11, 2017 at 9:43 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-
115)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=115#respond)

nachoparker (https://github.com/nachoparker) says:


March 12, 2017 at 9:28 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-117)

awesome

let us know

Chris (http://kajell.de) says:


March 12, 2017 at 9:22 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-116)

Cant 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 cant be loaded. Maybe this has
something to do with the kernel in your image? I already installed the rmware for the wi -chip (same as rpi3) and
also copied over existing les in / rmware/brcm to the zero w from an original raspbian 8 image to your image (on the
original raspbian image, the zero w works with wi ). 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:

https://packages.debian.org/jessie/kernel/ rmware-brcm80211 (https://packages.debian.org/jessie/kernel/ rmware-


brcm80211)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=116#respond)

olivier (http://Olivier) says:


June 22, 2017 at 1:40 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2048)

tried on pi2, that is already the low end in term of speed, just forget the idea of a pi zero

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2048#respond)

marcia wilbur (http://www.faqlinux.com) says:


July 1, 2017 at 10:21 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2125)

I can tell you that raspbian didnt enable wi or bluetooth for Jessie in June. I dont 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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 34/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Anyway, thats just pi0w info you can enable your wi and add ssh.
Then, you should be good.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2125#respond)

Cosmin says:
March 12, 2017 at 1:07 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-118)

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?

Thanks!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=118#respond)

nachoparker (https://github.com/nachoparker) says:


March 13, 2017 at 6:26 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-119)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=119#respond)

Petter says:
March 13, 2017 at 8:20 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-120)

Why not Nginx ? It seems that Nginx , especially for small devices like the PI is more suited.

Is searching all over the net to nd a good tutorial how to:

raspbian lite
mariadb
Nginx
Letsencrypt
php7

and so on,,, Your write up is very close, but lacks Nginx


Would love to see the perfect tutorial for a nextcloud installation that can be used live with a hostname for example
https://nextcloud.mydomain.com (https://nextcloud.mydomain.com)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=120#respond)

nachoparker (https://github.com/nachoparker) says:


March 13, 2017 at 10:20 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-123)

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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 35/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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, Lets Encrypt is the next thing I am going to include in nextcloudpi-con g

Stay tuned!

https://ownyourbits.com/2017/02/19/creating-a-minimal-debian-container-for-docker/
(https://ownyourbits.com/2017/02/19/creating-a-minimal-debian-container-for-docker/)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=123#respond)

ikker1337 says:
May 11, 2017 at 9:37 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-529)

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?

Cheers!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=529#respond)

Yves (http://fgroupcgs.org%20(of ine%20now)) says:


March 13, 2017 at 9:47 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-121)

Thanks, awesome work!

I came across your site by accident, I was looking for something to lets say pre-con gure 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.

Ive look at Nextcloud before, among numerous other possible solutions, such that I could access my PI from anywhere
and show o photos of my little girl on whatever system. Like you Ive got myself a domain name from no-ip.com and
my router provides an auto update feature for noip, easy. After a zillion tries, I found setting for my monitor that works
ne so I burn the image from my WIN 10 PC and replace the con g.txt le with my version. Unfortunately for me, I
decided to use the BTRFS le system for my 5T USB drive and I intend to get a few more. Anyway, all this to say Im
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 Im setup to boot from a
micro-SD card but the root le system is on a USB ash drive (EXT4). I want to be able to rebuild any part of the
system as easily as possible.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 36/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Your image le will de nitely bring me very close to what I want. I see you provide indications and or snippets for
many di erent options or solutions. For example with LetsEncrypt, Ill use that one for sure. Just to give another
example, I dont 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. Its not very complicated to do but every time you burn an image you have to start over from scratch. Its
prone to error, its very likely youll forget this or that and Im 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? Id 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, its possible Ill
never use a micro-SD again and Ill also go all the way with the BTRFS.

Thanks again, Im burning the image as we speak


Yves

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=121#respond)

nachoparker (https://github.com/nachoparker) says:


March 13, 2017 at 10:04 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-122)

well, thanks!

I am busy right now, so Ill answer in detail tomorrow ( its late here )

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=122#respond)

Yves (https://fgroupcgs.org) says:


March 14, 2017 at 6:11 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-
126)

To late ! Its very early here 2:11AM


Thanks,

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=126#respond)

Yves (https://fgroupcgs.org) says:


March 14, 2017 at 5:32 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-124)

Im glad I tried it and it work ned until I used this code to use :

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 37/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits
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 ne, except that the nc data
directory doesnt work now.

Any idea why?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=124#respond)

Yves (https://fgroupcgs.org) says:


March 14, 2017 at 6:08 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-125)

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
#1 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#2 {main}

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=125#respond)

Hans says:
March 14, 2017 at 12:03 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-128)

After using the full img and using raspi-con g to get a desktop after installing lightdm. There is no possibility to log in
with the user pi. Wether youve changed the passwd or not

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=128#respond)

nachoparker (https://github.com/nachoparker) says:


March 14, 2017 at 5:26 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-131)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 38/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=131#respond)

Yves (https://fgroupcgs.org) says:


March 14, 2017 at 2:15 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-129)

Id 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-con g to setup a
few things, password, etc.

All of this directly from PI but through SSH. When I came to the nextcloudpi-con g 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 Im 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 con gure the packages and or services one need, by this I mean passwords (so your rst 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 con gure it right away for public key or at least having the choice. Maybe, yes password login but
setup rewall for ssh over LAN only. One last thing, IMHO I dont think most people will stay on a SD card le 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 e ort into this and I dont want you to think I dont appreciate your work. I also know the
one size ts all theory doesnt 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 stu before your rst login.

Im 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,
Yves

PS. I dont see a donation button anywhere here. Ounce Im all setup and running I would certainly give something. I
would go as far as proposing my help for translating stu in French if its any help for others here.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=129#respond)

nachoparker (https://github.com/nachoparker) says:


https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 39/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

March 14, 2017 at 10:25 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-132)

Hello Yves,

First, thank you for your encouraging words and feedback.

You wrote about many things! so Ill 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 rst 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 gured I could help spread it this way.

I am kind of planning things as I go, and seeing what peoples 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 guring out some easy way to upgrade the system so peoples clouds get the latest
security updates. As for NextCloud, the latest release was xed 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


lets encrypt in nextcloudpi-con g
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 installer.sh 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
Lets 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 ./installer.sh letsencrypt.sh 192.168.0.130 (assuming that is your
RPi IP).

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

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

https://ownyourbits.com/2017/03/05/generic-software-installer-for-raspbian/
(https://ownyourbits.com/2017/03/05/generic-software-installer-for-raspbian/)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 40/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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 con gure it from nextcloudpi-con g. I have tested it in all cases I
could think of, but of course if someone nds 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. Ill 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.

https://ownyourbits.com/2017/02/06/raspbian-on-qemu-with-network-access/
(https://ownyourbits.com/2017/02/06/raspbian-on-qemu-with-network-access/)

I am really attered about your o er 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 eld of technology, like owning and
controlling your own private data. Just that. Many thanks anyway!!!

Nacho

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=132#respond)

Akshay says:
March 18, 2017 at 5:31 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-135)

Thanks for the image.. really useful

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=135#respond)

Wim says:
March 21, 2017 at 9:10 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-139)

Hi,

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

Otherwise you will receive a resource busy error message.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=139#respond)

Wim says:
March 23, 2017 at 7:02 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-142)

Hi,

Im 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 con g. php le to point the datadirectory to that location.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 41/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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, Im 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?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=142#respond)

nachoparker (https://github.com/nachoparker) says:


March 24, 2017 at 6:59 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-143)

Hi,
If you are using NextCloudPi, just type

sudo nextcloudpi-config

and you can change your data dir location in one of the options.

If you want to do it manually, have a look at my script nc-datadir

https://github.com/nachoparker/nextcloud-raspbian-generator/blob/master/nc-datadir.sh
(https://github.com/nachoparker/nextcloud-raspbian-generator/blob/master/nc-datadir.sh)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=143#respond)

Udo says:
March 26, 2017 at 11:42 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-147)

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 con guration to lower the cpu load and have a more responsive setup?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=147#respond)

nachoparker (https://github.com/nachoparker) says:


March 26, 2017 at 4:33 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-148)

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.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 42/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=148#respond)

John Huang (https://fmbase.tw/blog) says:


March 27, 2017 at 1:44 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-151)

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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=151#respond)

nachoparker (https://github.com/nachoparker) says:


March 27, 2017 at 5:49 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-153)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=153#respond)

Daan says:
March 30, 2017 at 9:50 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-166)

Hi,

Thank you for this image! I am trying to install the nextcloud app passman so i can replace lastpass. It wont 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 x it?

Thanks in advance!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=166#respond)

nachoparker (https://github.com/nachoparker) says:


March 30, 2017 at 2:44 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-168)

Hello,
I have not tried that App but NextCloudPi is just a normal NextCloud, so it shouldnt be di erent from other
NextCloud installations.

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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 43/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

It comes disabled by default

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=168#respond)

Daan says:
March 30, 2017 at 12:05 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-167)

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 didnt x it. ;/

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=167#respond)

nachoparker (https://github.com/nachoparker) says:


March 30, 2017 at 2:47 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-169)

Hello,

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

Try from

sudo nextcloudpi-config

In any case, I have successfully uploaded big les, 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 con guration? 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?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=169#respond)

Daan says:
March 30, 2017 at 7:32 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-170)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 44/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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 nd the log?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=170#respond)

Daan says:
March 30, 2017 at 7:47 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-171)

Thank you!!

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

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

nachoparker (https://github.com/nachoparker) says:


March 31, 2017 at 6:05 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-173)

haha I am glad it works

modsecurity needs more testing as people install Apps, I need to re ne 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

https://github.com/nachoparker/nextcloud-raspbian-generator/issues
(https://github.com/nachoparker/nextcloud-raspbian-generator/issues)

Colin Langdon says:


April 1, 2017 at 7:35 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-178)

Hi,
Ive just installed your image and Im impressed with how it has gone.
I am however having di culty connecting to my wi network, which is important to me.

Im 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 192.168.0.142
Everything works ne until I use nc-wi when I select ok to choose a network, no networks are found.

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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 45/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

# 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 ifcon g 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 wi was working ne when I tried a plain raspbian image, and the ethernet connection works ne now picking up
the static address from the router.

Im stuck, how do I get the wi to work?


Colin

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=178#respond)

olivier says:
April 2, 2017 at 3:39 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-184)

edit the supplicant le see


https://www.raspberrypi.org/documentation/con guration/wireless/wireless-cli.md
(https://www.raspberrypi.org/documentation/con guration/wireless/wireless-cli.md)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=184#respond)

nachoparker (https://github.com/nachoparker) says:


April 2, 2017 at 4:46 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-185)

when you go to nc-wifi , hit P (for preferences) and in the box wireless interface type wlan0.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 46/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Hit F10 to save, and then R to scan

I will automate that step on the next release

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=185#respond)

Colin Langdon says:


April 3, 2017 at 5:38 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-193)

Thanks, thats great

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=193#respond)

Matt W says:
April 2, 2017 at 1:59 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-182)

I have connected my USB hard drive but how do I mount it to show up in /media/?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=182#respond)

nachoparker (https://github.com/nachoparker) says:


April 2, 2017 at 3:39 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-183)

[EDIT: this manual con guration 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 youll nd tons of info.

I will make this easier on upcoming releases

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=183#respond)

Matt W says:
April 2, 2017 at 6:43 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-188)

thanks i appreciate the quick response.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=188#respond)

Matt W says:
April 2, 2017 at 7:13 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-189)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 47/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

i gured 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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=189#respond)

Matt W says:
April 2, 2017 at 8:17 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-190)

I gured this issue out. if anyone runs into this problem i found this website to be very helpful
https://www.htpcguides.com/properly-mount-usb-storage-raspberry-pi/
(https://www.htpcguides.com/properly-mount-usb-storage-raspberry-pi/)

olivier says:
April 2, 2017 at 5:10 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-186)

the swapon -s return


Filename Type Size Used Priority
/dev/sda1 partition 67108860 0 -1

what shoud I put in the nc-swap le? is it /dev/sda1?

Thks

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=186#respond)

nachoparker (https://github.com/nachoparker) says:


April 2, 2017 at 5:51 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-187)

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 swap le 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 rst

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=187#respond)

tg says:

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 48/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

April 8, 2017 at 9:42 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-202)

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?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=202#respond)

tg says:
April 9, 2017 at 7:44 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-204)

moving the data directory only seems to work but still I could not nd the directory for the new user that I
created on the disk though the les show in web interface. The admin user and the les 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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=204#respond)

tg says:
April 9, 2017 at 1:49 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-205)

it is working now thanks.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=205#respond)

ezio says:
April 11, 2017 at 1:20 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-209)

i got this error on my refox 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
certi cate 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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 49/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=209#respond)

nachoparker (https://github.com/nachoparker) says:


April 11, 2017 at 5:55 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-210)

read the Advanced con guration section above and this article for the explanation and the solution.

https://ownyourbits.com/2017/03/17/lets-encrypt-installer-for-apache/
(https://ownyourbits.com/2017/03/17/lets-encrypt-installer-for-apache/)

Basically, you can x it from sudo nextcloudpi-config

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=210#respond)

ezio says:
April 11, 2017 at 7:09 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-211)

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 o ine?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=211#respond)

nachoparker (https://github.com/nachoparker) says:


April 11, 2017 at 2:50 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-214)

I am afraid not. Only if a certi cation authority (CA) veri es that your certi cate 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 certi cate.

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

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

travel says:
April 14, 2017 at 12:51 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-228)

Hello,
is there a chance to implement spdyn.de ?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=228#respond)

nachoparker (https://github.com/nachoparker) says:


April 14, 2017 at 1:08 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-229)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 50/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=229#respond)

travel says:
April 14, 2017 at 3:48 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-230)

thx 4 the quick request. I have think its only a small quick change in a script. but it looks like its more.no 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.
cYu

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=230#respond)

travel says:
April 16, 2017 at 12:07 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-248)

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.
cYu

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=248#respond)

travel says:
April 16, 2017 at 12:10 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-249)

i forgot. whats happen with the externel drive IN nextcloud ? is that the same like i bind it in the pi?
Here also a good tutorial in german
https://www.canox.net/2016/06/die-eigene-cloud-mit-dem-raspberry-pi-und-nextcloud/
(https://www.canox.net/2016/06/die-eigene-cloud-mit-dem-raspberry-pi-und-nextcloud/)
And here how to bind a spdns updater
https://www.canox.net/2016/06/die-eigene-cloud-mit-dem-raspberry-pi-und-nextcloud/#spdyn-client
(https://www.canox.net/2016/06/die-eigene-cloud-mit-dem-raspberry-pi-und-nextcloud/#spdyn-client)
cYu

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=249#respond)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 51/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

nachoparker (https://github.com/nachoparker) says:


April 17, 2017 at 6:55 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-251)

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 di erence with nc-data is that you move all of your data directory to the USB drive

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=251#respond)

travel says:
April 17, 2017 at 5:34 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-252)

Hello,
i think that is what i mean
The di erence 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?
cYu

nachoparker (https://github.com/nachoparker) says:


April 17, 2017 at 6:03 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-253)

bind the folder


re-create users
import contacts
import calendar/tasks ( they go together )

jnihil says:
April 18, 2017 at 1:00 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-254)

Thanks a million for providing us with NextCloudPi. Its great work, and we very much appreciate your e ort. Thank
you!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=254#respond)

Shadowstreik says:
April 18, 2017 at 6:43 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-256)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 52/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=256#respond)

nachoparker (https://github.com/nachoparker) says:


April 18, 2017 at 7:05 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-257)

so what speci c issues are you having? working like a charm for me so far (in the lets encrypt post, please)

note that from, 03-31-2017 there is a remote update system, so maybe it would be worth for you to use a recent
image in order to get updates and xes easily.

See

https://ownyourbits.com/2017/03/31/nextcloudpi-gets-remote-updates-logs-to-ram-easy-wi -and-more/
(https://ownyourbits.com/2017/03/31/nextcloudpi-gets-remote-updates-logs-to-ram-easy-wi -and-more/)

I am glad you are enjoying it!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=257#respond)

zow says:
April 19, 2017 at 11:05 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-260)

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 dont
have permission to upload or create les here]

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=260#respond)

nachoparker (https://github.com/nachoparker) says:

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 53/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

April 19, 2017 at 5:44 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-262)

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 .

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=262#respond)

zow says:
April 24, 2017 at 7:57 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-300)

Thank you, Ive found how to, and learnt about umask and chmod/chown options, if anyone looks for
this: Ive 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 havnt 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 wont
break my FS.
For now Im doing sudo shutdown -h now and then powero the raspi for unpluging the usb

Now Im also trying the encryption module, It works great, it doesnt secure the lenames.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=300#respond)

nachoparker (https://github.com/nachoparker) says:


April 24, 2017 at 3:07 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-301)

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 le at that moment.

what is the encryption module? some NextCloud app?

tg says:
April 22, 2017 at 1:05 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-288)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=288#respond)

nachoparker (https://github.com/nachoparker) says:

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 54/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

April 23, 2017 at 2:15 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-297)

wow, that is not normal at all.

Did you install any extra software?

Lets see, what is the output of the following command

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=297#respond)

zow says:
April 25, 2017 at 6:12 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-306)

It doesnt 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 x it, for now you
have to disable thumbnails)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=306#respond)

nachoparker (https://github.com/nachoparker) says:


April 25, 2017 at 6:16 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-307)

awesome, Ill give it a try!

Jason says:
April 26, 2017 at 2:46 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-340)

Noob question. Im new to linux, so Im 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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=340#respond)

nachoparker (https://github.com/nachoparker) says:


April 26, 2017 at 3:01 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-341)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 55/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Actually my recommendation is that you wait for two days until I nish 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.

Now
1) setup stu through nextcloudpi-con g
2) format to ext4 the HDD
3) set it up in fstab

In two days (hopefully)


1) setup through nextcloudpi-con g, including activating automount feature

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=341#respond)

Jason says:
April 26, 2017 at 3:36 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-342)

(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 & nally dump
Dropbox/google services/iCloud sync. (So, excited to do this!)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=342#respond)

nachoparker (https://github.com/nachoparker) says:


April 26, 2017 at 3:39 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-343)

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 stu 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!

Jason says:
April 26, 2017 at 9:34 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-349)

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?

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 56/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=349#respond)

nachoparker (https://github.com/nachoparker) says:


April 26, 2017 at 10:06 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-350)

no, that should be ne

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=350#respond)

Jason says:
April 26, 2017 at 10:54 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-351)

Just a heads up. Today I couldnt get my HDMI to work on rst 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?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=351#respond)

nachoparker (https://github.com/nachoparker) says:


April 27, 2017 at 5:36 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-358)

The rst time you copy the image to an SD card SSH is disabled by default.
If you do not have a monitor and need to connect headless (through SSH) the method is to place an (empty) le
called ssh in the boot partition (the rst one) of the SD card.

This will enable SSH on your next boot.

I use that trick to access my QEMU images. See here

https://github.com/nachoparker/qemu-raspbian-network/blob/master/qemu-pi.sh#L108
(https://github.com/nachoparker/qemu-raspbian-network/blob/master/qemu-pi.sh#L108)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=358#respond)

Jason says:
April 27, 2017 at 7:06 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-359)

Interesting.using the version from- (3-13-2017), I was able to ssh in from a computer on my local
LAN, on fresh rst, rst time putting an sd card in Pi3. I copied img using etcher, not sure if that
matters. Also, Im new to Linux, so I wasnt sure if that is a default setting or not.
Also, I plugged in a di erent HDMI monitor & now thats how Im going to do setup. I just wanted to
pass along that info about ssh. I can send pics if youd like.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=359#respond)

nachoparker (https://github.com/nachoparker) says:


May 1, 2017 at 9:21 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-419)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 57/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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

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

jnihil says:
April 27, 2017 at 4:29 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-356)

Upgrading to 11.0.3 fails with le permission problems: https://github.com/nextcloud/server/issues/4509


(https://github.com/nextcloud/server/issues/4509)
What is the workaround?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=356#respond)

nachoparker (https://github.com/nachoparker) says:


April 27, 2017 at 4:34 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-357)

[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 xed the permissions. I created that issue to
report it to them. (look, it is reported by nachoparker )

I xed 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

https://github.com/nextcloud/server/issues/4505 (https://github.com/nextcloud/server/issues/4505)

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
les, re-import your calendars, etc)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=357#respond)

jnihil says:
April 27, 2017 at 10:06 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-
370)

The upgrade from 11.0.2 to 11.0.3 fails prior to the actual upgrade because of the permissions check. So
NC is ne, its 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. Ill wait

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 58/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

a little longer until the NC people sort it out. But, removing the hardening of permissions in the
documentation isnt going to solve the problem for those already stuck with the hardened
permissions

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=370#respond)

nachoparker (https://github.com/nachoparker) says:


April 27, 2017 at 10:53 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-371)

interesting, I just tested this on a fresh NextCloudPi image and permissions are ok. Actually, I
reported it

https://github.com/nextcloud/server/issues/4509
(https://github.com/nextcloud/server/issues/4509)

and they told me that they just dropped the hardened permissions recommendation. Makes
sense: it never worked.

https://github.com/nextcloud/documentation/pull/431
(https://github.com/nextcloud/documentation/pull/431)

Like I said either copy your les/calendars/whatever and install a fresh NCP 11.0.3 or do the
update manually

Petter Aarsand says:


April 27, 2017 at 8:05 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-363)

How come i setup my pi, got wi 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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=363#respond)

nachoparker (https://github.com/nachoparker) says:


April 27, 2017 at 8:36 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-365)

I try not to respond to issues here. Please, open an issue report in https://github.com/nachoparker/nextcloud-
raspbian-generator/issues (https://github.com/nachoparker/nextcloud-raspbian-generator/issues)

You can still access your cloud by accepting a security exception (its an option at the bottom of the error
page), but if lets encrypt went well that should not happen.

Please, post all steps prior to the error, and the output of nextcloudpi-config > letsencrypt

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=365#respond)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 59/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Wil says:
May 4, 2017 at 6:41 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-451)

I found this link to be a very good tutorial on setting up your wi on a raspberry pi:

http://weworkweplay.com/play/automatically-connect-a-raspberry-pi-to-a-wi -network/
(http://weworkweplay.com/play/automatically-connect-a-raspberry-pi-to-a-wi -network/)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=451#respond)

nachoparker (https://github.com/nachoparker) says:


May 4, 2017 at 6:51 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-453)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=453#respond)

Wil says:
May 4, 2017 at 3:48 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-458)

I initially tried the nextcloudpi-con g option to con gure my wi , 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
con gure 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 gure 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.

nachoparker (https://github.com/nachoparker) says:


May 4, 2017 at 5:36 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-459)

I see, good job

As long as it works for you thats ne. If you want to learn further, a more standard approach
is to con gure the wi module to start upon boot in /etc/modules.d or /etc/modprobe.d , depending
on the distro .

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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 60/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Petter Aarsand says:


April 27, 2017 at 8:41 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-366)

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

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=366#respond)

Petter Aarsand says:


April 27, 2017 at 8:49 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-367)

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

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

Ive successfully managed to setup this on LAN cable, but its my rst try on wi , and it cannot work.

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=367#respond)

nachoparker (https://github.com/nachoparker) says:


May 1, 2017 at 9:16 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-418)

I am on vacation now so I have limited internet access

Read the website or other tutorials, you are almost there!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=418#respond)

Valentin says:
April 28, 2017 at 2:56 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-375)

Ive 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 didnt expect it to be so slow.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=375#respond)

Jason says:
April 28, 2017 at 3:52 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-377)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 61/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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-con g ?
Thanks for your hard work NachoParker!!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=377#respond)

nachoparker (https://github.com/nachoparker) says:


May 1, 2017 at 9:24 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-420)

Yeah, just copy the image again and setup fstab, then recon gure with nextxloudpi-con g.
after vacation I will include automount so the fstab step can be automatic

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=420#respond)

Valentin Goronjic says:


April 29, 2017 at 11:45 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-396)

Ok, I managed to x 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 dont know how to x 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,x-systemd.requires=network-online.target 0 0

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

NFS is not an option as my NAS uses di erent users than the PI for the http folders.
Because of this, nextcloud doesnt even write anything in the log (as it somehow doesnt have the permission to write
in it, strangely).
Is it maybe an Apache problem? That it doesnt 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!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=396#respond)

nachoparker (https://github.com/nachoparker) says:


May 1, 2017 at 9:30 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-421)

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

Try to follow my post on samba or of tutorials.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 62/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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-con g

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=421#respond)

Andy says:
April 29, 2017 at 8:16 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-402)

Hi, Great overall experience so thanks but I get this issue when trying to setup letsencrypt

[EDIT: moved here https://github.com/nachoparker/nextcloud-raspbian-generator/issues/9


(https://github.com/nachoparker/nextcloud-raspbian-generator/issues/9) ]

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=402#respond)

nachoparker (https://github.com/nachoparker) says:


May 1, 2017 at 9:33 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-422)

See answer here.


https://github.com/nachoparker/nextcloud-raspbian-generator/issues/9
(https://github.com/nachoparker/nextcloud-raspbian-generator/issues/9)
Read post carefully about letsencrypt also, you need to input correct domain

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=422#respond)

Wil says:
April 30, 2017 at 5:39 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-406)

After some e ort I nally 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 wi .

When I rst 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, con gure the trusted_domains
setting in con g/con g.php. An example con guration is provided in con g/con g.sample.php.
Depending on your con guration, 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 con g option before I can expect to have a functional Cloud service on my
Raspberry Pi? As things stand now I cant 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 Im stuck in the mud right now and
dont know how to get out.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=406#respond)

nachoparker (https://github.com/nachoparker) says:

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 63/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

May 1, 2017 at 9:46 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-425)

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

Cant 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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=425#respond)

Wil says:
May 1, 2017 at 10:06 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-429)

Anybody??

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=429#respond)

nachoparker (https://github.com/nachoparker) says:


May 2, 2017 at 8:59 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-432)

wil, I responded to you yesterday, see my answer above or click the link

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-425
(https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-425)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=432#respond)

Wil says:
May 4, 2017 at 6:15 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-450)

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

jnihil says:
April 30, 2017 at 12:54 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-409)

nachoparker says:
Like I said either copy your les/calendars/whatever and install a fresh NCP 11.0.3 or do the update manually

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 64/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

That x isnt acceptable since Ive already made many non-NC con gurations, and rebuilding an entire system just
because of some messed-up le 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 wont result in
rebuilding the entire system.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=409#respond)

WijbeT says:
April 30, 2017 at 10:48 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-414)

Hope you will be satis ed 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
For me Thanks NachoParker! Excelent work.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=414#respond)

nachoparker (https://github.com/nachoparker) says:


May 1, 2017 at 9:35 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-423)

Thank you for your words

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=423#respond)

nachoparker (https://github.com/nachoparker) says:


May 2, 2017 at 8:45 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-431)

Like I said, I xe 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 di erent 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 con guration, the error message,
etc

https://github.com/nachoparker/nextcloud-raspbian-generator/issues
(https://github.com/nachoparker/nextcloud-raspbian-generator/issues)

Also, if it is a problem with permissions, you can just x 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, x it

thank you

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 65/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=431#respond)

Stefan says:
May 2, 2017 at 4:53 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-437)

Sorry for this stupid question but i know nothing about Linux.
I installed this fantastic piece of software and everything works ne but.
Im used to use owncloud for synchronizing contacts to windows phones. Now i want to switch to nextcloud. Therefore
i need to download the certi cate to install it on the phone. I did this lets encrypt con g but cannot nd the certi cate
le which i assume is called something like .pem

Please

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=437#respond)

nachoparker (https://github.com/nachoparker) says:


May 3, 2017 at 4:55 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-439)

You dont need to install any self signed certi cate. Letsencrypt signs the certi cate for you and your phone
can verify it without installing anything

Please read the post about letsencrypt carefully for a longer explanation

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=439#respond)

stkpxl says:
May 3, 2017 at 8:47 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-448)

Love the work youve 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 couldnt do a custom one). Anyway, Ive 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, Id gure Id ask you rst. 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 Im using a DDNS,
correct?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=448#respond)

nachoparker (https://github.com/nachoparker) says:


May 4, 2017 at 5:39 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-460)

I am on vacation for another 10 days,so I will get back to you when I have access to my computer

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=460#respond)

stkpxl says:
May 6, 2017 at 2:55 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-488)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 66/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Thanks!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=488#respond)

stkpxl says:
May 23, 2017 at 8:47 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-633)

Just wondering if youve been able to get a chance to look at these issues?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=633#respond)

nachoparker (https://github.com/nachoparker) says:


May 24, 2017 at 6:32 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-637)

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 dont see the relationship with DDNS

Jeffery Frederick says:


May 5, 2017 at 12:37 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-462)

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 stu . 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 le and boot on a RPi? Once Ive 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-
con g to setup everything, correct?

Thanks for all your work on this!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=462#respond)

nachoparker (https://github.com/nachoparker) says:


May 5, 2017 at 6:19 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-463)

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

Then, use nextcloudpi-con g to con gure 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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 67/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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

Those are the options

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=463#respond)

Jeff Frederick says:


May 8, 2017 at 3:01 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-504)

Thanks! I will give the image a try.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=504#respond)

Dave says:
May 5, 2017 at 5:26 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-467)

This is impressive and works awlessly 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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=467#respond)

nachoparker (https://github.com/nachoparker) says:


May 6, 2017 at 1:41 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-483)

Hi
Thx
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 wont feel a di erence

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

https://ownyourbits.com/2017/03/25/nextcloud-a-security-analysis/
(https://ownyourbits.com/2017/03/25/nextcloud-a-security-analysis/)

https://ownyourbits.com/2017/03/23/modsecurity-web-application- rewall-for-nextcloud/
(https://ownyourbits.com/2017/03/23/modsecurity-web-application- rewall-for-nextcloud/)

I really value the added security of modsecurity for Apache.

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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 68/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Look this for more details

http://www.hostingadvice.com/how-to/nginx-vs-apache (http://www.hostingadvice.com/how-to/nginx-vs-
apache)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=483#respond)

ivo says:
May 5, 2017 at 7:20 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-469)

sudo nextcloudpi-con g

Command not found

Why?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=469#respond)

Floating Dream says:


May 6, 2017 at 6:09 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-478)

You should rst run sudo raspi-con g and then choose the rst option to access to nextcloudpi-con g.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=478#respond)

nachoparker (https://github.com/nachoparker) says:


May 6, 2017 at 1:52 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-485)

If you do not have that command that is because you are not running my image

I created those commands for nextcloudpi

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=485#respond)

Floating Dream says:


May 6, 2017 at 3:57 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-475)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=475#respond)

nachoparker (https://github.com/nachoparker) says:


May 6, 2017 at 1:50 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-484)

I am not clear on wether you intend to setup a proxy or replace the web server

I guess that any standard guide will help. As for the motivation for Apache, see this answer

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 69/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-483
(https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-483)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=484#respond)

Floating Dream says:


May 8, 2017 at 1:39 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-503)

Thx a lot!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=503#respond)

Jose says:
May 6, 2017 at 10:26 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-480)

Hi nachoparker,

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

Could you please be more speci c on what is properly con gured to automount upon boot?

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

Thank you.

Jose

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=480#respond)

sandro says:
May 6, 2017 at 12:38 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-481)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=481#respond)

nachoparker (https://github.com/nachoparker) says:


May 6, 2017 at 2:06 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-487)

I am on vacation so cant help much but look into the code.

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

./install-nextcloud.sh 192.168.1.10

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 70/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

And nextcloud with

./installer.sh nextcloud.sh 192.168.1.10

Look for instance in

https://github.com/nachoparker/nextcloud-raspbian-generator/blob/master/batch.sh
(https://github.com/nachoparker/nextcloud-raspbian-generator/blob/master/batch.sh)

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

https://ownyourbits.com/2017/03/05/generic-software-installer-for-raspbian/
(https://ownyourbits.com/2017/03/05/generic-software-installer-for-raspbian/)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=487#respond)

Fabian says:
May 6, 2017 at 11:49 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-495)

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?

Thanks

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=495#respond)

nachoparker (https://github.com/nachoparker) says:


May 7, 2017 at 7:07 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-496)

Well, it would be another layer of security, even though the tra c is already encrypted

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=496#respond)

Fabian says:
May 7, 2017 at 7:22 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-502)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=502#respond)

Floating Dream says:


May 8, 2017 at 4:55 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-505)

Hello friend,

Thanks for your amazing works.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 71/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

I currenttly have nextcloud installed on my SD card, and the cards 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 doesnt support this speed level
SD card);
2. Storaging NCs database and les in an external USB driven hard disk.

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

Thanks!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=505#respond)

Randy Cheung says:


May 8, 2017 at 6:34 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-506)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=506#respond)

nachoparker (https://github.com/nachoparker) says:


May 11, 2017 at 6:10 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-534)

Look at the code

https://github.com/nachoparker/nextcloud-raspbian-generator/blob/master/nextcloud.sh
(https://github.com/nachoparker/nextcloud-raspbian-generator/blob/master/nextcloud.sh)

# slow transfers will be killed after this time

cat >> /var/www/nextcloud/.user.ini < << "max_execution_time=$MAXTRANSFERTIME_"

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=534#respond)

Frank says:
May 8, 2017 at 4:35 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-512)

Hello,

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

Do you have any idea how I cloud solve that?

Btw great work!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=512#respond)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 72/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

nachoparker (https://github.com/nachoparker) says:


May 8, 2017 at 7:20 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-514)

You are probably editing the trusted domain list directly in con g.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-con g

Either that, or disable the behavior

sudo systemctl disable nextcloud-domain

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=514#respond)

Flipthemouse (https: ipcloud.hopto.org) says:


May 9, 2017 at 9:05 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-517)

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 certi cate 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 Certi cate so better
no new install. What can be the problem and how can I solve it. Any ideas.? Best regards ipthemouse

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=517#respond)

James Hop says:


May 10, 2017 at 3:07 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-521)

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!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=521#respond)

nachoparker (https://github.com/nachoparker) says:


May 11, 2017 at 6:07 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-533)

That is a redirection that nextcloud performs. AFAIK the way to change that involves tweaking NC code

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=533#respond)

liver says:
May 10, 2017 at 11:29 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-522)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 73/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=522#respond)

nachoparker (https://github.com/nachoparker) says:


May 11, 2017 at 6:05 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-532)

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 wont be needed

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=532#respond)

Xtech says:
May 12, 2017 at 2:09 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-535)

I am having a terrible time getting the NC data stored on a usb stick. I have tried the 2 items in Nexcloudpi-con g and
also tried to edit the fstab le. 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 gure 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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=535#respond)

nachoparker (https://github.com/nachoparker) says:


May 17, 2017 at 7:43 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-578)

I am working in automount at the moment. Your problem is that you are using a drive formatted in a non Unix
lesystem, such as VFAT or NTFS. I recommend you format to ext4, because that lesystem is aware of le
permissions and because the Linux driver has way better performance

[EDIT: automount feature is available https://ownyourbits.com/2017/05/24/nextcloudpi-gets-automount-


backups-nextcloud-online-installation-nextcloud-12-and-more/
(https://ownyourbits.com/2017/05/24/nextcloudpi-gets-automount-backups-nextcloud-online-installation-
nextcloud-12-and-more/) ]

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=578#respond)

Matthias says:
May 12, 2017 at 5:32 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-536)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 74/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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 Con g/con g.php to add a trusted domain.

How i must do it and where nd i this le ?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=536#respond)

Happydude (https://ownyourbits.com/about/) says:


May 12, 2017 at 4:37 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-539)

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 bundledall 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 awesomenesslooking forward to many other bright features.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=539#respond)

nachoparker (https://github.com/nachoparker) says:


May 17, 2017 at 7:42 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-577)

thank you! That is exactly what I am after lowering the barrier for people to set this up or upgrade it

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=577#respond)

Lukas says:
May 12, 2017 at 10:38 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-541)

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 les with nextcloudpi-con g: nc-databse and nc-datadir to the mounted
drive at /media/PiDrive. In the folders for the db and data are some nextcloud les, but by copying les on the cloud,
nextcloud claims there is no space left. Do I have to do something else?

Kind regards

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=541#respond)

nachoparker (https://github.com/nachoparker) says:


May 17, 2017 at 7:40 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-576)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 75/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

That probably has something to do with your USB drive or the way you mounted it. Maybe the
permissions/mount ags

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=576#respond)

Akshay says:
May 14, 2017 at 6:53 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-550)

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 ?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=550#respond)

nachoparker (https://github.com/nachoparker) says:


May 17, 2017 at 7:37 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-574)

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 Lets Encrypt in order to obtain a trusted certi cate. 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.

https://ownyourbits.com/2017/03/09/dnsmasq-as-dns-cache-server-for-nextcloudpi-and-raspbian/
(https://ownyourbits.com/2017/03/09/dnsmasq-as-dns-cache-server-for-nextcloudpi-and-raspbian/)
https://ownyourbits.com/2017/03/17/lets-encrypt-installer-for-apache/
(https://ownyourbits.com/2017/03/17/lets-encrypt-installer-for-apache/)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=574#respond)

Akshay says:
May 18, 2017 at 7:43 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-582)

Thanks

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=582#respond)

ikker1337 says:
May 15, 2017 at 6:59 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-552)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 76/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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?

Cheers!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=552#respond)

nachoparker (https://github.com/nachoparker) says:


May 17, 2017 at 7:34 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-573)

Look at the code. I install a more recent apache version from the stretch repository

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=573#respond)

noether (http://dobratech.com) says:


May 18, 2017 at 9:25 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-590)

Hi man,

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

This page isnt working

192.168.1.100 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?

Thanks!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=590#respond)

nachoparker (https://github.com/nachoparker) says:


May 20, 2017 at 9:31 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-602)

what steps or con gurations did you take prior to the error?

[EDIT: look here https://github.com/nextcloud/nextcloudpi/issues/15


(https://github.com/nextcloud/nextcloudpi/issues/15) ]

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=602#respond)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 77/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Randy says:
May 19, 2017 at 8:39 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-592)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=592#respond)

randy says:
May 19, 2017 at 3:54 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-595)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=595#respond)

nachoparker (https://github.com/nachoparker) says:


May 20, 2017 at 9:34 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-604)

That seems like a NextCloud issue to me. I have also tried di erent 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 x for this]

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=604#respond)

Rrrr says:
May 21, 2017 at 1:06 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-618)

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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=618#respond)

nachoparker (https://github.com/nachoparker) says:


May 21, 2017 at 10:47 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-623)

Hello,

would you mind explaining con guration steps and details about the error that you are seeing here?

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 78/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://github.com/nachoparker/nextcloud-raspbian-generator/issues
(https://github.com/nachoparker/nextcloud-raspbian-generator/issues)

This way we can better track the issue.

Thanks for the feedback

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=623#respond)

Sandro says:
May 23, 2017 at 10:08 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-634)

Hello,
just 2 questions; Im using your last image:
1: I want to use the last version of fail2ban but I see its already installed but not active. can you con rm?
2: looking at apache log les Ive seen the external ip address connecting to nextcloud is never the one of my ISP;
which apache module is causing this behavior?
thanks!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=634#respond)

nachoparker (https://github.com/nachoparker) says:


May 24, 2017 at 6:09 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-636)

1: yes
2: that is not strange. In any case, no apache module will ever determine what external address accessess your
server.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=636#respond)

clanger says:
May 26, 2017 at 8:53 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-651)

[EDIT] moved to https://github.com/nachoparker/nextcloud-raspbian-generator/issues/14


(https://github.com/nachoparker/nextcloud-raspbian-generator/issues/14)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=651#respond)

nachoparker (https://github.com/nachoparker) says:


May 26, 2017 at 12:09 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-653)

hello,
please, could you copy-paste this here?

https://github.com/nachoparker/nextcloud-raspbian-generator/issues
(https://github.com/nachoparker/nextcloud-raspbian-generator/issues)

thanks for the feedback

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 79/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=653#respond)

clanger says:
May 26, 2017 at 11:22 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-655)

Thanks ! added
https://github.com/nachoparker/nextcloud-raspbian-generator/issues/14 (https://github.com/nachoparker/nextcloud-
raspbian-generator/issues/14)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=655#respond)

clanger says:
May 27, 2017 at 4:50 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-657)

I think I xed 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 x, ended up with NO web GUI, then how I reversed it and now its
working ok.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=657#respond)

nachoparker (https://github.com/nachoparker) says:


May 27, 2017 at 8:55 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-661)

awesome, good job!

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

Ill have a look at it later

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=661#respond)

Rrrr says:
May 27, 2017 at 2:27 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-656)

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. Heres 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.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 80/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=656#respond)

clanger says:
May 27, 2017 at 4:56 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-658)

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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=658#respond)

nachoparker (https://github.com/nachoparker) says:


May 27, 2017 at 8:42 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-660)

It works ne for me here.

It must be an issue external to NextCloudPi, maybe your SD card or even power unit.

You can try doing it while running top from SSH to see what the rpi is doing when it becomes irresponsive

Again, please refrain from asking for support here, use

https://github.com/nachoparker/nextcloud-raspbian-generator/issues/
(https://github.com/nachoparker/nextcloud-raspbian-generator/issues/)

instead for that.

Thanks

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=660#respond)

NeilA says:
May 27, 2017 at 2:30 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-662)

Setting the week de nition (Sat-Sun vs Mon-Sun)

The Calendar week de nition is the US standard Sat-Sun. In Europe it is Mon-Sun. This setting is dependent on the
Language setting in the personal settings which in this image has only has the option for English (US). Please could
you consider adding English (British English) in a future update. See:
https://help.nextcloud.com/t/calendar-week-to-start-on-monday-not-sunday/5081
(https://help.nextcloud.com/t/calendar-week-to-start-on-monday-not-sunday/5081)

Thanks.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 81/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=662#respond)

NeilA says:
May 27, 2017 at 2:32 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-663)

Sorry I meant Sun Sat vs Mon Sun

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=663#respond)

nachoparker (https://github.com/nachoparker) says:


June 5, 2017 at 10:42 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-
1375)

Sure, would you like to formally request this as an enhancement in


https://github.com/nextcloud/nextcloudpi/issues (https://github.com/nextcloud/nextcloudpi/issues) ?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1375#respond)

Leonardo says:
May 27, 2017 at 6:32 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-664)

Hey! Great work! Loving how easy it is to setup everything. Ive got only one problem: Cant setup my external drive.
The automount works awlessly, but when I go to the nc-datadir option and set it to /media/Cloud (the drives 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?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=664#respond)

nachoparker (https://github.com/nachoparker) says:


May 27, 2017 at 7:59 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-666)

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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=666#respond)

Mason says:
May 28, 2017 at 6:08 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-670)

Thanks for a great article. Very helpful.

Curious if you are aware of pagekite? http://pagekite.net/ (http://pagekite.net/) 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?

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 82/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=670#respond)

nachoparker (https://github.com/nachoparker) says:


May 30, 2017 at 8:32 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-684)

mmm I have not heard of those, only pagekite, but I havent seen into it. Ill have a look at them, thanks

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=684#respond)

KJ says:
May 29, 2017 at 11:30 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-677)

Hey Nachoparker,

I updated my PHP 7.0 using sudo apt-get update + upgrade and then updated my NC instance to v12.
Now Im having the same error as these folks. https://help.nextcloud.com/t/php-opcache-not-correctly/12925/10
(https://help.nextcloud.com/t/php-opcache-not-correctly/12925/10)
The admin console keeps saying that my opcache isnt con gured properly.

Is there anything I can do using nextcloudpi-con g to x this without losing all my data? Ive modi ed the php.ini
les in cli and fpm, restarted apache. Modi ed opcache.ini le. Restarted, no avail

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=677#respond)

nachoparker (https://github.com/nachoparker) says:


May 30, 2017 at 8:33 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-685)

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

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=685#respond)

sfb says:
May 30, 2017 at 9:19 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-681)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=681#respond)

nachoparker (https://github.com/nachoparker) says:


May 30, 2017 at 8:31 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-683)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 83/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

did you do anything special? any update on the system or anything?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=683#respond)

sfb says:
May 31, 2017 at 8:56 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-690)

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 dont know where to start troubleshooting

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=690#respond)

nachoparker (https://github.com/nachoparker) says:


June 1, 2017 at 5:06 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-696)

you can start by reading the logs tail -f /var/www/nextcloud/data/*.log (assuming you did not
move your datafolder)

benoki says:
June 1, 2017 at 1:53 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-698)

Same here!
Mine just died aswell..
At rst, Apache didnt start anymore.
Now its running but it doesnt load any page anymore
Maybe it has something to do with the letsencrypt renewal?
Its about 1 month now since I installed it. Any thouhts on this?
Apache Log doesnt tell anything spectacular.

nachoparker (https://github.com/nachoparker) says:


June 1, 2017 at 4:04 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-700)

wow, I have not had that issue. Would you kindly open a report here so we can x it ASAP?

https://github.com/nachoparker/nextcloudpi/issues
(https://github.com/nachoparker/nextcloudpi/issues)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 84/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Stan says:
June 13, 2017 at 6:35 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-1979)

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.

nachoparker (https://github.com/nachoparker) says:


June 13, 2017 at 3:11 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-1982)

Probably an issue with having the database in a USB drive that goes to sleep. Please, lets keep
support and technical question here (https://github.com/nextcloud/nextcloudpi/issues)

Ralf Jahns says:


June 2, 2017 at 4:22 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-705)

Cant 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 https://github.com/nextcloud/nextcloudpi/issues/21


(https://github.com/nextcloud/nextcloudpi/issues/21) ]

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

Best Regards
Ralf

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=705#respond)

nachoparker (https://github.com/nachoparker) says:


June 5, 2017 at 6:59 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-737)

Hello,

Please, if you want to ask general questions, or general help use the forums
https://help.nextcloud.com/c/support/appliances-docker-snappy-vm
(https://help.nextcloud.com/c/support/appliances-docker-snappy-vm)

If you have a speci c technical question, or something does not work, please report it to be xed at
https://github.com/nextcloud/nextcloudpi/issues (https://github.com/nextcloud/nextcloudpi/issues)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 85/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=737#respond)

Ralf Jahns says:


June 5, 2017 at 8:32 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-849)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=849#respond)

darkPhoenix says:
June 3, 2017 at 3:33 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-711)

(Sorry for bad English, Im German)

I have a Problem using your image, ipv6 and letsencrypt:

[ EDIT: moved to https://github.com/nextcloud/nextcloudpi/issues/22


(https://github.com/nextcloud/nextcloudpi/issues/22) ]

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=711#respond)

nachoparker (https://github.com/nachoparker) says:


June 5, 2017 at 6:57 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-731)

Hello,

Please, if you want to ask general questions, or general help use the forums
https://help.nextcloud.com/c/support/appliances-docker-snappy-vm
(https://help.nextcloud.com/c/support/appliances-docker-snappy-vm)

If you have a speci c technical question, or something does not work, please report it to be xed at
https://github.com/nextcloud/nextcloudpi/issues (https://github.com/nextcloud/nextcloudpi/issues)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=731#respond)

darkPhoenix says:
June 5, 2017 at 10:54 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-978)

Ok, thank you

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=978#respond)

sfb says:
June 4, 2017 at 8:50 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-714)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 86/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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":"94.223.166.113","app":"core","message":"Trusted domain error. \"94.223.166.113\"

tried to access using \"abcdefeg.net\" as host.","level":2,"time":"2017-05-

11T22:20:50+00:00","method":"PROPFIND","url":"\/remote.php\/dav\/","user":"--","version":"11.0.3.2"}'

I understand there is no place on the device left, which makes me wonder whether I con gured 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 certi cate trouble too.


Can you make sense of it?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=714#respond)

sfb says:
June 4, 2017 at 8:52 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-715)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=715#respond)

nachoparker (https://github.com/nachoparker) says:


June 6, 2017 at 6:24 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1673)

It does seem like you run out of space. Did you move the datadir to an external USB drive?

If something did not work for you, please report it here

https://github.com/nextcloud/nextcloudpi/issues/ (https://github.com/nextcloud/nextcloudpi/issues/)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1673#respond)

sfb says:
June 13, 2017 at 1:39 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-
1980)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1980#respond)

ROman says:
June 4, 2017 at 7:27 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-717)

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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 87/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=717#respond)

nachoparker (https://github.com/nachoparker) says:


June 5, 2017 at 6:55 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-727)

It is because of a limitation in 32bit php. I am working on a x for this.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=727#respond)

ROman says:
June 5, 2017 at 8:48 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1308)

OK, Can use 64 bit raspbian architecture.


https://github.com/bamarni/pi64/releases (https://github.com/bamarni/pi64/releases)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1308#respond)

nachoparker (https://github.com/nachoparker) says:


June 5, 2017 at 9:38 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-1339)

Thanks, the problem for this approach is that the RPi2 is not 64 bits. I am working in
something else

Mason says:
June 5, 2017 at 10:36 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1369)

I ashed 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 192.168.1.90 Port 443

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1369#respond)

nachoparker (https://github.com/nachoparker) says:


June 6, 2017 at 6:17 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1667)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 88/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Hello,

If something does not work for you, please report it to be xed at


https://github.com/nextcloud/nextcloudpi/issues (https://github.com/nextcloud/nextcloudpi/issues)

The rst time it takes longer as it is catching the php requests.

Thanks for the feedback

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1667#respond)

Ed says:
June 6, 2017 at 1:35 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1888)

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 ./nextcloud.sh with the
Resize and part of the Update sections removed?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1888#respond)

nachoparker (https://github.com/nachoparker) says:


June 6, 2017 at 3:07 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1925)

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 192.168.1.15)

./installer.sh nextcloud_lamp.sh 192.168.1.15

The following will install nextcloud on top of it

./installer.sh nc-nextcloud.sh 192.168.1.15

See the documentation about user and password

https://ownyourbits.com/2017/03/05/generic-software-installer-for-raspbian/
(https://ownyourbits.com/2017/03/05/generic-software-installer-for-raspbian/)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1925#respond)

Ed says:
June 6, 2017 at 4:04 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1926)

I must be missing some code. All the code posts I see above are called nextcloud.sh and install-nextcloud.sh. You
reference nextcloud_lamp.sh and nc-nextcloud.sh in your post above. What have I missed?
Thanks!

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 89/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1926#respond)

nachoparker (https://github.com/nachoparker) says:


June 6, 2017 at 4:19 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1927)

Sorry, that le 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)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1927#respond)

theDarkPhoenix says:
June 6, 2017 at 7:42 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1928)

I changed the admin password, but in the le /var/www/nextcloud/con g/con g.php there is the line dbpassword =>
ownyourbits . Is this a security problem?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1928#respond)

nachoparker (https://github.com/nachoparker) says:


June 6, 2017 at 9:25 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1929)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1929#respond)

Peter Pan says:


June 10, 2017 at 5:03 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1966)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1966#respond)

nachoparker (https://github.com/nachoparker) says:


June 12, 2017 at 2:43 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1974)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1974#respond)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 90/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Sinxay says:
June 13, 2017 at 1:31 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1978)

Thank you for the image!


I cannot access the console after the system boot up, what is the default password for nextcloudpi?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1978#respond)

nachoparker (https://github.com/nachoparker) says:


June 13, 2017 at 3:09 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1981)

Please, check here (https://github.com/nextcloud/nextcloudpi/issues?utf8=&q=%20label:question%20) if you


question has already been answered before asking.

Your question has already been asked here (https://github.com/nextcloud/nextcloudpi/issues/8)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1981#respond)

Colkaer says:
June 14, 2017 at 9:06 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1985)

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? ive 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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1985#respond)

nachoparker (https://github.com/nachoparker) says:


June 14, 2017 at 2:58 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-1986)

See this post (https://ownyourbits.com/2017/04/16/share-your- les-in-your-lan-with-samba/) about using


SAMBA with NextCloudPi. You can set it up with adecuate permissions from nextcloudpi-config .

For discussion, please use the forums (https://help.nextcloud.com/c/support/appliances-docker-snappy-vm).


For technical questions or support, please, use github (https://github.com/nextcloud/nextcloudpi/issues?
utf8=&q=label:question%20)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=1986#respond)

kmh42 says:
June 16, 2017 at 2:33 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2000)

Hello! Great Guide and easy install.


But I cannot sync my CardDav and CalDav with my di erent Devices: Thunderbird/Lightning, Android CalDAV-Sync
and CardDAV-Sync. Any ideas?

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 91/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

File sync works.


Just tell me if you need more information or if I should ask somewhere else.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2000#respond)

Zerohour says:
June 16, 2017 at 5:29 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2001)

There is an fault in the Link you get from Nextcloud 12.0.0

Contacts
https://xxx.xxx.xxx.xxx/remote.php/dav/addressbooks/users/USER/contacts/
(https://xxx.xxx.xxx.xxx/remote.php/dav/addressbooks/users/USER/contacts/)
Instead of
https://xxx.xxx.xxx.xxx/remote.php/carddav/addressbooks/users/USER/contacts/
(https://xxx.xxx.xxx.xxx/remote.php/carddav/addressbooks/users/USER/contacts/)

Calendars:
https://xxx.xxx.xxx.xxx/remote.php/dav/calendars/USER/CALENDAR/
(https://xxx.xxx.xxx.xxx/remote.php/dav/calendars/USER/CALENDAR/)
Instead of
https://xxx.xxx.xxx.xxx/remote.php/caldav/calendars/USER/CALENDAR/
(https://xxx.xxx.xxx.xxx/remote.php/caldav/calendars/USER/CALENDAR/)

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2001#respond)

kmh42 says:
June 16, 2017 at 7:39 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-
2003)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2003#respond)

nachoparker (https://github.com/nachoparker) says:


June 16, 2017 at 8:08 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-2004)

lol I guess mistakes do happen

kmh42 says:
June 16, 2017 at 8:50 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-2005)

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

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 92/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

kmh42 says:
June 16, 2017 at 8:56 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-2006)

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

kmh42 says:
June 16, 2017 at 9:06 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-
image/#comment-2007)

I cheered too fast! It still doesnt work with my user account in thunderbird. I will shut up now

Cloudy with a high probability of Confusion! says:


June 20, 2017 at 9:58 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2032)

NextCloudPi is great, but we ran into a problem early on, and almost gave up and moved on to something else because
we didnt 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 di erent location would make it work again, but only until the next
reboot. We nally moved it back to the SD card, and then the web interface would come up after a reboot without an
issue.

The rst problem is we didnt remember where it was originally saved, we would have liked to have put it back there
but didnt 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 havent moved it?

But the second is I think we have stumbled across a race condition and NextCloud is losing (or winning, actually, but
thats 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!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2032#respond)

nachoparker (https://github.com/nachoparker) says:


June 21, 2017 at 3:32 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2037)

Thank you very much.

I am getting many reports of that, like this Issue (https://github.com/nextcloud/nextcloudpi/issues/15).

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.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 93/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

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 (https://github.com/nextcloud/nextcloudpi/issues/) for the project.

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

Thanks for the feedback

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2037#respond)

olivier (http://Olivier) says:


June 22, 2017 at 1:38 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2047)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2047#respond)

nachoparker (https://github.com/nachoparker) says:


June 22, 2017 at 1:43 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2049)

I am glad!

Well, that feature has been there from day one. Look at this comment
(https://ownyourbits.com/2017/03/17/lets-encrypt-installer-for-apache/#comment-2026).

In any case, please place feature requests in github (https://github.com/nextcloud/nextcloudpi/issues). It is so


much cleaner

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2049#respond)

Shadowstreik says:
June 24, 2017 at 4:07 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2061)

Hi! Im 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 dont believe that matters all that much, today, because

Im 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 o 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 o an
upgrade, otherwise I would do it, this weekend.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2061#respond)

nachoparker (https://github.com/nachoparker) says:


June 24, 2017 at 8:11 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2062)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 94/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

What do you mean a command line that would kick o an update?

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

Looking at your previous comment

https://ownyourbits.com/2017/03/17/lets-encrypt-installer-for-apache/#comment-258
(https://ownyourbits.com/2017/03/17/lets-encrypt-installer-for-apache/#comment-258)

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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2062#respond)

Shadowstreik says:
June 25, 2017 at 1:36 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-
2071)

It must be. It appears I may have had pulled and older full version. I have a couple of them. I kicked o
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 wont take too too long. Luckily, I pulled the 12.0.0 for this upgrade and let folks know Ill be
performing it, next weekend.

I did notice syncing large video les (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.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2071#respond)

Miguel says:
June 28, 2017 at 11:42 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2088)

Apologies if this has been asked, but is this image compatible with the rpi 1?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2088#respond)

nachoparker (https://github.com/nachoparker) says:


June 29, 2017 at 2:21 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2093)

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 ash Raspbian on a
Raspberry Pi 1, and this is based on Raspbian so it should work.

Let us know if you try!

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 95/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2093#respond)

Almir Ribeiro says:


June 28, 2017 at 3:55 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2090)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2090#respond)

nachoparker (https://github.com/nachoparker) says:


June 29, 2017 at 2:02 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2096)

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

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2096#respond)

Shadowstreik says:
July 1, 2017 at 8:36 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2123)

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 con g utility. I dont know if it was
present, beforehand, but I just recti ed it after a day mulling it over.

What was happening was

[ADMIN EDIT] Shadowstreik replicated this info in this github issue


(https://github.com/nextcloud/nextcloudpi/issues/35), so I will remove the details from here.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2123#respond)

nachoparker (https://github.com/nachoparker) says:


July 3, 2017 at 3:04 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2136)

Thanks for the feedback! We will continue this conversation on github

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2136#respond)

Wedge says:
July 3, 2017 at 9:54 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2145)

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?

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 96/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2145#respond)

nachoparker (https://github.com/nachoparker) says:


July 4, 2017 at 5:41 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2146)

the .tar.bz2 le is the compressed image. You need to uncompress it rst, and write the .img le.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2146#respond)

The_TiPi says:
July 5, 2017 at 6:42 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2158)

Hi,
Very nice work.

Two questions :
Ive enable Lets Encrypt, resulting a certi cate valid for only two month. How do I renew (automaticly) the
certi cate ? Do I have to sudo nextcloudpi-con g every two month ?

Ive been using a Pi 2 + owncloud + external USB SSD (no encrypted datas) for 2 years. Im 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 les in the directory and updating Nextcloud database (assuming the
path is right in con g.php) ?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2158#respond)

nachoparker (https://github.com/nachoparker) says:


July 5, 2017 at 7:38 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2160)

Hi,

Please, create two separate entries on Github (https://github.com/nextcloud/nextcloudpi/issues?


utf8=&q=%20label:question%20) with your questions.

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

Thanks

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2160#respond)

The_TiPi says:
July 5, 2017 at 8:52 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2162)

Ok

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2162#respond)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 97/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Todd Rather (http://RatherBDiving.com) says:


July 6, 2017 at 2:29 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2164)

I have a Pi 3 and love the package. I am new to the pi and this is my rst 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 le 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?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2164#respond)

nachoparker (https://github.com/nachoparker) says:


July 7, 2017 at 6:10 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2169)

Congrats for your rst pi!

Please, use the github tracker (https://github.com/nextcloud/nextcloudpi/issues?utf8=&q=label:question%20)


for technical questions, so others can see it.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2169#respond)

Pingback: How can you help Own Your Bits? Own your bits (https://ownyourbits.com/2017/07/07/how-can-you-help-own-
your-bits/)
dax says:
July 9, 2017 at 4:12 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2194)

I didnt learn the rst 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?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2194#respond)

nachoparker (https://github.com/nachoparker) says:


July 9, 2017 at 4:52 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2197)

/var/lib/mysql

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2197#respond)

Pingback: dnsmasq as DNS cache server for NextCloudPi and Raspbian Own your bits
(https://ownyourbits.com/2017/03/09/dnsmasq-as-dns-cache-server-for-nextcloudpi-and-raspbian/)
Shadowstreik says:
July 9, 2017 at 7:05 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2202)

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 con gured NCP instance?
IOW, I have my instance all con gured and data loaded, how do I create an image le (IMG)?

Thank you.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2202#respond)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 98/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

nachoparker (https://github.com/nachoparker) says:


July 11, 2017 at 6:01 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2204)

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 con gured image. You would have to clone the repo,
introduce your con guration and start the build.

It takes like 4 hours to complete.

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2204#respond)

Pingback: NextCloudPi gets NC news, format-USB, port forwarding, emoji support and more Own your bits
(https://ownyourbits.com/2017/07/03/nextcloudpi-gets-nc-news-format-usb-port-forwarding-emoji-support-and-more/)
julien says:
July 22, 2017 at 8:19 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2268)

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 rst 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?

Thanks!

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2268#respond)

nachoparker (https://github.com/nachoparker) says:


July 25, 2017 at 3:51 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2295)

Hi, please ask technical questions or report issues on github


(https://github.com/nextcloud/nextcloudpi/issues). That way other people with the same issue can bene t
from the answer.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 99/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Check rst (https://github.com/nextcloud/nextcloudpi/issues?utf8=&q=%20label:question%20) that it has


not been asked before

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2295#respond)

Lin says:
July 24, 2017 at 4:50 am (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2277)

Why large mkv le can not be played online (streaming)?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2277#respond)

nachoparker (https://github.com/nachoparker) says:


July 25, 2017 at 3:51 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2296)

Hi, please ask technical questions or report issues on github


(https://github.com/nextcloud/nextcloudpi/issues). That way other people with the same issue can bene t
from the answer.

Check rst (https://github.com/nextcloud/nextcloudpi/issues?utf8=&q=%20label:question%20) that it has


not been asked before

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2296#respond)

Pingback: NextClouPi gets a Web Interface Own your bits (https://ownyourbits.com/2017/07/24/nextcloupi-gets-a-web-


interface/)
Ricardo Neves Correia dos Santos says:
July 25, 2017 at 7:04 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2303)

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 (https://ipserver/status.php)

Anyone knows why?


help is much appreciated

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2303#respond)

nachoparker (https://github.com/nachoparker) says:


July 25, 2017 at 7:34 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2305)

Hi, please ask technical questions or report issues on github


(https://github.com/nextcloud/nextcloudpi/issues). That way other people with the same issue can bene t
from the answer.

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 100/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Check rst (https://github.com/nextcloud/nextcloudpi/issues?utf8=&q=%20label:question%20) that it has


not been asked before

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2305#respond)

Pingback: Generic software installer for Raspbian Own your bits (https://ownyourbits.com/2017/03/05/generic-software-
installer-for-raspbian/)
Pingback: Automatic security updates on a Debian system Own your bits (https://ownyourbits.com/2017/03/21/automatic-
security-updates-on-a-debian-system/)
Pingback: Lets Encrypt installer for Apache Own your bits (https://ownyourbits.com/2017/03/17/lets-encrypt-installer-for-
apache/)
Pingback: ModSecurity Web Application Firewall for NextCloud Own your bits
(https://ownyourbits.com/2017/03/23/modsecurity-web-application- rewall-for-nextcloud/)
Maik says:
August 7, 2017 at 2:14 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2401)

Hi,

didnt know if its a bug or a feature:


Ive 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?

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2401#respond)

nachoparker (https://github.com/nachoparker) says:


August 7, 2017 at 2:20 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2402)

Hi, please ask technical questions or report issues on github


(https://github.com/nextcloud/nextcloudpi/issues). That way other people with the same issue can bene t
from the answer.

Check rst (https://github.com/nextcloud/nextcloudpi/issues?utf8=&q=%20label:question%20) that it has


not been asked before

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2402#respond)

Tom says:
August 7, 2017 at 8:00 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2409)

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 didnt happen with my normal nextcloud install i had before

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2409#respond)

nachoparker (https://github.com/nachoparker) says:


August 7, 2017 at 8:16 pm (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/#comment-2410)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 101/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

Hi, please ask technical questions or report issues on github


(https://github.com/nextcloud/nextcloudpi/issues). That way other people with the same issue can bene t
from the answer.

Check rst (https://github.com/nextcloud/nextcloudpi/issues?utf8=&q=%20label:question%20) that it has


not been asked before

Reply (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/?replytocom=2410#respond)

Leave a Reply
Your email address will not be published. Required elds are marked *

Comment

Name: *

Email *

Website

Post Comment

Categories
C (https://ownyourbits.com/category/programming/c/) (2)

debian (https://ownyourbits.com/category/linux/debian/) (20)

docker (https://ownyourbits.com/category/docker/) (5)

git (https://ownyourbits.com/category/git/) (2)

linux (https://ownyourbits.com/category/linux/) (23)

networking (https://ownyourbits.com/category/networking/) (12)

nextcloud (https://ownyourbits.com/category/nextcloud/) (20)

php (https://ownyourbits.com/category/php/) (1)

programming (https://ownyourbits.com/category/programming/) (2)

qemu (https://ownyourbits.com/category/qemu/) (1)

raspberrypi (https://ownyourbits.com/category/raspberrypi/) (23)

security (https://ownyourbits.com/category/security/) (5)

shell (https://ownyourbits.com/category/shell/) (6)

tmux (https://ownyourbits.com/category/tmux/) (1)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 102/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

wordpress (https://ownyourbits.com/category/wordpress/) (1)

zsh (https://ownyourbits.com/category/shell/zsh-shell/) (1)

Recent Posts
Host your own git repository at home (https://ownyourbits.com/2017/08/03/host-your-own-git-repository-at-home/)

NextClouPi gets a Web Interface (https://ownyourbits.com/2017/07/24/nextcloupi-gets-a-web-interface/)

A progress bar for the shell (https://ownyourbits.com/2017/07/16/a-progress-bar-for-the-shell/)

How can you help Own Your Bits? (https://ownyourbits.com/2017/07/07/how-can-you-help-own-your-bits/)

NextCloudPi gets NC news, format-USB, port forwarding, emoji support and more (https://ownyourbits.com/2017/07/03/nextcloudpi-gets-nc-
news-format-usb-port-forwarding-emoji-support-and-more/)

Popular Posts
NextCloudPi, a ready to use NextCloud image for Raspberry Pi (https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/)

NextCloud, a security analysis (https://ownyourbits.com/2017/03/25/nextcloud-a-security-analysis/)

Raspbian on QEMU with network access (https://ownyourbits.com/2017/02/06/raspbian-on-qemu-with-network-access/)

NextCloudPi becomes o cial (https://ownyourbits.com/2017/06/01/nextcloudpi-becomes-o cial/)

Lets Encrypt installer for Apache (https://ownyourbits.com/2017/03/17/lets-encrypt-installer-for-apache/)

NextClouPi gets a Web Interface (https://ownyourbits.com/2017/07/24/nextcloupi-gets-a-web-interface/)

A progress bar for the shell (https://ownyourbits.com/2017/07/16/a-progress-bar-for-the-shell/)

NextCloudPi docker for Raspberry Pi (https://ownyourbits.com/2017/06/08/nextcloudpi-docker-for-raspberry-pi/)

Automatic security updates on a Debian system (https://ownyourbits.com/2017/03/21/automatic-security-updates-on-a-debian-system/)

NextCloudPi gets automount, backups, NextCloud online (https://ownyourbits.com/2017/05/24/nextcloudpi-gets-automount-backups-


nextcloud-online-installation-nextcloud-12-and-more/)

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 103/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 104/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 105/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 106/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 107/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 108/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 109/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 110/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 111/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 112/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 113/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 114/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 115/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 116/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 117/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 118/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 119/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 120/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 121/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 122/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 123/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 124/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 125/126
8/8/2017 NextCloudPi, a ready to use NextCloud image for Raspberry Pi Own your bits

https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ 126/126

Das könnte Ihnen auch gefallen