Installing NCP on Armbian not successfull

Hi all,
I’ve spent many hours installing and debugging NCP on Armbian on an Odroid HC4, but in the end I cannot get NCP or Nextcloud to run correctly. I’m gratefull for any pointers and help.

Output of nc-info:

Zusammenfassung
Running nc-info
Gathering information...
/usr/local/bin/ncp-diag: Zeile 70: -1: Teilstring-Ausdruck < 0.
/usr/local/bin/ncp-diag: Zeile 70: -1: Teilstring-Ausdruck < 0.
NextCloudPi version  v1.18.0
distribution         Armbian 21.02.0-trunk.8 Buster \l
automount            yes
USB devices          none
datadir               (doesnt exist)
rootfs usage         6,3G/225G
swapfile             /mnt/swap/swapfile
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    20.0.2.2
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
Postfix service      up
internet check       ok
port check 80        closed
port check 443       closed
IP                   192.168.178.50
gateway              192.168.178.1
interface            eth0
certificates         none
NAT loopback         no
uptime               2:03
You should run Lets Encrypt for trusted encrypted access
You should open your ports for Lets Encrypt and external access
Done.

Things I did:

  1. Install Armbian Buster (kernel 5.9, image from december 4th for Odroid HC4) on a btrfs partition
  2. Install NCP via Softy (armbian-config), which is equivalent to curl.
  3. Fix several issues (dphys-swapfile, haveged and redis-server were all not running, but I managed to get them to run eventually)
  4. Tried to move datadir to HDD /mnt/datadir (from a former NC install)
  5. Reinstalled NCP directly via curl (official command from website)

Issues:

  1. The curl-installed version of NCP is 1.18, not 1.32.
  2. ncp-update does not complete, error: β€œThere are no commands defined in the β€œconfig:system” namespace.”
  3. Moving data dir to existing dir didn’t work, now it says there is no data dir at all. After reinstalling via curl the command nc-datadir fails with error: β€œThere are no commands defined in the β€œconfig:system” namespace.”, so I cannot fix this currently.
  4. NCP is reachable via https://SERVERIP/activation, but activation never completes.
  5. NC via https://SERVERIP:443 gives error 500 and https://SERVERIP:4443 doesn’t respond at all

PS: Just realized that I should have created the thread under Installation, not Support. If anyone can move it, please do so. Thanks and sorry.

Solution to the problem (do everything with root / sudo):

  1. Run install.sh
  2. Start ncp-config --> CONFIG
  3. Run nc-init
  4. Run nc-trusted-domains
  5. Run nc-webui
  6. Go to https://YOURIP/activate and click activate

Now you can go to https://YOURIP:443 to reach Nextcloud and to https://YOURIP:4443 to reach NCP WebUI.

Warning: NCP has the β€œ_” character pre-filled in password form fields of nc-admin and nc-passwd. You have to actively remove it, otherwise your passwords won’t be correct.


edit:
what worked in the end // my solution:
0. clean install of armbian
this comes with zram enabled by default which was source of the problem (either use that or setup a swap partition if you want)

  1. # curl installer
  2. sudo systemctl disable dphys-swapfile
  3. # curl installer again
  4. ncp-config β†’ CONFIG β†’ nc-init
  5. ncp-config β†’ UPDATES β†’ nc-update
  6. ncp-config β†’ CONFIG β†’ nc-webui
  7. ncp-config β†’ CONFIG β†’ nc-trusted-domains
  8. ncp-config β†’ NETWORKING β†’ nc-trusted-proxies
    I also set up the admin using ncp-config and ncc but could’ve probably done all that from the webui

sudo necrobump /thread

Hi,

I have some very similar issues with an armbian softy install: the swap file not setup properly, several ncp scripts missing, etc. Tried following the proposed solution to no avail.

Odroid and kernel versions
  ___      _           _     _   _   _  ____ _  _   
 / _ \  __| |_ __ ___ (_) __| | | | | |/ ___| || |  
| | | |/ _` | '__/ _ \| |/ _` | | |_| | |   | || |_ 
| |_| | (_| | | | (_) | | (_| | |  _  | |___|__   _|
 \___/ \__,_|_|  \___/|_|\__,_| |_| |_|\____|  |_|  
                                                    
Welcome to Armbian 21.05.6 Buster with Linux 5.10.43-meson64
nc-info
NextCloudPi version
distribution         Armbian 21.05.6 Buster \l 
automount            no
USB devices          none
datadir              /var/www/nextcloud/data
data in SD           yes
data filesystem      btrfs
data disk usage      6.5G/112G
rootfs usage         6.5G/112G
swapfile             /dev/zram0
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    20.0.8.1
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
Postfix service      up
internet check       ok
port check 80        open
port check 443       open
IP                   my.ncp.instance.ip
gateway              my.gate.way.ip
interface            eth0
certificates         none
NAT loopback         no
uptime               11min

A lot of the tui entries show β€œNo description” and when I run some of them nothing happens. It seems that a lot of the ncp apps/scripts are missing. eg:

example: ncp-config version missing, no description on some things
NextCloudPi configuration ver.  





         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ NextCloudPi Configuration Tool (ncp-config) β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚ Select ncp-app to configure or activate:                                                              β”‚ 
         β”‚                                                                                                       β”‚ 
         β”‚         nc-automount   Automount USB drives by plugging them in                                       β”‚ 
         β”‚         nc-hdd-monitor Monitor HDD health automatically                                               β”‚ 
         β”‚         nc-hdd-test    Check HDD health                                                               β”‚ 
         β”‚         nc-info        Print NextCloudPi system info                                                  β”‚ 
         β”‚       * nc-ramlogs     mount logs in RAM to prevent SD degradation (faster, consumes more RAM)        β”‚ 
         β”‚       * nc-swapfile    No description.                                                                β”‚ 
         β”‚         nc-wifi        No description.                                                                β”‚ 
         β”‚         nc-zram        No description.                                                                β”‚ 
         β”‚                                                                                                       β”‚ 
         β”‚                                                                                                       β”‚ 
         β”‚                                                                                                       β”‚ 
         β”‚                                                                                                       β”‚ 
         β”‚                                                                                                       β”‚ 
         β”‚                                                                                                       β”‚ 
         β”‚                             <Select>                             <Back>                               β”‚ 
         β”‚                                                                                                       β”‚ 
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ 
                                                                                                                   

running trusted domains from tui returns

cat: /usr/local/etc/ncp-version: No such file or directory
Running nc-trusted-domains
Done. Press any key...

I’ve seen some other weird things during nc-init for instance:

cp: cannot stat '/var/www/ncp-app': No such file or directory
...
cp: cannot stat '/var/www/ncp-previewgenerator': No such file or directory

I turned the webui on but the next steps yield:
image