Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] Linuxserver.io - Nextcloud

Featured Replies

Does anyone know how to solve this problem:

Nextcloud Hub 8 (29.0.2)

error from log:

ErrorPHP chmod(): Operation not permitted at /app/www/public/lib/private/Log/File.php#84

 

I compared permissions on a new nextcloud docker installation and they both have the same permissions.

 

  • 2 weeks later...
  • Replies 7.1k
  • Views 1.7m
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Here's my list of instructions....    Use them at your own risk.....   If upgrading to v12 please see here:   ##Turn on maintenance mode docker exec -it nextcloud occ m

  • When i did enter the docker container with ssh and did run the following command the error message was gone   sudo -u abc php /config/www/nextcloud/occ db:add-missing-indices   Onl

  • gustomucho
    gustomucho

    After tinkering with this for a while, it seems the solution is much simpler than I thought. For some reason, the only step required is to modify the config.php file. No need to install ffmp

Posted Images

Hi Everyone:

 

I currently run Nextcloud on one Unraid Server, which has been up and running for a couple years at this point. I recently built an additional Unraid Server also running Nextcloud; however, I'm unsure what port rules (or if it's even possible) are necessary to make a second server work. I tried assigning the ports manually outside of current applications, but it has been a dead end.

 

If I stick to the same installation method as previously explained by SpaceinvaderOne and change the port forwarding rules in the router towards the new computer, it works fine. But I would like both installations functioning and available. Any help is appreciated.

 

Thanks!

3 hours ago, k197 said:

If I stick to the same installation method as previously explained by SpaceinvaderOne and change the port forwarding rules in the router towards the new computer, it works fine. But I would like both installations functioning and available. Any help is appreciated.

So you will need to setup 2 domains nextcloud1.mydomain.com and nextcloud2.mydomain.com
Then point both of those externally at you external routers IP (which hopefully has DDNS).

Port forward 80/443 (HTTP/HTTPS) to the address of a reverse proxy such as nginx.

Also point your internal DNS server for both at nginx.

Configure nginx to use Let's Encrypt for certs and point the two domains at their respective servers. Nginx will then look at the request header of incoming requests and based on the domain will forward the request for both servers.

When you setup like this, your devices (phones, laptops, etc) will work seamlessly on your lan or WAN.

 

Your other option is to setup a service like Tailscale so all your devices appear to be on the LAN 24/7 and then you don't need to setup any external DNS CNAMEs or run nginx.

On 5/10/2024 at 11:49 PM, oeci said:

I tried something. In config.php I entered the IP address of the swag container and now the error message is gone. Is setting the trusted_proxies like this fine or does it come with any drawbacks?

hi! i have the same problem... but can't figure it out...

  'trusted_proxies' =>
  array (
    0 => 'swag',
    1 => gethostbyname('swag'),
    2 => '192.168.xx.yy:1443',
  ),

2 is my unraid ip address with swag https port. tried also without port but nothing changed...

 

could you post your config?

Edited by pika

You need an IP (without port) and nothing else.

oh... i thought i could just add the ip to the array - that didn't work.

but just using the one entry with ip:

  'trusted_proxies' =>
  array (
    0 => '192.168.xx.yy',
  ),

works! thank you!

Edited by pika

You can have multiple IPs, but likely if an entry is invalid then the whole array is, it'll have stopped on the invalid 'swag' and just ignored the rest

Edited by Kilrah

I have run into an interesting problem. For reasons I can no longer remember, I had my nextcloud stuck to version 27.1.4-ls289 and I'm trying to upgrade it now.

When I tried to change my repository to :latest, that didn't work due to being 2 versions behind. So, I attempted to change it to both 28.0.0-ls290 and 28.0.4-ls315 and got an error on the upgrade.

Initializing nextcloud 28.0.0.11 (this can take a while) ...
Upgrading nextcloud from 27.1.4.1 ...
Setting permissions
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Updating database schema
Exception: Database error when running migration 28000Date20231103104802 for app core
An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'nextcloud.oc_files_versions' doesn't exist in engine
Update failed
Maintenance mode is kept active
Resetting log level
Initializing finished
**** 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. ****
/config/nginx/site-confs/default.conf.bak
[custom-init] No custom files found, skipping...
[ls.io-init] done.

 

I checked the database, and the oc_files_versions table is actually in the database, so I have no idea why it's failing due to this table not existing.

I just updated the docker container; I'm on 29.0.3-ls328 (and unRAID 6.12.6). For a few days at least prior to the update I was unable to sync to Nextcloud on my server. I couldn't get into the Web GUI because the home page had a message saying: "Update needed. Please use the command line updater because updating via browser is disabled in your config.php."

 

I recalled that a while back the docker container was changed so that Nextcloud updates were done by updating the container (vs doing it "manually" from within the container). So I thought/hoped that updating the container would fix this problem, but after updating today, I'm still getting the same "Update needed" message.

 

What do I need to do to fix this?

hi there

 

I'm getting all these php errors in nextcloud......I don't know what to do here, can anybody help???

 

Version

Nextcloud Hub 8 (29.0.3)

Unraid 6.12.10

mariadb: Linuxserver.io version: 10.11.8-r0-ls148

 

 Error: file_put_contents(/data/appdata_oc9yjypevmo8/preview/c/1/8/5/9/7/5/49503/48-64.jpg): Failed to open stream: Invalid argument at /app/www/public/lib/private/Files/Storage/Local.php#339

	    GET /core/preview?fileId=49503&x=32&y=32&mimeFallback=true&a=1

	    from 178.255.148.168 by root at Jul 5, 2024, 3:09:46 AM


 

 Error: file_put_contents(/data/appdata_oc9yjypevmo8/preview/7/e/e/1/e/b/5/49494/48-64.jpg): Failed to open stream: Invalid argument at /app/www/public/lib/private/Files/Storage/Local.php#339
    GET /core/preview?fileId=49494&x=32&y=32&mimeFallback=true&a=1
    from 178.255.148.168 by root at Jul 5, 2024, 3:09:46 AM

 

[PHP] Error: Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused at /app/www/public/lib/private/DB/Connection.php#163
    GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json
    from 178.255.148.168 by -- at Jul 6, 2024, 1:12:17 AM

 

 

Edited by Ninja5000

On 7/3/2024 at 6:10 PM, sonofdbn said:

I just updated the docker container; I'm on 29.0.3-ls328 (and unRAID 6.12.6). For a few days at least prior to the update I was unable to sync to Nextcloud on my server. I couldn't get into the Web GUI because the home page had a message saying: "Update needed. Please use the command line updater because updating via browser is disabled in your config.php."

 

I recalled that a while back the docker container was changed so that Nextcloud updates were done by updating the container (vs doing it "manually" from within the container). So I thought/hoped that updating the container would fix this problem, but after updating today, I'm still getting the same "Update needed" message.

 

What do I need to do to fix this?

 

I managed to fix this by editing the config.php file to allow updating via browser, which in retrospect seems quite obvious. (Just changed 'upgrade.disable-web' from true to false.) Has the way of updating the Nextcloud version changed? Maybe I missed an announcement. Anyway, it's working again for me now.

11 minutes ago, sonofdbn said:

 

I managed to fix this by editing the config.php file to allow updating via browser, which in retrospect seems quite obvious. (Just changed 'upgrade.disable-web' from true to false.) Has the way of updating the Nextcloud version changed? Maybe I missed an announcement. Anyway, it's working again for me now.

The method to update changed, yes: you need to change the docker tag to update. If you'd changed the tag and were still getting the "update needed" message, then I'm glad you solved it.

If you hadn't changed the tag, then I think your update won't stick next time there is an update to the Docker container (not a Nextcloud update, a LinuxServer.io Docker image update, which happen weekly).

So do make sure that your Docker tag and current Nextcloud version are aligned.

I'd also avoid using the web upgrade and stick to the Docker method, as that's how LSIO have designed it to work. Stepping outside of that has potential for gubbins, gruffins, and other mischief in your system.

1 hour ago, sonofdbn said:

Has the way of updating the Nextcloud version changed?

In this container yes, maybe a year ago? You used to have to do updates from the web ui, but that led to people not doing them and things breaking over time as dependencies get updated and old NC won't support them, now NC updates with the container. If you've left your install to rot for years then you're in the initial situation.

Edited by Kilrah

On 7/6/2024 at 8:37 PM, jademonkee said:

The method to update changed, yes: you need to change the docker tag to update. If you'd changed the tag and were still getting the "update needed" message, then I'm glad you solved it.

If you hadn't changed the tag, then I think your update won't stick next time there is an update to the Docker container (not a Nextcloud update, a LinuxServer.io Docker image update, which happen weekly).

So do make sure that your Docker tag and current Nextcloud version are aligned.

I'd also avoid using the web upgrade and stick to the Docker method, as that's how LSIO have designed it to work. Stepping outside of that has potential for gubbins, gruffins, and other mischief in your system.

 

On 7/6/2024 at 9:24 PM, Kilrah said:

In this container yes, maybe a year ago? You used to have to do updates from the web ui, but that led to people not doing them and things breaking over time as dependencies get updated and old NC won't support them, now NC updates with the container. If you've left your install to rot for years then you're in the initial situation.

 

I'm aware of NC updating via the container vs the old way of doing updates via the webui. The repo I'm using is lscr.io/linuxserver/nextcloud:latest, and have been using that for a long time. What is the "docker tag" I should be changing or aligning with the NC version? I'm on "Nextcloud Hub 8 (29.0.3)". If I had been many versions behind, I think I would have had to update a few major versions to get to the current version, and that certainly didn't happen.

 

I should add that after I changed that parameter in the config file, there was no lengthy download, verification, etc. procedure, as there usually is with an update. I'm not totally convinced that there was actually an update done after the change. I got into the WebUI immediately and apart from some message about an app (Recognize - can't remember that the message was, unfortunately - maybe updating or restarting) everything was normal.

5 minutes ago, sonofdbn said:

 

 

I'm aware of NC updating via the container vs the old way of doing updates via the webui. The repo I'm using is lscr.io/linuxserver/nextcloud:latest, and have been using that for a long time. What is the "docker tag" I should be changing or aligning with the NC version? I'm on "Nextcloud Hub 8 (29.0.3)". If I had been many versions behind, I think I would have had to update a few major versions to get to the current version, and that certainly didn't happen.

 

I should add that after I changed that parameter in the config file, there was no lengthy download, verification, etc. procedure, as there usually is with an update. I'm not totally convinced that there was actually an update done after the change. I got into the WebUI immediately and apart from some message about an app (Recognize - can't remember that the message was, unfortunately - maybe updating or restarting) everything was normal.

I usually avoid 'latest' tags so that I don't inadvertently upgrade (as sometimes upgrades break things), so I use a version tag (linuxserver/nextcloud:version-29.0.3 - a list of other tags is here). LSIO have built the upgrade scripts into when the containers start, so I'd pin a container version now, and manually change it for next NC version upgrade (and see if it upgrades properly this time).

If you have been using 'latest', and have been updating/restarting the Docker image, then it's all been happening in the background, so you should have had upgrades happening without your intervention. I think your initial error message showed that one such upgrade went wrong at some point, but it looks like you've now fixed it.

On 7/3/2024 at 8:10 PM, sonofdbn said:

I just updated the docker container; I'm on 29.0.3-ls328 (and unRAID 6.12.6). For a few days at least prior to the update I was unable to sync to Nextcloud on my server. I couldn't get into the Web GUI because the home page had a message saying: "Update needed. Please use the command line updater because updating via browser is disabled in your config.php."

 

I recalled that a while back the docker container was changed so that Nextcloud updates were done by updating the container (vs doing it "manually" from within the container). So I thought/hoped that updating the container would fix this problem, but after updating today, I'm still getting the same "Update needed" message.

 

What do I need to do to fix this?

linuxserver.io disabled the gui updater, but its still available on the CLI.

docker exec -it "nextcloud-container-name" occ upgrade

 

If you can't get back into the gui, you need to disable maintenance mode:

docker exec -it "nextcloud-container-name" occ maintenance-mode:disable 

(I might have the maintenance-mode:disable incorrect, but you can type up to and including occ and it will show you all the options).

 

Once an upgrade has been done, you can't switch to a lower version. You're better off restoring a database and nextcloud backup and doing it again.

 

Edit: 

I forgot to add, if you want a smooth upgrade. Its worth doing an appdata backup, including mysql / mariadb. 

Secondly, I would disable the apps in Nextcloud. If there's going to be a failure, its normally a compatibility with apps between versions. I've had issues, mainly with the Elasticsearch plugin not working afterwards, despite being the correct version and I've had to reinstall it. Worst case, your upgrade fails. 

 

I agree with @jademonkee. I also don't use the :latest tag. You're asking for issues. Nextcloud is great, but latest versions are buggy as hell. You're better waiting for a couple of updates. I'm on the latest now, but I've had to fix a few things and there is still one repetitive error that they reckon will be fixed in 29.04, which they're just releasing an RC for now.

Edited by Geck0

On 5/13/2024 at 9:47 PM, JCM said:

I dont see why this is a database problem. Once I restart the nextcloud docker everything works fine until the next day...

How are you connected to the database? Can you show us your config.php (cleanse it), also your docker templates for mariadb or mysql.

Does the database docker stop or does the connection just drop? Have you checked the mysql logs??

14 minutes ago, Geck0 said:

Nextcloud is great, but latest versions are buggy as hell

I absolut don't agree. The only people who report update problems here are those with pinned versions. I use latest by myself from the beginning and had no issues with that. And if there is a bug in one of the latest versions then you can use a version tag until they next version is out. 

In over 3 years i had to do it only once and only fort one day. 

The problem with the pinned version is, if you want to upgrade you have to do it manually step by step, through the necessary versions, but you must look by yourself which those are you have to go through.

On 6/16/2024 at 11:20 AM, tmor2 said:

I have a weird issue when creating folder in my nextcloud instance:

  • When I create a folder directly in nextcloud over webgui, I can see that folder in Krusader under nextcloud/[user]/files
  • However, when I create a folder in Krusader under nextcloud/[user]/files, that folder does NOT appear in nextcloud webgui.

What could be causing it?

A bit late to reply on this, but hopefully it helps others as well. If you add a file to a Nextcloud folder, the database isn't updated, so Nextcloud doesn't know the file is there.

You can add files this way, I do it all the time, if I'm moving a lot of files from areas of my server into Nextcloud. There is no point in downloading them to my client and Syncing, that would be daft.

 

So, after you've done this, you need to run:

docker exec -it nextcloud-container-name occ files:scan --all

 

or, if you've added it to one person's folder only, instead of --all just use the person's name (case is important).

Hope that helps somebody / everybody.

 

That's okay, we can agree to disagree. 

Quote

And if there is a bug in one of the latest versions then you can use a version tag until they next version is out. 

Thanks for agreeing with me.

 

Quote

The problem with the pinned version is, if you want to upgrade you have to do it manually step by step, through the necessary versions

Nope, you can change it back to :latest or whichever the latest tag available, I do it all the time. You're referring to people that pin the tag and leave it for months / years and get left behind. This is not what I said.

10 minutes ago, Archonw said:

I absolut don't agree. The only people who report update problems here are those with pinned versions. I use latest by myself from the beginning and had no issues with that. And if there is a bug in one of the latest versions then you can use a version tag until they next version is out. 

In over 3 years i had to do it only once and only fort one day. 

Quote

The problem with the pinned version is, if you want to upgrade you have to do it manually step by step, through the necessary versions

, but you must look by yourself which those are you have to go through.

 

18 minutes ago, Geck0 said:

This is not what I said.

But this is what happend all the time... ;-) 

I did not realize that the mysql native password functionality was being removed from mysql and would completely break nextcloud. I had thought it would continue to be something I could keep enabled.

 

Does anyone know a fix as my mysql docker container auto updated to 9.0 and cannot be downgraded and I can no longer use nextcloud at all, I'm not sure how to even recover my database at this point as the mysql docker will not start if I try to enable the native password plugin.

27 minutes ago, smcw said:

I did not realize that the mysql native password functionality was being removed from mysql and would completely break nextcloud. I had thought it would continue to be something I could keep enabled.

 

Does anyone know a fix as my mysql docker container auto updated to 9.0 and cannot be downgraded and I can no longer use nextcloud at all, I'm not sure how to even recover my database at this point as the mysql docker will not start if I try to enable the native password plugin.

No advice on recovering but it’ll need locked to 8.4.1 once you do get it recovered. Have a backup to restore to?

28 minutes ago, smcw said:

I did not realize that the mysql native password functionality was being removed from mysql and would completely break nextcloud. I had thought it would continue to be something I could keep enabled.

 

Does anyone know a fix as my mysql docker container auto updated to 9.0 and cannot be downgraded and I can no longer use nextcloud at all, I'm not sure how to even recover my database at this point as the mysql docker will not start if I try to enable the native password plugin.

When I posted a PSA about it I was told I was dumb for not knowing. 
 

Someone posted how to recover. Might work? I used alternative method. 
 

https://www.reddit.com/r/unRAID/s/m1s1lsX7E7

6 hours ago, blaine07 said:

When I posted a PSA about it I was told I was dumb for not knowing. 
 

Someone posted how to recover. Might work? I used alternative method. 
 

https://www.reddit.com/r/unRAID/s/m1s1lsX7E7

Thanks, I'll give it a try, I appreciate the PSA too. Too bad I missed it, I'll have to try to pay attention to that sub as well.

 

I probably should have known better, I do know auto updates are a risk, but I find even with manual updating it can be challenging to be sure you are fully aware of how apps and containers I setup over the last 10 years all interact and work together. I also sometimes feel not updating can present other risks.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.