Installing Nextcloudpi image on a Raspberry Pi 2

I’m installing Nextcloud on a Rasbperry Pi 2 via this brand new image file that is raspbian lite + nextcloud 11.0.2 with apache and php 7.0

DD’ed the image onto an SD card and enabled ssh.
Was able to connect to nextcloud locally in the browser, but it did give an error about not https and need a security exception.

  • Added an ext3 usb flashdrive to fstab for additional storage. chowned it to pi:pi

    UUID=b0252808-8057-4331-972f-672ee98deddd /media/usb ext3 auto,nofail,noatime,users,rw,uid=pi,gid=pi 0 0

Moved my nc-database, data directory and swap file to /media/usb.

Rebooted, Nextcloud would not boot from the browser. Getting the following error:

systemctl status apache2.service

��� apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled)
Active: failed (Result: exit-code) since Sat 2017-04-01 03:08:52 UTC; 18s ago
Process: 1676 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

sudo systemctl --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
��� media-usb.mount loaded failed failed /media/usb
��� apache2.service loaded failed failed The Apache HTTP Server
��� nextcloud-domain.service loaded failed failed Register Current IP as Nextcloud

As far as I’ve seen, the default webserver user is still www-data, so I would rather use this user to mount the storage. And can you check if it is properly mounted after reboot (should be listed in the output of df -h).

@nachoparker

1 Like

what are the settings that you have for nc-datadir nc-database and nc-swapfile?

If you do sudo nextcloudpi-config, it remembers your last choices

As follow up, this issue was fixed by playing around with fstab. I’ve noticed NextcloudPi will get confused after reboots about external storage mounting points setup via nextcloudpi-config unless those mount points are also specifically set in fstab.

Thanks for your feedback.

Automount has been extensively tested and I am pretty sure that it doesn’t get confused after reboots. Still, if anybody can consistently reproduce bad behaviour, it would be a great help to report it on github so it can get fixed.

It could very well be that us users are just configuring something wrong. Issue #294 and issue #295 reference improper automount settings.

hi,

those examples (well, one of them) use a very old image with jessie and the old automount system, which I announced as deprecated.

In any case, nothing to do with nc-datadir. nc-datadir checks many things, so it’s “user proof” in the sense that nothing that the user does can break things. It checks for partitions, permissions, file systems and so on.

Of course, if anyone is able to break it, please tell me so it can get fixed :wink: