All CLI commands missing after snap install on rpi5 on rapsbian x64 lite

Nextcloud version (eg, 20.0.5): 27.1.8snap1
Operating system and version (eg, Ubuntu 20.04): Rapsbian X64 lite (bookworm)
Apache or nginx version (eg, Apache 2.4.25): n/a
PHP version (eg, 7.4): n/a

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Install rapsbian lite X64 on pi5
  2. update /boot/firmware/config.txt to include “kernel=kernel8.img” to avoid radis server crashing

The output of your Nextcloud log in Admin > Logging:

    Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the security tips ↗. Without it some important web functionality like "copy to clipboard" or "service workers" will not work!

    You have not set or verified your email server configuration, yet. Please head over to the Basic settings in order to set them. Afterwards, use the "Send email" button below the form to verify your settings.
    Your installation has no default phone region set. This is required to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add "default_phone_region" with the respective ISO 3166-1 code ↗ of the region to your config file.
    The PHP module "imagick" is not enabled although the theming app is. For favicon generation to work correctly, you need to install and enable this module.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$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' => '***********************',
  'passwordsalt' => '******************',
  'secret' => '****************',
  'trusted_domains' =>
  array (
    0 => '',
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '********',
  'installed' => true,
  'maintenance' => false,

I can access the instance via the web interface, but none of the CLI commands are available on the machine. For example:

sudo nextcloud.enable-https lets-encrypt
sudo nextcloud.import

Do i need to install php manually, given that I’m running rapsbian x64 lite?

Thank you!

Try to run the command as follows…

sudo /snap/bin/nextcloud.enable-https lets-encrypt

See this GitHub thread and speciffically this comment for more information.

TL;DR: Snapd is best used on Ubuntu. :wink: