Nextcloud shows "Welcome to nginx!" or "404 Not Found"

What app is this about, and its version: Nextcloud, 31.0.10~ynh1
What YunoHost version are you running: 12.1.35
What type of hardware are you using: Raspberry Pi 3, 4+

Describe your issue

After a failed upgrade, I reinstalled Nextcloud and now I’m seeing the
“Welcome to nginx!” page at the nextcloud app or “404 Not Found” at https://mydomain.tld/nextcloud/apps/dashboard.

Share relevant logs or error messages

At this moment, I don’t know which logs are relevant.

/var/log/nextcloud.log

{"reqId":"KYGnHVShurQWYSOfuqNQ","level":3,"time":"2025-11-17T12:57:43+00:00",
"remoteAddr":"20.171.140.78","user":"--",
"app":"no app in context","method":"GET","url":"/1.php",
"message":"Could not decrypt or decode encrypted session data",
"userAgent":"--","version":"31.0.10.2",
"exception":{"Exception":"Exception","Message":"HMAC does not match.",
"Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Security/Crypto.php",
"line":98,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto",
"type":"->","args":["*** sensitive parameters replaced ***"]},
{"file":"/var/www/nextcloud/lib/private/Session/CryptoSessionData.php",
"line":70,"function":"decrypt","class":"OC\\Security\\Crypto",
"type":"->","args":["*** sensitive parameters replaced ***"]},
{"file":"/var/www/nextcloud/lib/private/Session/CryptoSessionData.php",
"line":47,"function":"initializeSession",
"class":"OC\\Session\\CryptoSessionData",
"type":"->"},
{"file":"/var/www/nextcloud/lib/private/Session/CryptoWrapper.php",
"line":94,"function":"__construct","class":"OC\\Session\\CryptoSessionData",
"type":"->"},{"file":"/var/www/nextcloud/lib/base.php",
"line":418,"function":"wrapSession","class":"OC\\Session\\CryptoWrapper",
"type":"->"},{"file":"/var/www/nextcloud/lib/base.php",
"line":690,"function":"initSession","class":"OC",
"type":"::"},{"file":"/var/www/nextcloud/lib/base.php",
"line":1194,"function":"init","class":"OC",
"type":"::"},{"file":"/var/www/nextcloud/index.php",
"line":22,"args":["/var/www/nextcloud/lib/base.php"],
"function":"require_once"}],
"File":"/var/www/nextcloud/lib/private/Security/Crypto.php",
"Line":162,"message":"Could not decrypt or decode encrypted session data",
"exception":{},
"CustomMessage":"Could not decrypt or decode encrypted session data"}}

Hi,

Logs are in the Webadmin
This one is not reliable

1 Like

Where is webadmin?

/var/log/nginx/error.log

...
2025/11/20 01:51:11 [error] 1464#1464: *15 "/usr/share/nginx/html/apps/dashboard/index.html" is not found (2: No such file or directory), client: 45.142.235.115, server: mydomain.tld, request: "GET /apps/dashboard/ HTTP/2.0", host: "mydomain.tld"

The webadmin of yunohost > tools >services >nginx, and share the logs using the green button (share the generated link)

Hello @folaht

Can you share the restore log? (Webadmin>tools>logs)

It might be helpful.

https://paste.yunohost.org/raw/atuqimumin

Same here, Nextcloud disappeared after failed upgrade today from .10 to .11, not possible to restore Welcome to nginx message, tried several times, here are the logs failed upgrade https://paste.yunohost.org/raw/dakepamoli and failed restore https://paste.yunohost.org/raw/noyoquraje and https://paste.yunohost.org/raw/vugecahaki

Do you use external storage for your nextcloud directories ?

Yes, indeed! I have done so for a while and upgrading has been no issue before

Your mountpoint seemed “busy” during the last upgrade.

Yes, this line says so:
WARNING - mv: cannot move '/var/www/nextcloud' to '/var/cache/yunohost/appconfbackup//var/www/nextcloud.backup.20251129.115139': Device or resource busy
Do you have any idea what to do about it? Rebooting did not help

Uu-oh…

Before upgrading, you can check lsof +D /var/www/nextcloud

But, first of all, were you able to restore?

Not able to restore, therefore:
lsof +D /var/www/nextcloud
lsof: WARNING: can’t stat(/var/www/nextcloud): No such file or directory
lsof 4.95.0

That’s why I was asking about restoration :wink:

Upgrade and restore failed, therefore Nextcloud disappeared totally

Is your external storage still available ?

I used the internal /home/ as external storage

Sorry, but I don’t understand. Do you mean that /var/www/nextcloud is a symlink to /home ?

no, in YH Nextcloud you can use you Home direcztory as external storage