nextcloud / nextcloud/nextcloudpi

Installation fails with ERROR 1146 (42S02) at line 1: Table 'nextcloud.appconfig' doesn't exist

Open
#2,056 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

has-updates
Dominant language
Shell
Stars
2.9k
Forks
318
PR merge metrics
No merged PRs in 30d

Description

Hi,
just tried to install ncp on my raspi using
curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh|sudo bash

The script seems to have run through most of it but ended with an error message, I copy here the end of the output:

[...]
Nextcloud was successfully installed
Set mode for background jobs to 'cron'
System config value tempdirectory set to string /var/www/nextcloud/data/tmp
System config value mysql.utf8mb4 set to boolean true
System config value trusted_domains => 7 set to string nextcloudpi
System config value trusted_domains => 5 set to string nextcloudpi.local
System config value trusted_domains => 8 set to string nextcloudpi.lan
System config value trusted_domains => 3 set to string nextcloudpi.lan
System config value mail_smtpmode set to string sendmail
System config value mail_smtpauthtype set to string LOGIN
System config value mail_from_address set to string noreply
System config value mail_domain set to string nextcloudpi.com
ERROR 1146 (42S02) at line 1: Table 'nextcloud.appconfig' doesn't exist

I tried to trace the location where this occurred - it seems to be somewhere in nc-init.sh.

I also tried to find out how to fix this. I manually ran ncp-config and had run nc-init which went through without an error.
So in addition to reporting this issue it would be nice to know whether I can use the installation and how to start it up safely - if this question should be asked in a forum instead please kindly point me to the right location...

System information

NextcloudPi diagnostics

NextcloudPi version                                                                           v1.55.4
NextcloudPi image                                                                             NextcloudPi_05-18-25
OS                                                                                            Raspbian GNU/Linux 12
NCP is not activated yet. Please enter https://nextcloudpi.local or this instance's local IP  ***REMOVED SENSITIVE VALUE***
automount                                                                                     no
USB devices                                                                                   sda 
datadir                                                                                       /var/www/nextcloud/data
data in SD                                                                                    yes
data filesystem                                                                               ext2/ext3
data disk usage                                                                               8.7G/29G
rootfs usage                                                                                  8.7G/29G
swapfile                                                                                      /var/swap
dbdir                                                                                         /var/lib/mysql
Nextcloud check                                                                               ok
Nextcloud version                                                                             31.0.2.1
HTTPD service                                                                                 up
PHP service                                                                                   up
MariaDB service                                                                               up
Redis service                                                                                 up
HPB service                                                                                   down
Postfix service                                                                               up
Internet check                                                                                ok
Public IPv4                                                                                   ***REMOVED SENSITIVE VALUE***
Public IPv6                                                                                   ***REMOVED SENSITIVE VALUE***
Port 80                                                                                       closed
Port 443                                                                                      closed
IP                                                                                            ***REMOVED SENSITIVE VALUE***
Gateway                                                                                       ***REMOVED SENSITIVE VALUE***
Interface                                                                                     wlan0
Certificates                                                                                  ***REMOVED SENSITIVE VALUE***
NAT loopback                                                                                  no
Uptime                                                                                        14days

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "7": "nextcloudpi",
            "5": "nextcloudpi.local",
            "8": "nextcloudpi.lan",
            "3": "nextcloudpi.lan"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.2.1",
        "overwrite.cli.url": "https:\/\/nextcloudpi\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/var\/www\/nextcloud\/data\/tmp",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance": false
    }
}

HTTPd logs

[Sun May 18 10:57:52.889767 2025] [mpm_prefork:notice] [pid 12126:tid 12126] AH00163: Apache/2.4.62 (Raspbian) OpenSSL/3.0.16 configured -- resuming normal operations
[Sun May 18 10:57:52.889818 2025] [core:notice] [pid 12126:tid 12126] AH00094: Command line: '/usr/sbin/apache2'
[Sun May 18 10:59:28.233661 2025] [mpm_prefork:notice] [pid 12126:tid 12126] AH00170: caught SIGWINCH, shutting down gracefully
[Sun May 18 10:59:28.390101 2025] [ssl:warn] [pid 15528:tid 15528] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Sun May 18 10:59:28.390725 2025] [ssl:error] [pid 15528:tid 15528] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=arm-build.pitowers.org / issuer: CN=arm-build.pitowers.org / serial: 074F815003413E5A06B32DF98D6C9C4FDE1F6E84 / notbefore: Oct 10 00:16:22 2023 GMT / notafter: Oct  7 00:16:22 2033 GMT]
[Sun May 18 10:59:28.390733 2025] [ssl:error] [pid 15528:tid 15528] AH02604: Unable to configure certificate localhost:443:0 for stapling
[Sun May 18 10:59:28.391573 2025] [security2:notice] [pid 15528:tid 15528] ModSecurity for Apache/2.9.7 (http://www.modsecurity.org/) configured.
[Sun May 18 10:59:28.391580 2025] [security2:notice] [pid 15528:tid 15528] ModSecurity: APR compiled version="1.7.0"; loaded version="1.7.2"
[Sun May 18 10:59:28.391584 2025] [security2:warn] [pid 15528:tid 15528] ModSecurity: Loaded APR do not match with compiled!
[Sun May 18 10:59:28.391587 2025] [security2:notice] [pid 15528:tid 15528] ModSecurity: PCRE2 compiled version="10.42 "; loaded version="10.42 2022-12-11"
[Sun May 18 10:59:28.391590 2025] [security2:notice] [pid 15528:tid 15528] ModSecurity: LUA compiled version="Lua 5.1"
[Sun May 18 10:59:28.391593 2025] [security2:notice] [pid 15528:tid 15528] ModSecurity: YAJL compiled version="2.1.0"
[Sun May 18 10:59:28.391595 2025] [security2:notice] [pid 15528:tid 15528] ModSecurity: LIBXML compiled version="2.9.14"
[Sun May 18 10:59:28.391598 2025] [security2:notice] [pid 15528:tid 15528] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Sun May 18 10:59:28.482106 2025] [ssl:warn] [pid 15529:tid 15529] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Sun May 18 10:59:28.482824 2025] [ssl:error] [pid 15529:tid 15529] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=arm-build.pitowers.org / issuer: CN=arm-build.pitowers.org / serial: 074F815003413E5A06B32DF98D6C9C4FDE1F6E84 / notbefore: Oct 10 00:16:22 2023 GMT / notafter: Oct  7 00:16:22 2033 GMT]
[Sun May 18 10:59:28.482835 2025] [ssl:error] [pid 15529:tid 15529] AH02604: Unable to configure certificate localhost:443:0 for stapling
[Sun May 18 10:59:28.482893 2025] [http2:warn] [pid 15529:tid 15529] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Sun May 18 10:59:28.506843 2025] [mpm_prefork:notice] [pid 15529:tid 15529] AH00163: Apache/2.4.62 (Raspbian) OpenSSL/3.0.16 configured -- resuming normal operations
[Sun May 18 10:59:28.506924 2025] [core:notice] [pid 15529:tid 15529] AH00094: Command line: '/usr/sbin/apache2'

Database logs

tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory

Nextcloud logs

{"reqId":"2HK17PnswK6h9kQiM0BZ","level":3,"time":"2025-05-18T09:00:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Not installed","userAgent":"--","version":"","exception":{"Exception":"Exception","Message":"Not installed","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/base.php","line":691,"function":"checkInstalled","class":"OC","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1156,"function":"init","class":"OC","type":"::"},{"file":"/var/www/nextcloud/cron.php","line":24,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/base.php","Line":228,"message":"Not installed","exception":{},"CustomMessage":"Not installed"}}
{"reqId":"rjFWZgU7AE886hFR91My","level":3,"time":"2025-05-18T09:05:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Not installed","userAgent":"--","version":"","exception":{"Exception":"Exception","Message":"Not installed","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/base.php","line":691,"function":"checkInstalled","class":"OC","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1156,"function":"init","class":"OC","type":"::"},{"file":"/var/www/nextcloud/cron.php","line":24,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/base.php","Line":228,"message":"Not installed","exception":{},"CustomMessage":"Not installed"}}
{"reqId":"krklL02zkYiIOyRcwuP8","level":2,"time":"2025-05-18T10:05:02+00:00","remoteAddr":"","user":false,"app":"cron","method":"","url":"--","message":"failed to create instance of background job: OCA\\UpdateNotification\\BackgroundJob\\UpdateAvailableNotifications","userAgent":"--","version":"31.0.2.1","exception":{"Exception":"OC\\AppFramework\\Utility\\QueryNotFoundException","Message":"Could not resolve OCA\\UpdateNotification\\BackgroundJob\\UpdateAvailableNotifications! Class \"OCA\\UpdateNotification\\BackgroundJob\\UpdateAvailableNotifications\" does not exist","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/ServerContainer.php","line":155,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":42,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/var/www/nextcloud/lib/public/Server.php","line":39,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/JobList.php","line":288,"function":"get","class":"OCP\\Server","type":"::"},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/JobList.php","line":197,"function":"buildJob","class":"OC\\BackgroundJob\\JobList","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"getNext","class":"OC\\BackgroundJob\\JobList","type":"->"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":113,"message":"failed to create instance of background job: OCA\\UpdateNotification\\BackgroundJob\\UpdateAvailableNotifications","exception":{},"CustomMessage":"failed to create instance of background job: OCA\\UpdateNotification\\BackgroundJob\\UpdateAvailableNotifications"}}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with install.sh and the reported nc-init.sh path, then compare the installer output with the ncp-config and nc-init commands the reporter ran manually. Reproduce the installation on the reported Raspberry Pi environment and identify where the missing appconfig table is referenced. Done means the installation completes without ERROR 1146 and the resulting instance can be started safely.

Written by the indexing model from the issue text.

Assessment

Tech stack
mariadb, raspberry-pi, shell
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.