Need advice how to setup Banana Pi M2 Berry

Hi guys!
I decided to setup nextcloud on a spare BPI M2 Berry that I have flying around here, to sync some calendars and contacts on several devices.
I grabbed the armbian images from armbian(dot)com/bananapi-m2u/ (only 4 links allowed for n00bs) and both seem to work. At least the boot was successful so I could see the login prompt.
Before going further I figure that I need a plan and since I’m not that familiar with linux I also might need some support on my way.
I have some topics flying in my head that need to get sorted some way.
Here we go:
Is it worth to go the BPI M2 route? Searching this forum didn’t reveal much info.
Which of the Armbian images shall I use? Stretch or Bionc? What’s the difference?
After I have the OS up and running, how to setup NCP?
Any config that I should prepare before installing NCP? User settings? USB config?
Should I use the SD card for NCP and a USB stick for backups? I could also backup to a SMB target if possible.
Should I use the Debian installer or do I have to generate an Armbian Image or try to run a Docker container? Let me mention, that I would also like to run other appliances in future - just for consideration.
With regard to contributing a working image, given I’m successful, what should be considered during the setup?

OK, that’s it so far. Thanks in advance, for your patience and support!

Edit:
Just to save you guys some time, here is the outcome:
Yes, it works on the M2 Berry.
Use the curl installer and you’re fine!
Go to the NCP wiki pages and read how to set up your Owncloud.

The configuration of your NextCloud is done via the NextCloudPi panel. The NCP panel has it’s own webGUI on port 4443 and is protected by its own set of user & pw - just for admin. It is also available via terminal connection. Once i figured out this concept, everything was a lot easier.

Read through the Armbian docs..
I will use the Bionic Image as it has a desktop. GUI may come in handy later.

You can use the NCP image for BPI

Yes, I forgot to mention that.
Of course I tried that at first. Unfortunately the board is not booting.
No signal via HDMI either to troubleshoot at that level.

Then I’d try Stretch and run curl installer

Thanks, it looks like the possibilities are narrowed down.
I found out, Stretch is Debian and Bionic Beaver is Ubuntu.

I will give it a try and see what happens next.

Any advice where to put the NCP files - on an USB sick or leave it on the SD?

You can move data to external drive anytime you want, once NCP instance is activated and up and running, thru ncp-web or ncp-config.

Best would be two usb hdd/sdd’s: one for ncdata, one for backups.
Usb-sticks, and sd-cards, notoriously fail after being used for a while, they have a limited nr of read/writes, so backup, backup, and backup once more, even better use autobackup, also in wiki link above :wink:

Well, it worked so far.
I ran the Debian Installer on top of the Armbian Stretch image. NCP is up and running.
Looks good so far but something is wrong and heavily spamming the log.
I figure this should be fixed. Any advice?

  • |Warning|no app in context|Temporary directory {"/var/www/nextcloud/data/tmp":""} is not present or writable|2018-12-16T12:47:32+0100|
  • |Error|PHP|is_writable() expects parameter 1 to be a valid path, array given at /var/www/nextcloud/lib/private/TempManager.php#260|2018-12-16T12:47:32+0100|
  • |Warning|no app in context|Temporary directory {"/var/www/nextcloud/data/tmp":""} is not present or writable|2018-12-16T12:47:31+0100|
  • |Error|PHP|is_writable() expects parameter 1 to be a valid path, array given at /var/www/nextcloud/lib/private/TempManager.php#260|2018-12-16T12:47:31+0100|
  • |Warning|no app in context|Temporary directory {"/var/www/nextcloud/data/tmp":""} is not present or writable|2018-12-16T12:47:31+0100|
  • |Error|PHP|is_writable() expects parameter 1 to be a valid path, array given at /var/www/nextcloud/lib/private/TempManager.php#260|2018-12-16T12:47:31+0100|

This was a bug I thought fixed, so dont know why it came back here.

Did you move your data dir?

try adding

‘tempdirectory’ => ‘/tmp/nextcloudtemp’,

to your /var/www/nextcloud/config/config.php and run

sudo mkdir /tmp/nextcloudtmp

Might need to reload webserver too

No, I haven’t moved my data dir yet.
I’m thinking of shifting the whole system to an SSD later on.

That specific part of my config.php looks like this after I edited with vi

‘tempdirectory’ => ‘/tmp/nextcloudtemp’,
array (
‘/var/www/nextcloud/data/tmp’ => ‘’,
),

I don’t know how to reload the webserver :blush: so I rebooted the device, but it seems that the

sudo mkdir /tmp/nextcloudtmp

will not survive the reboot…
And shouldnt it be /tmp/nextcloudtemp

That is correct, it does not survive a reboot, /tmp/ gets flushed by it.
And my bad typo sorry.

And the array part is were things go wrong, array doesnt work for temp, it seems…
It will be fixed shortly in next version of NCP.

In mean time make it into a single string, as I suggested, and it should solve your issue.
It doesnt really matter where you create a tmp dir for NC, as long as its owned by user www-data and the string in config points to it.
So can be also:

tempdirectory =>/var/www/nextcloud/data/tmp,

If it doesnt exist yet:

sudo mkdir /var/www/nextcloud/data/tmp
sudo chown www-data:www-data /var/www/nextcloud/data/tmp

Should I leave the array part or remove that too?

And since the change is not persistent, please also tell me how to reload the webserver or isn’t it necessary.
I figured it was typo and created another directory but the log still kept filling. Probably the wrong owner - have to try. Maybe the webserver doesn’t need reloading at all. I’ll report back anyway.

Remove the array part, just keep single string statement.

Not sure if need to reload webserver and php but can do with:

sudo systemctl restart apache2.service
sudo systemctl restart php7.2-fpm.service

check owner is www-data with:

sudo ls -lh /var/www/nextcloud/data/

I’ve got the same Banana Pi and try to use the latest generated NCP image and the latest Armbian image, but with both images the board is not booting. So i tried a debian 9 image with the curl installer and everythings locked fine.

As next step I connected the Pi with my local network by using a ethernet cable and tried to access https://nextcloudpi.local with my PC. Althougth I could not access any webinterface. Did I forget some important points? Is more configuration needed than running the curl installer?

Once installed, all that is required, is visiting the activation page, note the generated passwords, and click on activate.

You’ll find more on what can be configured after that in NCP’s wiki pages.

The configuration of your NextCloud is done via the NextCloudPi panel.
The NCP panel has it’s own webGUI on port 4443 and is protected by its own set of user & pw - just for admin. It is also available via terminal connection. Once i figured out this concept, everything was a lot easier.

IIRC you have to activate the NextCloud first from within this Panel.
Just as @OliverV already posted, read through the wiki pages.
Specifically for your problem:

It is a good idea to bookmark that wiki! :wink:

Thank you, for the fast answers. I read the wiki pages, but as I understood it, first i have to access https://nextcloudpi.local. The problem was that i could not access it within my local network from my PC.

Yesterday I tried a newer, not released Armbian 5.71 image discussed in the Banana-Pi Forum, which worked for me. After running the curl installer, i get access to https://nextcloudpi.local.