¶2024-04-26 installed on odroid-hc4, ubuntu 24.04, raid-1

if you encountered “An error occurred during the request. Unable to proceed. Host violates local access rules”during API installation, please add 'allow_local_remote_servers' => true,to the end of/var/snap/nextcloud/current/nextcloud/config/config.phpthensudo snap restart nextcloud`

alexlai@SurfacePro:~$ sudo cat  /var/snap/nextcloud/current/nextcloud/config/config.php
<?php
$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' => 
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'log_type' => 'file',
  'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log',
  'logfilemode' => 416,
  'instanceid' => 'ocehzsviq0zv',
  'passwordsalt' => 'cse3ebwKHnzd8FtZvwY71+50OwDfsQ',
  'secret' => 'HY9N8D0gmq2SQRnZNoHzs4iA8r3AbDeU6+xAaEMmVUDVgDvQ',
  'trusted_domains' => 
  array (
    0 => '192.168.48.231',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '27.1.8.1',
  'overwrite.cli.url' => 'http://192.168.48.231',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'MZAH0QKG0ZWzBJBaJ1PI8CiUeVqD4AD1SYR3DIceEwB1RykM27mep-EXLSTuYfq3',
  'installed' => true,
);
alexlai@SurfacePro:~$ sudo nano /var/snap/nextcloud/current/nextcloud/config/config.php
alexlai@SurfacePro:~$ sudo cat  /var/snap/nextcloud/current/nextcloud/config/config.php
<?php
$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' => 
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'log_type' => 'file',
  'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log',
  'logfilemode' => 416,
  'instanceid' => 'ocehzsviq0zv',
  'passwordsalt' => 'cse3ebwKHnzd8FtZvwY71+50OwDfsQ',
  'secret' => 'HY9N8D0gmq2SQRnZNoHzs4iA8r3AbDeU6+xAaEMmVUDVgDvQ',
  'trusted_domains' => 
  array (
    0 => '192.168.48.231',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '27.1.8.1',
  'overwrite.cli.url' => 'http://192.168.48.231',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'MZAH0QKG0ZWzBJBaJ1PI8CiUeVqD4AD1SYR3DIceEwB1RykM27mep-EXLSTuYfq3',
  'installed' => true,
  'allow_local_remote_servers' => true,   <----
);
  1. install snap

sudo apt install snapd

  1. InatLL using snap

sudo snap install nextcloud

The Nextcloud package will be downloaded and installed on your server. You can confirm that the installation process was successful by listing the changes associated with the snap:

$ snap changes nextcloud
ID   Status  Spawn               Ready               Summary
2    Done    today at 13:10 CST  today at 13:17 CST  Install "nextcloud" snap
 ls -lR /snap/nextcloud/|less
 
alexlai@hc4NBoble:~$ ls /snap/nextcloud/current
bin                       conf    error  htdocs   lib             logs  migrations  mysqlrouter-log-rotate  README.router  share          usr
certbot_nextcloud_plugin  config  etc    icons    LICENSE         man   modules     php                     run            snap           utilities
cgi-bin                   docs    fixes  include  LICENSE.router  meta  my.cnf      README                  setup.py       support-files  var
alexlai@nextcloud:~$ apt list --installed>installed.nextcloud

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

alexlai@nextcloud:~$ diff installed.nextcloud installed.ori
408,409d407
< snap/noble,now 2013-11-29-11 arm64 [installed]
< snapd/noble,now 2.62+24.04build1 arm64 [installed]
411d408
< squashfs-tools/noble,now 1:4.6.1-1build1 arm64 [installed,automatic]
  1. Getting Additional Information About the Nextcloud Snap
lexlai@nextcloud:~$ snap info nextcloud
name:      nextcloud
summary:   Nextcloud Server - A safe home for all your data
publisher: Nextcloud✓
store-url: https://snapcraft.io/nextcloud
contact:   https://github.com/nextcloud/nextcloud-snap
license:   unset
description: |
  Access, share and protect your files, calendars, contacts, communication and
  more at home and in your enterprise.
commands:
  - nextcloud.disable-https
  - nextcloud.enable-https
  - nextcloud.export
  - nextcloud.import
  - nextcloud.manual-install
  - nextcloud.mysql-client
  - nextcloud.mysqldump
  - nextcloud.occ
services:
  nextcloud.apache:          simple, enabled, active
  nextcloud.logrotate:       simple, enabled, inactive
  nextcloud.mysql:           simple, enabled, active
  nextcloud.nextcloud-cron:  simple, enabled, active
  nextcloud.nextcloud-fixer: simple, enabled, active
  nextcloud.php-fpm:         simple, enabled, active
  nextcloud.redis-server:    simple, enabled, active
  nextcloud.renew-certs:     simple, enabled, active
snap-id:      njObIbGQEaVx1H4nyWxchk1i8opy4h54
tracking:     latest/stable
refresh-date: today at 13:16 CST
channels:
  latest/stable:    27.1.8snap1               2024-04-08 (41514) 316MB -
  latest/candidate: ↑                                                  
  latest/beta:      27.1.6snap1+git16.fa9c2d1 2024-04-12 (41626) 317MB -
  latest/edge:      master-2024-04-22         2024-04-22 (41808) 337MB -
  28/stable:        –                                                  
  28/candidate:     –                                                  
  28/beta:          –                                                  
  28/edge:          28-2024-04-21             2024-04-21 (41792) 318MB -
  27/stable:        27.1.8snap1               2024-04-08 (41514) 316MB -
  27/candidate:     ↑                                                  
  27/beta:          ↑                                                  
  27/edge:          27-2024-04-22             2024-04-22 (41810) 316MB -
  26/stable:        26.0.13snap1              2024-04-08 (41518) 285MB -
  26/candidate:     ↑                                                  
  26/beta:          ↑                                                  
  26/edge:          26-2024-04-22             2024-04-22 (41806) 286MB -
  25/stable:        25.0.13snap1              2023-11-06 (38519) 274MB -
  25/candidate:     ↑                                                  
  25/beta:          ↑                                                  
  25/edge:          25-2023-12-03             2023-12-03 (39088) 274MB -
  24/stable:        24.0.12snap1              2023-09-07 (37384) 246MB -
  24/candidate:     ↑                                                  
  24/beta:          ↑                                                  
  24/edge:          24-2023-08-12             2023-08-12 (36839) 377MB -
  23/stable:        23.0.12snap1              2023-01-15 (33293) 261MB -
  23/candidate:     ↑                                                  
  23/beta:          ↑                                                  
  23/edge:          23-2023-01-19             2023-01-19 (33363) 261MB -
  22/stable:        22.2.10snap1              2022-07-29 (31276) 248MB -
  22/candidate:     ↑                                                  
  22/beta:          ↑                                                  
  22/edge:          ↑                                                  
  21/stable:        21.0.9snap1               2022-06-13 (29852) 243MB -
  21/candidate:     ↑                                                  
  21/beta:          ↑                                                  
  21/edge:          ↑                                                  
  20/stable:        20.0.14snap1              2021-11-25 (28697) 218MB -
  20/candidate:     ↑                                                  
  20/beta:          ↑                                                  
  20/edge:          ↑                                                  
  19/stable:        19.0.12snap1              2021-07-06 (28384) 260MB -
  19/candidate:     ↑                                                  
  19/beta:          ↑                                                  
  19/edge:          ↑                                                  
  18/stable:        18.0.12snap1              2020-12-16 (25110) 259MB -
  18/candidate:     ↑                                                  
  18/beta:          ↑                                                  
  18/edge:          ↑                                                  
  17/stable:        17.0.10snap1              2020-10-23 (23907) 244MB -
  17/candidate:     ↑                                                  
  17/beta:          ↑                                                  
  17/edge:          ↑                                                  
  16/stable:        16.0.11snap1              2020-06-08 (21460) 220MB -
  16/candidate:     ↑                                                  
  16/beta:          ↑                                                  
  16/edge:          ↑                                                  
  15/stable:        15.0.14snap1              2020-01-20 (18384) 210MB -
  15/candidate:     ↑                                                  
  15/beta:          ↑                                                  
  15/edge:          ↑                                                  
  14/stable:        14.0.10snap1              2019-05-04 (13210) 196MB -
  14/candidate:     ↑                                                  
  14/beta:          ↑                                                  
  14/edge:          ↑                                                  
  13/stable:        13.0.12snap1              2019-05-03 (13161) 187MB -
  13/candidate:     ↑                                                  
  13/beta:          ↑                                                  
  13/edge:          ↑                                                  
  12/stable:        12.0.13snap1              2019-01-07 (10634) 200MB -
  12/candidate:     ↑                                                  
  12/beta:          ↑                                                  
  12/edge:          ↑                                                  
  11/stable:        11.0.8snap1               2018-05-10  (6963) 197MB -
  11/candidate:     ↑                                                  
  11/beta:          ↑                                                  
  11/edge:          ↑                                                  
  10/stable:        10.0.2snap1               2020-06-26   (390) 141MB -
  10/candidate:     ↑                                                  
  10/beta:          ↑                                                  
  10/edge:          ↑                                                  
  9/stable:         9.0.53snap4               2020-06-26   (101) 134MB -
  9/candidate:      ↑                                                  
  9/beta:           ↑                                                  
  9/edge:           ↑                                                  
installed:          27.1.8snap1                          (41514) 316MB -
  1. Step 2 – Configuring an Administrative Account, by command line
$ sudo nextcloud.manual-install nextCloudAdmin b23258585  <-- No good 
- change to nextcloudRootUser , b23258585

[sudo] password for alexlai: 
2024/04/22 13:33:15.983141 cmd_run.go:1072: WARNING: cannot create user data directory: failed to verify SELinux context of /root/snap: exec: "matchpathcon": executable file not found in $PATH

^C
alexlai@nextcloud:~$ sudo nextcloud.manual-install nextCloudAdmin b23258585
2024/04/22 13:34:07.830392 cmd_run.go:1072: WARNING: cannot create user data directory: failed to verify SELinux context of /root/snap: exec: "matchpathcon": executable file not found in $PATH
The username is already being used

Use Web page http://192.168.2.139

nextcloud-install-01.png

alexlai@nextcloud:~$ sudo ls /var/snap/nextcloud/common/nextcloud/data/alexlai/files/Photos
 Birdie.jpg   Gorilla.jpg	        Library.jpg		   Readme.md   Toucan.jpg
 Frog.jpg     ITC-5-LedIndicatior.png  'Nextcloud community.jpg'   Steps.jpg   Vineyard.jpg