[Support] Linuxserver.io - Nextcloud


Recommended Posts

13 hours ago, mo679 said:

hello everyone, my first post here and new to unraid. 

hope I'm posting right,

I'm trying to setup a nextcloud docker on unraid with reverse proxy, and I tried to update from gui. after upgrade it tells me "Internal Server Error The server encountered an internal error and was unable to complete your request. Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report. More details can be found in the server log." 

I researched already but I'm a noob and can't get forward.

I'm stucked, any help would be appreciated

nextcloud.log 29.92 kB · 0 downloads updater.log 19.84 kB · 1 download

nextcloud connected again to webui after server reboot. i thought docker restart to be same. 

Link to comment

2021/04/12 06:25:56 [error] 563#563: *1131 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Host is unreachable in /config/www/nextcloud/lib/private/DB/Connection.php:85
 

 

Ubiquiti router lost network settings and Unraid got a new IP. I was able to fix all other problems but the only thing left is Nextcloud. I'm getting this error in the error.log. 

 

Any ideas where I can check settings for the DB connection?

Link to comment
13 minutes ago, sem1845 said:

2021/04/12 06:25:56 [error] 563#563: *1131 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Host is unreachable in /config/www/nextcloud/lib/private/DB/Connection.php:85
 

 

Ubiquiti router lost network settings and Unraid got a new IP. I was able to fix all other problems but the only thing left is Nextcloud. I'm getting this error in the error.log. 

 

Any ideas where I can check settings for the DB connection?

/config/nextcloud/www/nextcloud/config/config.php 
change the ip also there.

Link to comment
11 hours ago, saarg said:

There might be a couple of hundred post about the same issue in this thread, so a search would be welcome 😉

In short, you haven't updated nextcloud in a long time.

Thanks for the response but I have updated Nextcloud through the Unraid Docker GUI.  Is there somewhere else I should upgrade?

Link to comment
On 5/28/2017 at 1:08 PM, CHBMB said:

Got to the bottom of this one:

 

Edit /config/letsencrypt/nginx/site-confs/nextcloud



	location / {
    	proxy_pass https://192.168.0.1:444/;
	proxy_max_temp_file_size 2048m;
	include /config/nginx/proxy.conf;
  	}

Change 2048m to a size that works for you.

 

From here.

 

If your site is behind a nginx frontend (for example a loadbalancer):

By default, downloads will be limited to 1GB due to proxy_buffering and proxy_max_temp_file_size on the frontend.

  • If you can access the frontend’s configuration, disable proxy_buffering or increase proxy_max_temp_file_size from the default 1GB.
  • If you do not have access to the frontend, set the X-Accel-Buffering header to add_header X-Accel-Buffering no; on your backend server.

I think I have exact same issue with combo of nextcloud v21 and nginx proxy manager. Everything works like a breeze except that every file more than 1gb downloaded remotely stops after 1gb. Can someone please explain me like i'm 4-yr old which files in nextcloud and/or in NPM should I edit to get rid of this limitation once and for all. Many thanks in advance.

 

EDIT: so basically I found the solution myself. No need to edit any files in nextcloud.

In order to get rid of 1gb download limitation :

1. go to NPM Proxy Host tab.

2. Click '3 dots' and click 'Edit' in your nextcloud proxy host.

3. Go to advances tab and put the following:

proxy_request_buffering off;
proxy_buffering off; 

4. Click Save

 

That's it. Enjoy no more stupid limitations on the file size downloaded. Tested 13gb file from remote location and it worked like a charm. Hopefully someone finds it useful for their setup.

Edited by Januszmirek
  • Like 1
Link to comment
On 3/1/2021 at 7:40 AM, capt.shitface said:

No. I deleted the Docker and used CA CLEANUP APPDATA to clean-up appdata. Then reinstalled. Not too much work because database and /data is not affected.
Be ware, 2FFA didn't work after reinstall, i had to use backup-codes to login and the "reinstall and re-activate" 2FFA. 

 

On 3/1/2021 at 1:19 PM, capt.shitface said:

Correct! 

I run MariaDB docker. I just connected to that, logged in with my user/admin-account with backup codes. 


Also deleted the "upgrade-xxxxxx" folder in /data
Ofcourse all the settings in Nextcloud (apps etc.) was gone, but users and data was OK

 

Dear TBoneStaek,

 

This is the way.

 

If you run into the same problem again 45 days later, this is the way.

 

Signed, smarter-than-March, April TBoneStaek.

Link to comment

There are already 3-4 (I think?) onlyoffice templates available, I'm not sure another would get approved... But that's almost certainly something that the Pi community would have interest in if they dont already have a go-to alpine onlyoffice, I'd hit up that community and gauge interest!

Link to comment

I'm currently working in an LXC container and used the official documentserver (unmodified) app for Nextcloud (no standalone version of onlyoffice). Just some tweaks on the base alpine container.

Where could I find those templates to compare their solutions with mine?

Edited by tiblexentle
Link to comment
On 4/9/2021 at 9:34 AM, j0nnymoe said:

The well-known info needs to be added to the nextcloud nginx config and not the swag config. We've already updated this and mentioned it in the changelog for nextcloud.

 

I'm having trouble fixing the "/.well-known" errors (webfinger, nodinfo, caldav and carddav).

I followed the changelog, deleted the "default" file located at \appdata\nextcloud\nginx\site-confs and restarted the container.

 

However, the error is still there (I tried to clear my browser cache, without no results).

Is there something else that I have to do?

 

My version of nextcloud is 21.0.1

 

Thanks!

 

Link to comment

I’m having the exact same issue and was about to get on here to ask. I’ve deleted the default.conf and restarted the container many times. I’ve cleared browser cache, opened new private browsers. In viewing the new default.conf, all the new lines appear to be correct as per a comparison posted above of the old and new lines in the conf.

 

Also running 21.0.1

 

Waiting with bated breath for the LXC gods to share their awesome wisdom and expertise!

  • Like 1
Link to comment
1 hour ago, TBoneStaek said:

I’m having the exact same issue and was about to get on here to ask. I’ve deleted the default.conf and restarted the container many times. I’ve cleared browser cache, opened new private browsers. In viewing the new default.conf, all the new lines appear to be correct as per a comparison posted above of the old and new lines in the conf.

 

Also running 21.0.1

 

Waiting with bated breath for the LXC gods to share their awesome wisdom and expertise!

If you using cloudflare or have caching enabled on NginxProxyManager, clear/close these caches also!

Link to comment
27 minutes ago, skois said:

If you using cloudflare or have caching enabled on NginxProxyManager, clear/close these caches also!

I use cloudflare and tried to purge the cache, but the results were the same...

 

My reverse proxy is swag. Does it have caching on it as well? (I installed it using Spaceinvader videos).

Link to comment
7 hours ago, skois said:

I think not, i'll get back if i think anything else to try.

I. AM. AN. IDIOT.

 

@luizmont is this your issue also?

 

When I upgraded from NC 20 to NC 21 I had to nuke my appdata to get the update going. I failed to reconfig my reverse proxy. I've done that and now most errors have gone away. I now have two errors that I'm sure are related to failing to reconfig everything correctly:

 

  • The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation.
  • The "X-Frame-Options" HTTP header is not set to "SAMEORIGIN". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.

I have the correct edit in the nextcloud.subdomain.conf so I'm not sure why I'm still getting the X-Frames error. As for the first error, not sure about that one either but I haven't had time to investigate. If someone can point me in the right direction, awesome, but if not, I'll start searching for answers to those issues tonight. Just glad to have NC functioning.

Link to comment
1 hour ago, TBoneStaek said:

I. AM. AN. IDIOT.

 

@luizmont is this your issue also?

 

When I upgraded from NC 20 to NC 21 I had to nuke my appdata to get the update going. I failed to reconfig my reverse proxy. I've done that and now most errors have gone away. I now have two errors that I'm sure are related to failing to reconfig everything correctly:

 

  • The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation.
  • The "X-Frame-Options" HTTP header is not set to "SAMEORIGIN". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.

I have the correct edit in the nextcloud.subdomain.conf so I'm not sure why I'm still getting the X-Frames error. As for the first error, not sure about that one either but I haven't had time to investigate. If someone can point me in the right direction, awesome, but if not, I'll start searching for answers to those issues tonight. Just glad to have NC functioning.

 

I didn't have to erase my appdata, but just to check, are you talking about the config.php in appdata\nextcloud\www\nextcloud\config or some other proxy configuration on swag?

 

Link to comment
On 2/24/2021 at 3:12 AM, ICDeadPpl said:

 

I replaced these lines in the '/mnt/cache/appdata/nextcloud/nginx/site-confs/default' file. (Adjust path to your appdata path, if it's different)

 


location = /.well-known/carddav {
  return 301 $scheme://$host:$server_port/remote.php/dav;
}
location = /.well-known/caldav {
  return 301 $scheme://$host:$server_port/remote.php/dav;
}
location = /.well-known/webfinger {
  return 301 $scheme://$host:$server_port/public.php?service=webfinger;
}
location = /.well-known/host-meta {
  return 301 $scheme://$host:$server_port/public.php?service=host-meta;
}
location = /.well-known/host-meta.json {
  return 301 $scheme://$host:$server_port/public.php?service=host-meta-json;
}

with these lines


# Make a regex exception for `/.well-known` so that clients can still
# access it despite the existence of the regex rule
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
# for `/.well-known`.
location ^~ /.well-known {
    # The following 6 rules are borrowed from `.htaccess`

    location = /.well-known/carddav     { return 301 /remote.php/dav/; }
    location = /.well-known/caldav      { return 301 /remote.php/dav/; }
    # Anything else is dynamically handled by Nextcloud
    location ^~ /.well-known            { return 301 /index.php$uri; }

    try_files $uri $uri/ =404;
}

Then I restarted the Nextcloud docker and the error was gone.

 

32 minutes ago, luizmont said:

 

I didn't have to erase my appdata, but just to check, are you talking about the config.php in appdata\nextcloud\www\nextcloud\config or some other proxy configuration on swag?

 

@luizmont Yeah, I'm talking about the config.php. I hadn't properly set mine up after deleting the appdata before my NC 20 to NC 21 upgrade (which got stuck a bunch of times).

 

If you haven't, make sure your default.conf actually updated by comparing the above. Perhaps you still have the old lines in there and it didn't update?

 

That's the only other thought I have towards your issue. :/

Link to comment

Good Afternoon,

 

So against my better judgement I decided to update from NC20 to NC21. Upon doing so I have been stuck on step 6 for about 2 weeks or so. this is all I get when I try and do anything:

 

image.png.6406ef11f8ab7a02728c23d55aa6dd0a.png

 

or this from the browser....

 

image.png.a4b123a84dcd6646cca7036329e2b025.png

 

I'm not sure what else to do seeing I can no longer access the system and this thing will not finish updating. I did get to, for the first time ever, update from inside nextcloud which was different than accidently updating my dock and having to figure out how to get things working again… Any help would be most appreciated. Thanks.

Link to comment
On 4/12/2021 at 8:48 PM, jonathanm said:

Perhaps reading the first post in this thread will help.

Okay, that didn't work.  I've even tried the "nuclear" option of deleting the docker container and image for Nextcloud and reinstalled the app but I still get the same error "You are currently running 7.4.15.This version of Nextcloud is not compatible with > PHP 7.3" when I go the GUI.  Any ideas?

 

Link to comment
Good Afternoon,
 
So against my better judgement I decided to update from NC20 to NC21. Upon doing so I have been stuck on step 6 for about 2 weeks or so. this is all I get when I try and do anything:
 
image.png.6406ef11f8ab7a02728c23d55aa6dd0a.png
 
or this from the browser....
 
image.png.a4b123a84dcd6646cca7036329e2b025.png
 
I'm not sure what else to do seeing I can no longer access the system and this thing will not finish updating. I did get to, for the first time ever, update from inside nextcloud which was different than accidently updating my dock and having to figure out how to get things working again… Any help would be most appreciated. Thanks.
In /data/updater-randomhash/ there is a
.steps file, delete and run update again

Sent from my Mi 10 Pro using Tapatalk

Link to comment
Okay, that didn't work.  I've even tried the "nuclear" option of deleting the docker container and image for Nextcloud and reinstalled the app but I still get the same error "You are currently running 7.4.15.This version of Nextcloud is not compatible with > PHP 7.3" when I go the GUI.  Any ideas?
 
This was answered this month like 3 times very detailed.
In short you have to revert to older docker tag with php 7.3.
Update nextcloud from gui.
Update docker to latest

Sent from my Mi 10 Pro using Tapatalk

Link to comment
5 hours ago, skois said:

This was answered this month like 3 times very detailed.
In short you have to revert to older docker tag with php 7.3.
Update nextcloud from gui.
Update docker to latest

Sent from my Mi 10 Pro using Tapatalk
 

I tried reverting back to an older docker tag then updating to the current version and it doesn't fix the problem.

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.