The Basics
- Nextcloud Server version (e.g., 29.x.x):
30.0.2.2
- Operating system and version (e.g., Ubuntu 24.04):
FreeBSD 14.1
- Web server and version (e.g, Apache 2.4.25):
nginx/1.26.2
- PHP version (e.g, 8.3):
PHP 8.2.25
- Is this the first time you’ve seen this error? (Yes / No):
yes
- When did this problem seem to first start?
Possibly as far back as EOL version 26 nextcloud
- Installation method (e.g. AIO, NCP, Bare Metal/Archive, etc.)
freebsd pkg, or github sources, for pot jail
- Are you using Cloudflare, mod_security, or similar? (Yes / No)
no
Summary of the issue you are facing:
After completing the web form installer, or the cli installer, or configuring with autoconfig.php, the outcome is the same:
Error
It looks like you are trying to reinstall your Nextcloud. However the file CAN_INSTALL is missing from your config directory. Please create the file CAN_INSTALL in your config folder to continue.
Creating the CAN_INSTALL file goes back to setup screen, which fails because user already exists. If new user set, back to error.
I’ve tested with different nginx configurations, and caddy, and same outcome:
When using ‘php occ maintenance:install’ as www user, it finishes with “Nextcloud was successfully installed” but then ‘php occ status’ says it’s not installed and the web frontend gives the missing CAN_INSTALL error.
I’ve tested several versions back too, to NC26, and it loops back to setup screen as CAN_INSTALL file exists with earlier versions.
I don’t get any meaningful errors in nextcloud.log with debug logging on, other than:
- “Token is too short for a generated token”
- “The requested alias "IntegrityCodeChecker" is deprecated. Please request "OC\IntegrityCheck\Checker" directly. This alias will be removed in a future Nextcloud version.”
Has anyone got a full install working under FreeBSD? I have a live instance than been upgraded from github sources over the years, and continues to work fine - but a fresh install is impossible as it never sees itself as installed.
Steps to replicate it (hint: details matter!):
- install nextcloud with freebsd pkg, or from github sources
- setup nginx or caddy
- setup empty db
- complete nextcloud config with cli installer, web form or autoconfig.php
- nextcloud says not installed when trying to open/login
This can also be repeated with older versions of nextcloud for similar outcome, but looping back to setup screen as CAN_INSTALL file exists.
Log entries
Nextcloud
Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log
located in your data directory). Feel free to use a pastebin/gist service if necessary.
install done via cli
su -m www -c 'cd /usr/local/www/nextcloud/; \
php occ -vvv maintenance:install \
--database "mysql" \
--database-name "nextcloud" \
--database-host "10.1.2.116" \
--database-port "3306" \
--database-user "nextcloud" \
--database-pass "dbpass" \
--database-table-space "oc_" \
--admin-user "user" \
--admin-pass "pass" \
--data-dir "/mnt/nextcloud"'
cli installer logs last few lines
2024-11-18T14:56:55+00:00 - Checking target database schema
2024-11-18T14:56:55+00:00 - Migrate database schema
2024-11-18T14:56:55+00:00 - Mark migrations as executed
2024-11-18T14:56:55+00:00 Registering tasks of files_trashbin
2024-11-18T14:56:55+00:00 Installing updatenotification
2024-11-18T14:56:55+00:00 Migrating schema only
2024-11-18T14:56:55+00:00 - Reading 011901Date20240305120000
2024-11-18T14:56:55+00:00 - Mark migrations as executed
2024-11-18T14:56:55+00:00 Registering tasks of updatenotification
2024-11-18T14:56:55+00:00 Installing files_reminders
2024-11-18T14:56:55+00:00 Migrating schema only
2024-11-18T14:56:55+00:00 - Reading 10000Date20230725162149
2024-11-18T14:56:55+00:00 - Checking target database schema
2024-11-18T14:56:55+00:00 - Migrate database schema
2024-11-18T14:56:55+00:00 - Mark migrations as executed
2024-11-18T14:56:55+00:00 Registering tasks of files_reminders
2024-11-18T14:56:55+00:00 Installing bruteforcesettings
2024-11-18T14:56:55+00:00 Migrating schema only
2024-11-18T14:56:55+00:00 Registering tasks of bruteforcesettings
2024-11-18T14:56:55+00:00 Installing settings
2024-11-18T14:56:55+00:00 Migrating schema only
2024-11-18T14:56:55+00:00 Registering tasks of settings
2024-11-18T14:56:55+00:00 Installing recommendations
2024-11-18T14:56:55+00:00 Migrating schema only
2024-11-18T14:56:55+00:00 Registering tasks of recommendations
2024-11-18T14:56:55+00:00 Installing files_pdfviewer
2024-11-18T14:56:55+00:00 Migrating schema only
2024-11-18T14:56:55+00:00 Registering tasks of files_pdfviewer
2024-11-18T14:56:55+00:00 Setup data directory
2024-11-18T14:56:55+00:00 Install background jobs
2024-11-18T14:57:00+00:00 Nextcloud was successfully installed
followed by output of su -m www -c 'cd /usr/local/www/nextcloud/; php occ status'
Nextcloud is not installed - only a limited number of commands are available
- installed: false
- version: 30.0.2.2
- versionstring: 30.0.2
- edition:
- maintenance: false
- needsDbUpgrade: false
- productname: Nextcloud
- extendedSupport: false
last few lines of nextcloud.log
, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`path_hash` = :dcValue1) AND (`storage` = :dcValue2)"
"dirty table reads: SELECT `path` FROM `*PREFIX*filecache` WHERE (`storage` = :dcValue1) AND (`fileid` = :dcValue2)"
"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`path_hash` = :dcValue1) AND (`storage` = :dcValue2)"
"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`path_hash` = :dcValue1) AND (`storage` = :dcValue2)"
"dirty table reads: SELECT `path` FROM `*PREFIX*filecache` WHERE (`storage` = :dcValue1) AND (`fileid` = :dcValue2)"
"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`path_hash` = :dcValue1) AND (`storage` = :dcValue2)"
"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`path_hash` = :dcValue1) AND (`storage` = :dcValue2)"
"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`path_hash` = :dcValue1) AND (`storage` = :dcValue2)"
"dirty table reads: SELECT `id` FROM `*PREFIX*jobs` WHERE (`class` = :dcValue1) AND (`argument_hash` = :dcValue2) LIMIT 1"
"dirty table reads: SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)"
"dirty table reads: SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)"
"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`path_hash` = :dcValue1) AND (`storage` = :dcValue2)"
"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`path_hash` = :dcValue1) AND (`storage` = :dcValue2)"
"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`path_hash` = :dcValue1) AND (`storage` = :dcValue2)"
"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`path_hash` = :dcValue1) AND (`storage` = :dcValue2)"
"Not installed"
with autoconfig.php setup, the nextcloud.log has
"The requested alias \"IntegrityCodeChecker\" is deprecated. Please request \"OC\\IntegrityCheck\\Checker\" directly. This alias will be removed in a future Nextcloud version."
and same outcome in browser
Error
It looks like you are trying to reinstall your Nextcloud. However the file CAN_INSTALL is missing from your config directory. Please create the file CAN_INSTALL in your config folder to continue.
Web Browser
Error
It looks like you are trying to reinstall your Nextcloud. However the file CAN_INSTALL is missing from your config directory. Please create the file CAN_INSTALL in your config folder to continue.
Web server / Reverse Proxy
The output of your Apache/nginx/system log in /var/log/____
:
10.1.2.1 - - [18/Nov/2024:14:57:23 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 404 146 "-" "Nextcloud Server Crawler"
10.1.2.1 - - [18/Nov/2024:14:57:23 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 404 146 "-" "Nextcloud Server Crawler"
10.1.2.1 - - [18/Nov/2024:14:57:23 +0000] "GET / HTTP/1.1" 200 1137 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:132.0) Gecko/20100101 Firefox/132.0"
10.1.2.1 - - [18/Nov/2024:14:57:24 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 404 146 "-" "Nextcloud Server Crawler"
10.1.2.1 - - [18/Nov/2024:14:57:24 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 404 146 "-" "Nextcloud Server Crawler"
10.1.2.1 - - [18/Nov/2024:14:57:24 +0000] "GET /apps/theming/img/background/jenna-kim-the-globe.webp HTTP/1.1" 200 1138 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:132.0) Gecko/20100101 Firefox/132.0"
nginx error log with debug enabled
2024/11/18 14:58:31 [info] 71290#130278: *18 kevent() reported that client 10.1.2.1 closed keepalive connection
2024/11/18 14:58:31 [info] 71290#130278: *16 kevent() reported that client 10.1.2.1 closed keepalive connection
2024/11/18 14:58:31 [info] 71290#130278: *17 kevent() reported that client 10.1.2.1 closed keepalive connection
Configuration
Nextcloud
Mysql connection is good. Object storage is good too, setup creates all necessary files in S3 (minio).
<?php
$CONFIG = array (
'trusted_domains' =>
array (
0 => '10.1.1.1:27080',
1 => '10.1.1.1:9000',
2 => 'REDACTED-PUBLIC-URL',
),
'datadirectory' => '/mnt/nextcloud',
'config_is_read_only' => false,
'default_language' => 'en',
'log_type' => 'file',
'loglevel' => 0,
'logfile' => '/mnt/nextcloud/nextcloud.log',
'overwrite.cli.url' => 'https://REDACTED-PUBLIC-URL',
'overwritehost' => 'REDACTED-PUBLIC-URL',
'overwriteprotocol' => 'https',
'memcache.local' => '\\OC\\Memcache\\APCu',
'installed' => true,
'updater.release.channel' => 'stable',
'allow_local_remote_servers' => true,
'filelocking.enabled' => true,
'maintenance' => false,
'theme' => '',
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
'encryption_skip_signature_check' => true,
'encryption.key_storage_migrated' => false,
'twofactor_enforced' => 'false',
'twofactor_enforced_groups' =>
array (
),
'twofactor_enforced_excluded_groups' =>
array (
0 => 'no_2fa',
),
'app_install_overwrite' =>
array (
0 => 'camerarawpreviews',
1 => 'keeweb',
2 => 'calendar',
),
'apps_paths' =>
array (
0 =>
array (
'path' => '/usr/local/www/nextcloud/apps',
'url' => '/apps',
'writable' => true,
),
1 =>
array (
'path' => '/usr/local/www/nextcloud/apps-pkg',
'url' => '/apps-pkg',
'writable' => false,
),
),
'enabledPreviewProviders' =>
array (
0 => 'OC\\Preview\\PNG',
1 => 'OC\\Preview\\JPEG',
2 => 'OC\\Preview\\GIF',
3 => 'OC\\Preview\\Movie',
4 => 'OC\\Preview\\HEIC',
5 => 'OC\\Preview\\BMP',
6 => 'OC\\Preview\\XBitmap',
7 => 'OC\\Preview\\MP3',
8 => 'OC\\Preview\\TXT',
9 => 'OC\\Preview\\MarkDown',
10 => 'OC\\Preview\\OpenDocument',
11 => 'OC\\Preview\\PDF',
12 => 'OC\\Preview\\Krita',
),
'forwarded_for_headers' =>
array (
0 => 'HTTP_X_FORWARDED_FOR',
1 => 'HTTP_FORWARDED_FOR',
),
'dbtype' => 'mysql',
'version' => '30.0.2.2',
'dbname' => 'nextcloud',
'dbhost' => '10.1.2.116:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'REDACTED',
'dbpassword' => 'REDACTED',
'db.log_request_id' => false,
'mysql.utf8mb4' => true,
'objectstore' =>
array (
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' =>
array (
'bucket' => 'nextcloud',
'autocreate' => true,
'key' => 'REDACTED',
'secret' => 'REDACTED',
'use_ssl' => true,
'region' => '',
'hostname' => '10.1.1.1',
'port' => '9000',
'use_path_style' => true,
),
),
'passwordsalt' => 'REDACTED',
'secret' => 'REDACTED',
'instanceid' => 'REDACTED',
);
Apps
The output of occ app:list
(if possible).
su -m www -c 'cd /usr/local/www/nextcloud/; php occ app:list'
Nextcloud is not installed - only a limited number of commands are available
There are no commands defined in the "app" namespace.