NextcloudPi on a Rock64

I have successfully gotten NCP installed on a Rock64 board. I am using the March 26th nightly of Armbian Stretch.

I use the NCP install shell script on a vanilla install of Armbian. I have logged into the Nextcloud Web interface and created a user. I have also logged into the NCP Web console.

I still need to configure NCP and get it all set up. I have an existing instance of NCP on a RPi that is currently production. Once I get comfortable with NCP on the Rock64, I will move everything over to it and allow access from outside my network.

Some questions for @nachoparker:

Since Armbian and the Rock64 are 64bit systems can we increase the Maxfilesize above 2GB?

How about there memory limit? It’s set to 768mb as default? I am running a 4GB Rock64 so have some memory to spare.

So far, I have been using ext4 as my file system for my external drive for data storage. Should I be using BTRFS moving forward? If so, can I format the drive via NCP, or do I have to format it outside of NCP and then connect to the Rock64 and setup as a USB mount?

2 Likes

Good stuff. Did you build the image yourself? or did you download a pre-generated image?

Since NC13 we have no limitation anymore, as explained here. Even if the rock is 64bit capable (like the pi3), that does not guarantee that the OS is 32bit. In armbian odroid HC1 I was surprised to see that the OS was 32bit (if I recall correctly). You can check with uname -m and file /bin/bash.

True. Actually, we should have that calculated automatically, just as the CPU PHP threads. Also IIRC the redis memory configuration can be optimized differently for 64 bit than for 32 bit.

Well, the recommended fs now is BTRFS, among other things because we can take advantage of generating and transfering snapshots ( nc-snapshot-auto, and nc-snapshot-sync ). If you use nc-format-USB it will format it to BTRFS, but be aware that all contents will be lost.

I used the prebuilt nightly image from Armbian.

Ok, yes, I remember reading about the large file support. Makes sense! That works for me.

When I do uname -m it comes back with aarch64, so looks like we are good!

Sounds good on the filesystem. I guess I can live with BTRFS and using Zram for swap. I will have to look into the snapshot stuff. I probably should do that for a backup…

So far, it seems to be considerably quicker that the RPi. I have not loaded my 30GB if files yet so this is just in minor testing. Still have to decide what to do about Armbian since it’s still a early testing release. Might just try to go for it!

@nachoparker, ran into a problem. Reinstalled Armbian on the Rock64 so I could get the external hard drive working. Set up Armbian and got the external drive working and then used the bash script to install NCP. Immediately after installing, I could not access either of the web interfaces. Rebooted, just in case. Still nothing. Tried to restart Apache with:

/etc/init.d/apache2 restart

Got this error:

root@rock64-nc:~# /etc/init.d/apache2 restart
[…] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code.
See “systemctl status apache2.service” and “journalctl -xe” for details.
failed!
root@rock64-nc:~#

Tried to Stop Apache with: /etc/init.d/apache2 stop

That worked fine.

Then tried to restart with: /etc/init.d/apache2 start

Got this error:

root@rock64-nc:~# /etc/init.d/apache2 start
[…] Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code.
See “systemctl status apache2.service” and “journalctl -xe” for details.
failed!
root@rock64-nc:~#

Output of systemctl status apache2.service:

root@rock64-nc:~# systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-04-06 17:22:36 EDT; 37s ago
Process: 4993 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Apr 06 17:22:36 rock64-nc systemd[1]: Starting The Apache HTTP Server…
Apr 06 17:22:36 rock64-nc apachectl[4993]: (2)No such file or directory: AH02291: Cannot access directory ‘/var/log/apache2/’ for main error log
Apr 06 17:22:36 rock64-nc apachectl[4993]: AH00014: Configuration check failed
Apr 06 17:22:36 rock64-nc apachectl[4993]: Action ‘start’ failed.
Apr 06 17:22:36 rock64-nc apachectl[4993]: The Apache error log may have more information.
Apr 06 17:22:36 rock64-nc systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 06 17:22:36 rock64-nc systemd[1]: Failed to start The Apache HTTP Server.
Apr 06 17:22:36 rock64-nc systemd[1]: apache2.service: Unit entered failed state.
Apr 06 17:22:36 rock64-nc systemd[1]: apache2.service: Failed with result ‘exit-code’.
root@rock64-nc:~#

Output of journalctl -xe

Apr 06 17:22:36 rock64-nc systemd[1]: Starting The Apache HTTP Server…
Apr 06 17:22:36 rock64-nc apachectl[4993]: (2)No such file or directory: AH02291: Cannot access directory ‘/var/log/apache2/’ for main error log
Apr 06 17:22:36 rock64-nc apachectl[4993]: AH00014: Configuration check failed
Apr 06 17:22:36 rock64-nc apachectl[4993]: Action ‘start’ failed.
Apr 06 17:22:36 rock64-nc apachectl[4993]: The Apache error log may have more information.
Apr 06 17:22:36 rock64-nc systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 06 17:22:36 rock64-nc systemd[1]: Failed to start The Apache HTTP Server.
Apr 06 17:22:36 rock64-nc systemd[1]: apache2.service: Unit entered failed state.
Apr 06 17:22:36 rock64-nc systemd[1]: apache2.service: Failed with result ‘exit-code’.
root@rock64-nc:~#
root@rock64-nc:~#
root@rock64-nc:~# journalctl -xe
Apr 06 17:15:01 rock64-nc CRON[4881]: (www-data) CMD (php -f /var/www/nextcloud/cron.php)
Apr 06 17:15:01 rock64-nc CRON[4879]: pam_unix(cron:session): session closed for user root
Apr 06 17:15:01 rock64-nc CRON[4880]: pam_unix(cron:session): session closed for user www-data
Apr 06 17:15:01 rock64-nc postfix/pickup[4231]: EB74E212CB: uid=33 from=
Apr 06 17:15:01 rock64-nc postfix/cleanup[4887]: EB74E212CB: message-id=20180406211501.EB74E212CB@localhost
Apr 06 17:15:02 rock64-nc postfix/qmgr[1337]: EB74E212CB: from=www-data@localhost, size=691, nrcpt=1 (queue active)
Apr 06 17:15:02 rock64-nc postfix/local[4889]: EB74E212CB: to=www-data@localhost, orig_to=, relay=local, delay=0.2, delays=0.13/0.03/0/0.04, dsn=2.0.0
Apr 06 17:15:02 rock64-nc postfix/qmgr[1337]: EB74E212CB: removed
Apr 06 17:17:01 rock64-nc CRON[4895]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 06 17:17:01 rock64-nc CRON[4896]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Apr 06 17:17:01 rock64-nc CRON[4895]: pam_unix(cron:session): session closed for user root
Apr 06 17:18:00 rock64-nc systemd[1]: Starting The Apache HTTP Server…
– Subject: Unit apache2.service has begun start-up
– Defined-By: systemd
– Support: https://www.debian.org/support

– Unit apache2.service has begun starting up.
Apr 06 17:18:00 rock64-nc apachectl[4914]: (2)No such file or directory: AH02291: Cannot access directory ‘/var/log/apache2/’ for main error log
Apr 06 17:18:00 rock64-nc apachectl[4914]: AH00014: Configuration check failed
Apr 06 17:18:00 rock64-nc apachectl[4914]: Action ‘start’ failed.
Apr 06 17:18:00 rock64-nc apachectl[4914]: The Apache error log may have more information.
Apr 06 17:18:00 rock64-nc systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 06 17:18:00 rock64-nc systemd[1]: Failed to start The Apache HTTP Server.
– Subject: Unit apache2.service has failed
– Defined-By: systemd
– Support: https://www.debian.org/support

– Unit apache2.service has failed.

– The result is failed.
Apr 06 17:18:00 rock64-nc systemd[1]: apache2.service: Unit entered failed state.
Apr 06 17:18:00 rock64-nc systemd[1]: apache2.service: Failed with result ‘exit-code’.
Apr 06 17:22:36 rock64-nc systemd[1]: Starting The Apache HTTP Server…
– Subject: Unit apache2.service has begun start-up
– Defined-By: systemd
– Support: https://www.debian.org/support

– Unit apache2.service has begun starting up.
Apr 06 17:22:36 rock64-nc apachectl[4993]: (2)No such file or directory: AH02291: Cannot access directory ‘/var/log/apache2/’ for main error log
Apr 06 17:22:36 rock64-nc apachectl[4993]: AH00014: Configuration check failed
Apr 06 17:22:36 rock64-nc apachectl[4993]: Action ‘start’ failed.
Apr 06 17:22:36 rock64-nc apachectl[4993]: The Apache error log may have more information.
Apr 06 17:22:36 rock64-nc systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 06 17:22:36 rock64-nc systemd[1]: Failed to start The Apache HTTP Server.
– Subject: Unit apache2.service has failed
– Defined-By: systemd
– Support: https://www.debian.org/support

– Unit apache2.service has failed.

– The result is failed.
Apr 06 17:22:36 rock64-nc systemd[1]: apache2.service: Unit entered failed state.
Apr 06 17:22:36 rock64-nc systemd[1]: apache2.service: Failed with result ‘exit-code’.
root@rock64-nc:~#

Thoughts?Preformatted text

I think I"m seeing that Apache is not installed properly. I am going to start from scratch again and install apache before I install NCP. That way I can make sure it’s working.

Ok, redid everything. I saw this upon first connection to the NCP box:

Is this new? I’ve never seen it before?

Got past that by clicking the Activate link. Was ale to access bot NCP and the Web management interface… UNTIL i rebooted. Then Apache would not start. Got Apache to start my issuing the start command at the command line. Went back into the web management interface and selected System Info. Saw that Redis was not started. Looked up how to start Redis and then got this:

root@rock64-ncp:/var/log# redis-server
3331:C 09 Apr 11:35:24.316 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
3331:M 09 Apr 11:35:24.323 * Increased maximum number of open files to 10032 (it was originally set to 1024).
.
.-__ ''-._ _.- . . ‘’-._ Redis 3.2.6 (00000000/0) 64 bit
.- .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.-.|'_.-'| Port: 6379 | -. ._ / _.-' | PID: 3331 -._ -._ -./ .-’ .-’
|-._-.
-.__.-' _.-'_.-'| | -.
-._ _.-'_.-' | http://redis.io -._ -._-..-'.-’ .-’
|-._-.
-.__.-' _.-'_.-'| | -.
-._ _.-'_.-' | -._ -._-.
.-‘_.-’ _.-’
-._ -..-’ _.-’
-._ _.-' -.
.-’

3331:M 09 Apr 11:35:24.334 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
3331:M 09 Apr 11:35:24.334 # Server started, Redis version 3.2.6
3331:M 09 Apr 11:35:24.334 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command ‘echo never > /sys/kernel/mm/transparent_hugepage/enabled’ as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
3331:M 09 Apr 11:35:24.334 * The server is now ready to accept connections on port 6379

I issued the above command but it’s still not working. Taking FOR EVER to get into the NCP web page. Web management seems to be working ok. Also, there is no /etc/rc.local in Armbian Stretch.

@nachoparker, let me know what I should do next.

Thanks!

Hey @Jeffery_Frederick

Thank you so much for all this. Let me get back to you tomorrow, I have been a few days away.

:slight_smile:

PS: yes, that’s the new activation login page, so there are no more pre-defined passwords

No rush. I’m just trying to get you the info so we can get this working.

I still have NCP running on my RPi that I’m using as production until we get the Rock64 stuff working.

Ok, what ever you did with 53.27 fixed these issues.

I ran ncp-config and it had me update to 53.27. Rebooted and it’s working now.

One new issue. I get this:

root@rock64-ncp:~# ncp-config
cat: /var/run/.ncp-latest-version: No such file or directory

ncp-config does run after a few seconds.

Things work, that’s good.

Let me know how it goes!! probably much faster than the pi :wink:

That is a harmless warning, I’ll fix it.

I’ll try to see if I have some time to install it myself :stuck_out_tongue:

Many thanks!

Ok, getting further…

Got my 4TB USB drive mounted. Moved the data directory and the Database directory over to it. Tried to Move swap (still using ext4, will try BTRFS later) over, but got an error. Found out that dphys-swapfile was not installed. Installed it and all went fine. I figure that is an Armbian issue, not an NCP issue.

1 Like

Ok,

[ ] install dphys-swapfile in case it doesn’t exist

thanks!

Hey Jeffery, I was thinking… Would you be willing to try to build the same image that you are using right now? There’s instructions in their website with a VM, or I have also been able to build with docker (but it’s more experimental).

If you can make that work, it’s really easy (add one file) to create an NCP SD card image for the rock64 . I am sure you can ask for details on what options do they use to build if you get stuck. It would be a great help!!

Just if you are interested, of course! The thing is that I am pretty busy with the rest of NCP and it’s hard to find the time.

Thanks

edit: I left them a message in their forums

Sure, I’ll go look into that. Building this stuff is new to me, so I’ll need to understand how it all works…

Traveling for work next week, so it may be a bit.

1 Like

update: I am now trying to generate the testing image. I started this thread

I didn’t test the curl installer, but I did try the docker image, and after 10 minutes of testing, it looks like it works really fast! :wink:

hi @nachoparker

in what point are you with this compilation of ncp on a rock64 …?
I have one and I would like to start to play with it … :slight_smile:
maybe we could share our works and work together.
from my side i have installed release ARMBIAN:

rock64@rock64:/var/lib/docker$ uname -a

Linux rock64 4.4.77-rockchip-ayufan-136 #1 SMP Thu Oct 12 09:14:48 UTC 2017 aarch64 GNU/Linux

and thinking the way to continue to install ncp or compile it for this release.

1 Like

That would be awesome, need a LOT of help with other boards because I don’t have time to be everywhere.

If you read the thread above in the armbian forums, I am at a dead end, because they don’t make their builds reproducible so I cannot replicate a working image. Maybe we could insist that they provide this functionality in the forums.

Until we can build the images ourselves as explained here, we are left with using the curl installer like @Jeffery_Frederick is doing, or using the docker container.

At the moment we only have a small issue with setting a static IP because armbian uses dhclient. This would be easy to fix.

So yeah, any form of help would be great… testing, building/generating images, improving the armbian version… whatever you feel like!

@nachoparker,

i have been diving for lot of threads related with rock64 and as you said you are involved in a lot of them :stuck_out_tongue: patience my friend hehehe

I have taken a look procedure of curl installer from here , and I tryed to execute it for a board rock 64, but seems that this has failed. In my case I used this set sentences:

./compile.sh docker BOARD=rock64 BRANCH=next KERNEL_ONLY=no KERNEL_CONFIGURE=no RELEASE=stretch BUILD_DESKTOP=no USE_CCACHE=yes

and I got this error:

The command ‘/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade && DEBIAN_FRONTEND=noninteractive apt-get install -y git dialog lsb-release binutils wget ca-certificates device-tree-compiler pv bc lzop zip binfmt-support build-essential ccache debootstrap ntpdate gawk gcc-arm-linux-gnueabihf qemu-user-static u-boot-tools uuid-dev zlib1g-dev unzip libusb-1.0-0-dev ntpdate parted pkg-config libncurses5-dev whiptail debian-keyring debian-archive-keyring f2fs-tools libfile-fcntllock-perl rsync libssl-dev nfs-kernel-server btrfs-tools ncurses-term p7zip-full kmod dosfstools libc6-dev-armhf-cross fakeroot curl patchutils python liblz4-tool libpython2.7-dev linux-base swig libpython-dev systemd-container udev distcc g+±5-arm-linux-gnueabihf lib32stdc++6 libc6-i386 lib32ncurses5 lib32tinfo5 locales ncurses-base zlib1g:i386 aptly pixz’ returned a non-zero code: 100

[ … ] Running the container

Unable to find image ‘armbian:latest’ locally

docker: Error response from daemon: pull access denied for armbian, repository does not exist or may require ‘docker login’.

See ‘docker run --help’.

[ warn ] Docker error [ 125 ]

[ warn ] please make sure you are using the latest version (17.06 CE or newer)

[ warn ] please check the Armbian documentation for the Docker setup procedure

have you been able to build your image with curl installer?

Well, there is a bit of confusion, what we call the curl installer is this

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

my last attempt at building the rock64 image was this

./compile.sh docker \
  BOARD=rock64\
  BRANCH=default\
  KERNEL_ONLY=no\
  KERNEL_CONFIGURE=no\
  RELEASE=stretch\
  BUILD_DESKTOP=no\
  EXPERT=yes \
 LIB_TAG="development"\
  USE_CCACHE=yes\

, but then someone in the forums said that LIB_TAG had to be set differently. That command needs to be run in the armbian-build code folder. Then a docker container called lib will be generated, and then another one called armbian

thanks @nachoparker

i have successfully execute installation with curl command. The issues comes once execute ncp-config , trying to modify some steps of this menu i’m getting following errors:

Launching nc-datadir

PHP Warning: Redis::connect(): connect() failed: No such file or directory in /var/www/nextcloud/lib/private/RedisFactory.php on line 84

Error reading data directory. Is NextCloud running and configured?

Done. Press any key…

and more errors:

Launching nc-info
Gathering information…
cat: /usr/local/etc/ncp-baseimage: No such file or directory
PHP Warning: Redis::connect(): connect() failed: No such file or directory in /var/www/nextcloud/lib/private/RedisFactory.php on line 84

NextCloudPlus version v0.53.31
NextCloudPlus image
distribution Debian GNU/Linux 9 \n \l
automount yes
USB devices sda
datadir /var/www/nextcloud/data
data in SD yes
data filesystem ext2/ext3
data disk usage 3.4G/15G
rootfs usage 3.4G/15G
swapfile /var/swap
Nextcloud check error
HTTPD service down
PHP service up
MariaDB service up
Redis service down
Postfix service up
internet check ok
port check 80 open
port check 443 open
IP 192.168.1.117
gateway 192.168.1.1
interface eth0
certificates none
NAT loopback no
uptime 4min