[Support] Linuxserver.io - Nextcloud


Recommended Posts

11 hours ago, Jeerapong said:

It work. I have downgraded to NC 18.0.3-ls70 the NextCloud back to normal status.

 

Great to hear.

 

11 hours ago, Jeerapong said:

Please suggest what is the suitable version I need to update to?

 

Just go the the latest supported versions, either 25 or 26.

I would upgrade the docker to the latest 19.x release first and then upgrade NC to 19.x. You can find the correct docker tag by using the search function and searching for "19."

Rinse and repeat until you are up to date. It will take a number of iterations since you can only go one major release at a time.

After each upgrade check if NC reports any issues under Administration Settings -> Overview. You may need to run a few database commands by hand after some of the updates.

Just remember in future to upgrade both docker and NC a bit more often so you don't get out of sync again. 😀

 

11 hours ago, Jeerapong said:

Can I install a fresh one and path to the old data location ?

 

Not that you need this anymore but yes. You just reinstall, point the data folder at the appropriate directory and then run "php occ files:scan --all" and it will rescan the folder and add all the files to the database.

Edited by cat2devnull
Link to comment

Hello,

After having problems with the upgrade from Nextcloud 23 to 26 a couple of months ago, It has stopped working again.

 

I am in 26.0.1 and Nextcloud is in Maintenance Mode after a reboot (I did it because I can't login).

In the Nextcloud docker log I see this:

 

using keys found in /config/keys
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2018-08-16 │ 2023-04-13 │ /config/nginx/nginx.conf                                               │
│            │ 2023-04-13 │ /config/nginx/site-confs/default.conf                                  │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
**** The following site-confs have extensions other than .conf ****
**** This may be due to user customization. ****
**** You should review the files and rename them to use the .conf extension or remove them. ****
**** nginx.conf will only include site-confs with the .conf extension. ****

 

Should I remove those fields? I dont think I have modified it and they look pretty similar to the sample files.

Is this the reason why my Nextcloud has stopped working?

 

Thanks in advance.

 

EDIT1: I updated through terminal and maintenance mode is now off (im in 26.0.2) but Im an internal server error when login again. Do you know which log should I be checking to get more info? I have been reading it could be the Mariadb or an incompatible app.. Btw, the message above with the .conf files is still in the log

 

EDIT2: I have check the /config/log/nginx/error.log and I have found this error:

 

2023/05/29 13:30:08 [error] 288#288: *5 FastCGI sent in stderr: "PHP message: {"reqId":"JcLdeQjsPRdnVkTf10Ry","level":3,"time":"2023-05-29T11:30:07+00:00","remoteAddr":"47.61.125.213","user":"notarealuser","app":"index","method":"POST","url":"/login","message":"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_id' in 'where clause'","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"26.0.2.1","exception":{"Exception":"OC\\DB\\Exceptions\\DbalException","Message":"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_id' in 'where clause'","Code":1054,"Trace":[{"file":"/config/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":295,"function":"wrap","class":"OC\\DB\\Exceptions\\DbalException","type":"::"},{"file":"/config/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":276,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/config/www/n" while reading response header from upstream, client: 47.61.125.213, server: _, request: "POST /login HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mynotrealhost.com"

 

I dont know what to do at this point, to be honest.

Edited by Yeyo53
Link to comment
On 10/25/2022 at 4:14 PM, daveo132 said:

Hi all,

I'm having a horrid time trying to upgrade to 23.0.1

 

I keep on getting 504 Gateway errors when the update is trying to progress. 

 

  • Happens on Step 3 (creating the backup) but eventually will progress.

 

  • Happens on Step 5 (Downloading) I had to download the zip and place in the updater folder to work around this.

Downloading

Parsing response failed.
Show detailed response

<html> <head><title>504 Gateway Time-out</title></head> <body> <center><h1>504 Gateway Time-out</h1></center> <hr><center>nginx/1.20.2</center> </body> </html> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page -->

 

However, if I F5 the page, it then carries on like all was ok.

 

 

  • Happens on Step 7 (Extracting) and that causes it all to fail and resets the update back to the start.

 

I've seen some stuff about trying to make sure the write permissions are correct by running 

sudo chown -R www-data:www-data /mnt/nextcloud 

but this just gives me an error of "invalid user www-data" which I understand should not be the case?

 

I'm at a bit of a loss and reached the limit of my knowledge here with linux / unraid etc.

 

Looking into things, I think it might be working but the connection is being timed out.

It just failed again on extracting but refreshing the page gave me 

"Step 6 is currently in process. Please reload this page later."

 

I've read somewhere that you can increase the default timeouts for this.  But I don't know where or how.

 

EDIT:

Ok, I can confirm that my update does work but all the issues are being caused by 504 timeouts.

I am having the same problem as this but I am using NC 25.05. I get an error code in the update.log that reads "cant handle ZIP file. Error code is: 28. I looked at where the new update was downloaded and I see that it was unzipped.

 

Edit: ran the updater.php in the CLI and it seemed to go okay. 

 

sudo -u abc php /config/www/nextcloud/updater/updater.phar

 

for me the user was abc but yours may be different.

 

Edited by dollabillz
Link to comment

Omg, this is frustrating, again updating the docker breaks NC. I'm on 25.0.7 after having upgraded manually via command line from 25.0.5. 

 

Is 26.0 compatible with PHP 8.2.6?  And if so why did the docker maintainer update PHP. Is he expecting people to upgrade to the latest non-stable channel release?

 

I guess on that note, what is the method to upgrade from 25.0.x to 26?

 

--edit--

 

OK, so I figured it out. The trick is to roll back the container version to 25.0.2, and that should at least give you the ability to pull up the web interface again and run the upgrade script to 26.0

 

It worked for me. 

 

--further edit--

 

In case someone doesn't know how to roll back the container version just go to Docker and hit the edit button and in the "Repository" field edit the field to say "linuxserver/nextcloud:25.0.2"

 

run through the web upgrade script in the nextcloud admin interface and after you've successfully updated to 26 to back to the docker setting, edit again and change the repository field and take out the ":25.0.2"

 

Hope this helps.

 

Edited by allinvain
  • Like 1
Link to comment

@allinvain 

Great tip! 

I was wondering why after my Nextcloud update like month ago, i didnt had any new photos uploaded.

Wanted to go to WebUI and got that error:

This version of Nextcloud is not compatible with PHP>=8.2.
You are currently running 8.2.6.

 

Luckily your Tip fixed it...

 

Nextcloud is each time problem, been using it many years, but this the same problems mostly with updates.

Finally started and new version so let's update and again this:

image.png.4138b7650e4cf40b069c47471a56d645.png

 

Every F*king time, need to update in multiple Browsers Chrome / Edge , re-run X times to finish. :(

image.thumb.png.23c891f0a3c98ac28de0363be0ab90bb.png

 

Then it fails with this message " to “login you need to provide the unhashed value of “updater.secret” in your config file.”"

 

Which doesnt work for me...

 

1. Stop docker

 

Only way is to open/edit - www\nextcloud\config\config.php

 

  'updater.release.channel' => 'stable',
  'maintenance' => true,

TO

  'updater.release.channel' => 'stable',
  'maintenance' => false,

 

2. Start docker , go to UI and continue

 

 

Edited by killeriq
Link to comment

I just went through this and found a relatively painless way to do it:

1. downgrade the docker to linuxserver/nextcloud:24.0.12

2. Choose the update to 25.0.7 from the webgui

3. For me it kept timing out, I would use the back pause for a minute then forward button on the browser and choose continue.

4. Keep doing this until it goes into maintenance mode.

5. At this point the command line works so use docker exec -it nextcloud updater.phar from the UNRAID terminal, it will successfully continue the upgrade to 25.0.7.

6. Repeat the command docker exec -it nextcloud updater.phar and it will upgrade to 26.02

7. Upgrade the docker to linuxserver/nextcloud:latest

  • Like 1
Link to comment

this is a guide on how to upgrade from terminal you might find it more easy

 

if you have problem This version of Nextcloud is not compatible with PHP>=8.2.<br/>You are currently running 8.2.6

 

what i have did i revert back to 25.0.3

then started the upgrade from terminal

 

 

1. open terminal from nextcloud container

2. Turn on maintenance mode
cd /config/www/nextcloud/
sudo -u abc php occ maintenance:mode --on

3. Backup current nextcloud install
cd /config/www/
mv nextcloud nextcloud-backup

if you get a error regarding backup delete `nextcloud-backup` and try again to backup

4. Grab newest nextcloud release and unpack it

wget https://download.nextcloud.com/server/releases/nextcloud-26.0.2.tar.bz2 or whatever version, "you can see latest version on https://download.nextcloud.com/server/releases"
tar -xvf nextcloud-26.0.2.tar.bz2

5. Copy across old config.php from backup
cp nextcloud-backup/config/config.php nextcloud/config/config.php

 

##Now Restart docker container via Unraid WebGUI

6. Open terminal in container

7. Perform upgrade

cd /config/www/nextcloud/
sudo -u abc php occ upgrade  (if you get error you might have to enable permision)

8.Turn off maintenance mode
sudo -u abc php occ maintenance:mode --off

9. Now Restart docker container via Unraid WebGUI   and upgrade your container to latest version 26.0.2 in my case

 

###fixes after installation###

 

 
*if you get error "sudo: ./occ command not found" (run chmod 777 occ) then run the fix


sudo -u abc ./occ db:add-missing-indices

sudo -u abc ./occ db:convert-filecache-bigint

 

 

**Other fixes

 

you have to stop the nextcloud container and proxymanager

go to  appdata\nextcloud\nginx\site-confs

and edit the line

add_header X-Robots-Tag "noindex, nofollow" always;

add_header X-Frame-Options "SAMEORIGIN" always;

 

also if you still have problem with apps after updating nextcloud, you have to change ownership to apps nextcloud\www\nextcloud\apps i use the plugin `file manager` from unraid to achieve that and i set owner to nobody


 

 

Edited by Danuel
Link to comment
3 hours ago, Gabriel_B said:

Why does this keep happening

When using this container for Nextcloud, YOU are responsible for keeping the Nextcloud app up to date. The updates for this specific container NEVER upgrade the application, only the surrounding support files. If you don't want to be surprised by this, set the docker tag to a specific version instead of latest, so things don't get updated until you update both the application and the container version manually.

 

There are other Nextcloud container implementations that may approach this differently, you may wish to investigate how they handle updates and switch if it fits your needs better.

 

  • Like 1
Link to comment
30 minutes ago, JonathanM said:

When using this container for Nextcloud, YOU are responsible for keeping the Nextcloud app up to date...

 

Ok. So, when there is a docker update I should check to see if there is an update for the app first to prevent this in the future? Do I understand that right?

 

EDIT: It's working again though with the downgrade fix.

Edited by Gabriel_B
Link to comment
Just now, Gabriel_B said:

Ok. So, when there is a docker update I should check to see if there is an update for the app first to prevent this in the future? Do I understand that right?

Exactly. Never update the container without first checking the Nextcloud version inside the app.

 

The two events will seldom if ever overlap, the app will typically update much less often than the container, so many times you will still be up to date with Nextcloud when the container updates. The issue comes when people ignore the app updates for months and automatically update the container.

  • Like 1
  • Upvote 1
Link to comment
13 hours ago, killeriq said:

@allinvain 

Great tip! 

I was wondering why after my Nextcloud update like month ago, i didnt had any new photos uploaded.

Wanted to go to WebUI and got that error:

This version of Nextcloud is not compatible with PHP>=8.2.
You are currently running 8.2.6.

 

Luckily your Tip fixed it...

 

Nextcloud is each time problem, been using it many years, but this the same problems mostly with updates.

Finally started and new version so let's update and again this:

image.png.4138b7650e4cf40b069c47471a56d645.png

 

Every F*king time, need to update in multiple Browsers Chrome / Edge , re-run X times to finish. :(

image.thumb.png.23c891f0a3c98ac28de0363be0ab90bb.png

 

 

 

 

 

 

When you get that red x error what I did was just refresh the page. It will spew a message saying that the operation is in progress and you need to wait. Wait a few minutes and hit refresh again (on your browser) and it should resume and proceed to the next step. I think updating via command line is far easier as long as you don't run into the issue that I did whereby the PHP version the docker container was running was incompatible with the command line update script (because of expected PHP version mismatch).

 

Link to comment
1 hour ago, johnwhicker said:

None of the steps here work for me and I think my NextCloud is even more screwed up than before I started. 

 

Can I just delete NextCloud and re-install it?  Would I lose the settings and content?
 

So frustrating and annoying :( 

I'm in the same boat.  I tried @Danuel @allinvain and @dodgypast steps.  I even get the error about permissions being needed, but they are correct from what I can tell. 

 

And when I try to run the docker exec -it nextcloud updater.phar command, I get this mess:

 

Nextcloud Updater - version: v26.0.0beta2-9-g64e2e4c dirty

Current version is 26.0.2.

Update to Nextcloud 17.0.10 available. (channel: "beta")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-17.0.10.zip
Open changelog ↗

 

Why is it looking for 17.0.10 and even beta now? Really just thinking about blowing it all away and restarting lol. 

 

Thoughts?

Link to comment

I just want to say - in the first post of this thread is how to update Nextcloud using the command line. That is the most reliable and successful way to upgrade Nextcloud itself. All these silly back and forth browser button tricks could be eliminated by simply following instructions in first post. Y’all gonna end up with something corrupt and have a real situation you’re stuck in messing around.

Link to comment
20 minutes ago, blaine07 said:

I just want to say - in the first post of this thread is how to update Nextcloud using the command line. That is the most reliable and successful way to upgrade Nextcloud itself. All these silly back and forth browser button tricks could be eliminated by simply following instructions in first post. Y’all gonna end up with something corrupt and have a real situation you’re stuck in messing around.

 

Mannnn, you ain't even following the issue here dude, just move on PLEASEEEEE? You are not adding any value nor helping OK. 

 

For you humble information,  NextCloud recent update broke everything and people are trying to fix it.

 

"Should the "occ upgrade" command be executed? [Y/n] y

This version of Nextcloud is not compatible with PHP>=8.2.<br/>You are currently running 8.2.6"

 

 

Link to comment
 
Mannnn, you ain't even following the issue here dude, just move on PLEASEEEEE? You are not adding any value nor helping OK. 
 
For you humble information,  NextCloud recent update broke everything and people are trying to fix it.
 
"Should the "occ upgrade" command be executed? [Y/n] y
This version of Nextcloud is not compatible with PHP>=8.2.
You are currently running 8.2.6"
 
 

Reading the first post on how to keep Nextcloud up to date is a ton of value. The last 8/12 posts are the same issue(s) over and over.

What version of Nextclouds “…recent update broke everything…?”

4f05fe5cfbfe9c023a3bc837edfb864b.jpg
Link to comment
2 hours ago, blaine07 said:

I just want to say - in the first post of this thread is how to update Nextcloud using the command line. That is the most reliable and successful way to upgrade Nextcloud itself. All these silly back and forth browser button tricks could be eliminated by simply following instructions in first post. Y’all gonna end up with something corrupt and have a real situation you’re stuck in messing around.

You could not upgrade from 24.0.12 via the command line.

We're not idiots.

Link to comment

I downgraded the docker and tried to run an update. Getting an error

 

PHP Warning:  fopen(/data/updater.log): Failed to open stream: Permission denied in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php on line 1128
Could not open updater.log

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.