Jump to content

NextCloudPi on Armbian ( tested odroid HC1 )


Recommended Posts

Hello everyone

 

First congratulations for this project. I just started playing with it recently and I am very impressed. Good job!

 

I am the developer of NextCloudPi, which basically consists on providing Nextcloud images for the Raspberry Pi, but has evolved to other flavours such as docker x86 and docker ARM.

 

It also features many scripts for managing the instance that can be run from a classic whiptail like TUI or a simple web interface. The initial goal of the project is to drive as many people away from dropbox into selfhosting, so there's also a Wizard and I try to ease the process of DDNS, certificates and so on.

 

I am after porting it to more powerful boards, so I adapted my build scripts for Armbian and I would like to share them here.

 

I generated a first version of the SD armbian based image for the odroid HC1/X4, that you can find here.  If anyone would be interested on trying this and even better help me adapt it further for performance and polish that would be fantastic ;)

 

The build code that I use to produce it is

 

git clone https://github.com/armbian/build ncpbian
cd ncpbian
wget https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/armbian.sh -O userpatches/customize-image.sh
./compile.sh docker  BOARD=odroidxu4 BRANCH=next KERNEL_ONLY=no KERNEL_CONFIGURE=no RELEASE=stretch BUILD_DESKTOP=no

 

NextCloudPi can be installer on any Debian Stretch system with

 

curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash

 

That script has been tested on Debian x86 servers and also a rock64 (@inos tested it) and an odroid HC1 (and rpi too).

 

Now what I do for the SD images is basically that with a couple adjustments inside customize-image.sh

 

Some issues that I found, maybe you have suggestions

 

  • the most annoying one: there's about four places where the build process clones from git. There is around a 50% chance that the process will get just stuck there and I have to start over. This means that I sometimes have to try up to five times for the build to finish. Running top inside the container gives
1 root      20   0   21620   5104   2920 S   0.0  0.1   0:00.45 /bin/bash /root/armbian/compile.sh docker-guest BOARD=odroidxu4 BRANCH=next KERNEL_ONLY=no KERNEL_CONFIGURE=no RELEASE=stretch BUILD_DESKTOP=no CLEAN_LEVEL= NO_APT_CACHE+
9945 root      20   0 4116468   9368   4364 S   0.0  0.1   0:00.16 /usr/bin/qemu-arm-static /bin/bash /tmp/customize-image.sh stretch odroidxu4 odroidxu4 no
9958 root      20   0 4116468   9500   4356 S   0.0  0.1   0:00.28 /usr/bin/qemu-arm-static /bin/bash
10356 109       20   0 4659004 106464  14556 S   0.0  1.3   0:01.66 /usr/bin/qemu-arm-static /usr/sbin/mysqld
13408 root      20   0 4116468   8408   3096 S   0.0  0.1   0:00.10 /usr/bin/qemu-arm-static /bin/bash
14636 root      20   0 4116468  11312   4452 S   0.0  0.1   0:00.12 /usr/bin/qemu-arm-static /bin/bash /usr/local/bin/ncp-update
14668 root      20   0 4116468   9488   4368 S   0.0  0.1   0:00.25 /usr/bin/qemu-arm-static /bin/bash ./update.sh
18087 root      20   0 4116468   8004   2788 S   0.0  0.1   0:00.03 /usr/bin/qemu-arm-static /bin/bash ./update.sh
18929 root      20   0 4116468   9928   4776 S   0.0  0.1   0:00.17 /usr/bin/qemu-arm-static /usr/bin/git clone https://github.com/letsencrypt/letsencrypt
18932 root      20   0 4182572  35188   8016 S   0.0  0.4   0:02.04 /usr/bin/qemu-arm-static /usr/lib/git-core/git-remote-https origin https://github.com/letsencrypt/letsencrypt
18936 root      20   0 4182544  12032   4596 S   0.0  0.2   0:00.24 /usr/bin/qemu-arm-static /usr/lib/git-core/git fetch-pack --stateless-rpc --stdin --lock-pack --thin --check-self-contained-and-connected --cloning https://github.com/le+
18940 root      20   0 4182544   8980   1416 S   0.0  0.1   0:00.00 /usr/bin/qemu-arm-static /usr/lib/git-core/git fetch-pack --stateless-rpc --stdin --lock-pack --thin --check-self-contained-and-connected --cloning https://github.com/le+
18942 root      20   0   19948   3652   3128 S   0.0  0.0   0:00.04 bash
18957 root      20   0   38328   3344   2904 R   0.0  0.0   0:00.01 top
  • Also, I had to re-set the root password for installing some packages that use `sudo -u`, such as mariadb, or I get
Setting up mariadb-common (10.1.26-0+deb9u1) ...
update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Selecting previously unselected package mariadb-server-10.1.
(Reading database ... 33975 files and directories currently installed.)
Preparing to unpack .../mariadb-server-10.1_10.1.26-0+deb9u1_armhf.deb ...
You are required to change your password immediately (root enforced)
chfn: PAM: Authentication token is no longer valid; new one required
adduser: `/usr/bin/chfn -f MySQL Server mysql' returned error code 1. Exiting.
dpkg: error processing archive /var/cache/apt/archives/mariadb-server-10.1_10.1.26-0+deb9u1_armhf.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
  • Finally, postfix postinstallation script fails here
/usr/sbin/postconf: fatal: inet_addr_local[getifaddrs]: getifaddrs: Address family not supported by protocol

So it gets marked as not successfully installed until we run some apt action on the board. Not a big deal really but it would be nice to fix it without ugly hacks. It seems like a qemu-user-static issue

 

https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg02382.html

 

I tested this with my odroid HC1 and I also own a rock64 like this one. Next, I want to try it on the rock64, so what target should I use to build for this board?

 

Thanks, and I hope this is helpful! Feedback is welcome!

armbian-ncp.png

ncp-web-demo-update.gif

wizard-demo1.gif

ncp-theme-700x635.png

Link to comment
Share on other sites

In case you haven't already you might look through https://github.com/armbian/build/blob/master/config/templates/customize-image.sh.template#L35 to get an idea how to workaround or solve some of the issues when installing not in an already running system but from customize-image.sh.

 

BUT... the above OMV installation routine can be considered a proof of concept and also part of a journey (that ended in the meantime -- see last 2 posts here please). Stuff like this should become part of armbian-config/softy.

Link to comment
Share on other sites

Hi, thanks for the info

 

Well, I tried to build an OMV image using the customize-image.sh template and there were many errors during the build process, and the web interface for OMV didn't show up. Didn't look into that any more. I did notice that the proposed workaround for postfix didn't work, and the package was in an unconfigured state during installation.

 

The most annoying problem is the github one, because the build randomly fails. Maybe I should start a new post on this to give it some more visibility?

 

On 11/22/2017 at 8:32 PM, tkaiser said:

Stuff like this should become part of armbian-config/softy.

I guess the 'curl installer' could be launched from the armbian menu easily enough. How do you suggest we proceed? it should really be just a matter of adding the 'curl command' in a new menu entry.

 

I have received good feedback from this first test image.

Link to comment
Share on other sites

I just tried to install Nextcloud from Softy.  It downloaded Nextcloud 14.  But the installer showed errors:

Installing nc-update-nextcloud
Installing nc-update
Installing nc-webui
Installing nc-wifi
Hit:1 http://security.debian.org stretch/updates InRelease                                                                                       
Hit:3 http://deb.debian.org/debian buster InRelease                                                                                              
Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease                                                    
Hit:5 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease
Hit:6 http://cdn-fastly.deb.debian.org/debian stretch-backports InRelease
Hit:7 http://cdn-fastly.deb.debian.org/debian stretch Release
Hit:4 https://apt.armbian.com stretch InRelease    
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  python-dbus python-gi python-gobject python-gobject-2 python-urwid python-wicd wicd-daemon
Suggested packages:
  python-dbus-dbg python-dbus-doc python-gi-cairo python-gobject-2-dbg pm-utils
The following NEW packages will be installed:
  python-dbus python-gi python-gobject python-gobject-2 python-urwid python-wicd wicd-curses wicd-daemon
0 upgraded, 8 newly installed, 0 to remove and 1 not upgraded.
Need to get 2,242 kB of archives.
After this operation, 6,965 kB of additional disk space will be used.
0% [Connecting to httpredir.debian.org]
0% [Connecting to httpredir.debian.org]
Err:1 http://httpredir.debian.org/debian stretch/main arm64 python-dbus arm64 1.2.4-1+b1
  Could not resolve 'httpredir.debian.org'
Err:2 http://httpredir.debian.org/debian stretch/main arm64 python-gi arm64 3.22.0-2
  Could not resolve 'httpredir.debian.org'
Err:3 http://httpredir.debian.org/debian stretch/main arm64 python-gobject-2 arm64 2.28.6-13
  Could not resolve 'httpredir.debian.org'
Ign:4 http://httpredir.debian.org/debian stretch/main arm64 python-gobject all 3.22.0-2
Ign:5 http://httpredir.debian.org/debian stretch/main arm64 python-wicd all 1.7.4+tb2-4
Ign:6 http://httpredir.debian.org/debian stretch/main arm64 wicd-daemon all 1.7.4+tb2-4
Err:7 http://httpredir.debian.org/debian stretch/main arm64 python-urwid arm64 1.3.1-2+b1
  Could not resolve 'httpredir.debian.org'
Ign:8 http://httpredir.debian.org/debian stretch/main arm64 wicd-curses all 1.7.4+tb2-4
Err:4 http://httpredir.debian.org/debian stretch/main armhf python-gobject all 3.22.0-2
  Could not resolve 'httpredir.debian.org'
Err:5 http://httpredir.debian.org/debian stretch/main armhf python-wicd all 1.7.4+tb2-4
  Could not resolve 'httpredir.debian.org'
Err:6 http://httpredir.debian.org/debian stretch/main armhf wicd-daemon all 1.7.4+tb2-4
  Could not resolve 'httpredir.debian.org'
Err:8 http://httpredir.debian.org/debian stretch/main armhf wicd-curses all 1.7.4+tb2-4
  Could not resolve 'httpredir.debian.org'
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/d/dbus-python/python-dbus_1.2.4-1+b1_arm64.deb  Could not resolve 'httpredir.debian.org'
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/p/pygobject/python-gi_3.22.0-2_arm64.deb  Could not resolve 'httpredir.debian.org'
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/p/pygobject-2/python-gobject-2_2.28.6-13_arm64.deb  Could not resolve 'httpredir.debian.org'
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/p/pygobject/python-gobject_3.22.0-2_all.deb  Could not resolve 'httpredir.debian.org'
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/w/wicd/python-wicd_1.7.4+tb2-4_all.deb  Could not resolve 'httpredir.debian.org'
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/w/wicd/wicd-daemon_1.7.4+tb2-4_all.deb  Could not resolve 'httpredir.debian.org'
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/u/urwid/python-urwid_1.3.1-2+b1_arm64.deb  Could not resolve 'httpredir.debian.org'
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/w/wicd/wicd-curses_1.7.4+tb2-4_all.deb  Could not resolve 'httpredir.debian.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Failed to disable unit: No such file or directory

Plenty of other packages successfully installed.  It's just that whenever "httpredir.debian.org" was called upon, it wouldn't resolve!  So my Nextcloud install is only partially there.  I'm not sure what to run to re-initiate another attempt to install those missing Nextcloud parts.

Link to comment
Share on other sites

On 10/25/2018 at 5:20 PM, Igor said:


Is a network / Debian problem. Nothing to do with our installer.

That's true.  But I was stuck, not knowing how to re-initiate the Nextcloud install (like an hour later).  I can't just unselect (then quit Softy, hoping the Nextcloud install would return to a clean state), then re-select Nextcloud within Softy (to try a Nextcloud over again).  My sense is that this Nextcloud Installer could use some improvement in the way of recovering/resuming from partial installs.

Link to comment
Share on other sites

On 11/23/2017 at 3:21 AM, nachoparker said:

Feedback is welcome!

@nachoparkerNachoparker, my feedback is that NextcloudPi rocks.  Thanks so much for doing it.  I was able to use one of your pre-built images on one ARM board and it worked really, really well.  Your text-based config menu for Nextcloud was extremely helpful, especially the backup/restore features.  I also loved how I could migrate the data and database folders to an external hard drive (and not have them on a slow MicroSD card).

 

I look forward to more Armbian boards appearing with pre-built images on your Nextcloud Pi downloads page.

Link to comment
Share on other sites

Hello,

I try to install NextCloudPi over the softy menu on a OrangePi PC+ with armbian is installed on the eMMC.. instalation finished without error.

 

apresinstall.png.86644edcf4ea9d19ff01c8858539cce7.png

 

after I connect to the webserver I have folowing image and message :

 

web.thumb.png.eecdf801d67508dd1b38ac9c6cad7f17.png

 

if try to start with cli I have following errors.

 

nexcloudconfig.png.697498a0eec5140ca52bb22108398c8c.png

 

Did I forget to install something??

If you need some other information please let me know

 

thank you for your help

 

 

 

Link to comment
Share on other sites

15 minutes ago, yogui said:

Did I forget to install something??

As the screenshot shows, several php modules are missing ... Install them with the following and try again, maybe more needed ...

apt-get install php-zip phpmd php-gd php-curl php-xml

 

Link to comment
Share on other sites

hello

sorry my previous  message it was a mistake

thank you for you fast answer

 

2 other pakage was needed : libculr3 and php7.0-curl

i have installed them an those you suggest 

instalation was sucessful 

I have the same error after, I also reboot my opi

Link to comment
Share on other sites

4 minutes ago, yogui said:

I have the same error after

If you mean the last error "Environment not properly prepared", maybe that was caused by the fact earlier missing packages, some data scripts didn't run properly to prepare environment.

Maybe try to uninstall and re-install NextCloudPi, maybe this will fix things ...

Link to comment
Share on other sites

no I mean missing package (the same package are missing :()

I have tryed to remove nexclode with apt-get remove NextCloudPi and apt-get remove NextCloud but package ar neo avalable any idea how the package is named

 

Link to comment
Share on other sites

According to what I see in https://github.com/nextcloud/nextcloudpi , it seems that this software is using docker.

Since docker is some kind of virtual environment, it is why you have PHP modules "already installed", but inside the docker, they are not present.

You should ask @nachoparker some help to figure out how to fix this docker installation or how to add missing packages into it ...

Link to comment
Share on other sites

29 minutes ago, martinayotte said:

According to what I see in https://github.com/nextcloud/nextcloudpi , it seems that this software is using docker.

Since docker is some kind of virtual environment, it is why you have PHP modules "already installed", but inside the docker, they are not present.

You should ask @nachoparker some help to figure out how to fix this docker installation or how to add missing packages into it ...

thanks for your answehre I anderstand that other way, that you can installal inside docker or directly I will try the docker image thank you for your help

 

@nachoparker do you have an idea why it doesnt work on my opi PC plus

Link to comment
Share on other sites

Hi everyone

 

NextCloudPi has different variants. There is a docker version, there's the curl installer (the one included in softy), and the SD card versions (and the x86 VM).

 

It seems that something broke with the curl installer. Maybe some packages changed upstream, I'll look into it when I have time. If possible, use the images because each release has been tested.

 

You can use the docker version instead of the softy version in the meantime if there is no support for your board, or even better, you can help me support yet another board ;)

Adding a new board is pretty easy, what I need is people willing to briefly test each release (I have scripts for automated testing, there is info in the wiki).

 

https://github.com/nextcloud/nextcloudpi/wiki/Testing-NextCloudPi

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines