Latest snap causes Internal Server Error

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • `31.0.7snap1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Web server and version (e.g, Apache 2.4.25):
    • Snap
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • N/A
  • PHP version (e.g, 8.3):
    • Snap
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After automatic upgrade
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Snap
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Can’t connect to database reporting permission denied.

Steps to replicate it (hint: details matter!):

Revert to previous version works!

sudo snap revert nextcloud
2025-07-30T12:45:12-04:00 INFO Waiting for “snap.nextcloud.mysql.service” to stop.
nextcloud reverted to 31.0.6snap1

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.

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

PASTE HERE

see getting help and especially remove incompatible third party apps

Nextcloud snap stopped working after an update. What can I do?

See what to do if an update breaks my Nextcloud

Note

First of all, let’s get you back up and running. Snaps were designed to have a robust upgrade story. In the case of the Nextcloud snap, every time it refreshes (updates), it takes a snapshot of the database and other version-specific things (not the raw data though, e.g. pictures and documents) and holds them alongside the old revision of the snap.

sudo snap revert nextcloud

With that command, you should be back up and running right at the moment before the update happened.


that’s great! at least its running.

now we need a listing of the installed apps to find the culprit

sudo nextcloud.occ app:list

post that list here

sudo nextcloud.occ app:list

Enabled:

  • activity: 4.0.0
  • app_api: 5.0.2
  • bruteforcesettings: 4.0.0
  • circles: 31.0.0
  • cloud_federation_api: 1.14.0
  • comments: 1.21.0
  • contactsinteraction: 1.12.0
  • dashboard: 7.11.0
  • dav: 1.33.0
  • federatedfilesharing: 1.21.0
  • federation: 1.21.0
  • files: 2.3.1
  • files_downloadlimit: 4.0.0
  • files_pdfviewer: 4.0.0
  • files_reminders: 1.4.0
  • files_sharing: 1.23.1
  • files_trashbin: 1.21.0
  • files_versions: 1.24.0
  • firstrunwizard: 4.0.0
  • logreader: 4.0.0
  • lookup_server_connector: 1.19.0
  • nextcloud_announcements: 3.0.0
  • notifications: 4.0.0
  • oauth2: 1.19.1
  • password_policy: 3.0.0
  • photos: 4.0.0-dev.1
  • privacy: 3.0.0
  • profile: 1.0.0
  • provisioning_api: 1.21.0
  • recommendations: 4.0.0
  • related_resources: 2.0.0
  • serverinfo: 3.0.0
  • settings: 1.14.0
  • sharebymail: 1.21.0
  • support: 3.0.0
  • survey_client: 3.0.0
  • systemtags: 1.21.1
  • text: 5.0.0
  • theming: 2.6.1
  • twofactor_backupcodes: 1.20.0
  • user_status: 1.11.0
  • viewer: 4.0.0
  • weather_status: 1.11.0
  • webhook_listeners: 1.2.0
  • workflowengine: 2.13.0
    Disabled:
  • admin_audit: 1.21.0
  • encryption: 2.19.0
  • files_external: 1.23.0
  • files_rightclick: 0.15.1 (installed 1.6.0)
  • suspicious_login: 9.0.1
  • twofactor_nextcloud_notification: 5.0.0
  • twofactor_totp: 13.0.0-dev.0
  • user_ldap: 1.22.0

:thinking: nothing there that meets the eye… try this:

backup first!

  • stop Nextcloud snap sudo snap stop nextcloud
  • save Nextcloud snap sudo snap save nextcloud
  • start Nextcloud snap sudo snap start nextcloud
  • copy/move snapshot (*.zip) in /var/lib/snapd/snapshots to wherever

then

  • disable circles sudo nextcloud.occ app:disable circles
  • manually upgrade sudo snap refresh nextcloud
  • re enable circles sudo nextcloud.occ app:enable circles
    • if you don’t need circles, leave it disabled

I believe cricles was renamed to teams. that could be an issue.

my disabled apps:

Disabled:
  - circles: 31.0.0 (installed 29.0.0-dev)

if the issue persists we’ll need your logs, run the debugging script and post the output here

I did another refresh with disabling circles and re-enable it. This time the refresh succeeded. Not sure what happened last time. It could be caused by a power loss during refresh?

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.