[Support] Linuxserver.io - Nextcloud


Recommended Posts

 Hi guys, 

 

I have two nextcloud dockers setup and it all seems to run fine, but once a day the NEXTCLOUD #2 gets the 502 error. 

 

I have the following unraid docker running:


- NginxProxyManager  `autostart wait 0` 
- mariadb  `autostart wait 5` on port 3306
- mariadb2 `autostart wait 20` on port 3307
- nextcloud  `autostart wait 20` on port 444
- nextcloud2  `autostart wait 20` on port 448

 

 

All on bridged network. 
Each nextcloud is directed to via a proxy from Nginx.
Each nextcloud is linked to mariaDB via separate port.


Most of the time all is running fine, but from time to time I encounter the 

Quote

502 bad gateway when trying to reach the NEXTCLOUD #2


Maybe once a day...

 

 

Steps to replicate it:

1. I assumed that it was a problem of dockers starting too fast.
2. I tried to have a wait time before they start. But problem appears again. 
3. When I **stop** mariaDB2 and and NEXTCLOUD2 and restart it after few seconds, it works again. 


Could anyone suggest where to look for problems?

----------------

 

Nextcloud version: `Nextcloud 22.1.1`
Operating system and version : `UNRAID Version: 6.9.2 `
Nginx version:  `v2.9.9 © 2021`

The output of your Nextcloud log in **Admin > Logging**:
This is the only error warning I get since it has worked:
 

Quote

Warning    core Login failed: '67.513466269904' (Remote IP: '184.XXX.242.192')    

 

Link to comment
 Hi guys, 
 
I have two nextcloud dockers setup and it all seems to run fine, but once a day the NEXTCLOUD #2 gets the 502 error. 
 
I have the following unraid docker running:

- NginxProxyManager  `autostart wait 0` 
- mariadb  `autostart wait 5` on port 3306
- mariadb2 `autostart wait 20` on port 3307
- nextcloud  `autostart wait 20` on port 444
- nextcloud2  `autostart wait 20` on port 448
 
 
All on bridged network. 
Each nextcloud is directed to via a proxy from Nginx.
Each nextcloud is linked to mariaDB via separate port.

Most of the time all is running fine, but from time to time I encounter the 
502 bad gateway when trying to reach the NEXTCLOUD #2

Maybe once a day...
 
 
Steps to replicate it:
1. I assumed that it was a problem of dockers starting too fast.
2. I tried to have a wait time before they start. But problem appears again. 
3. When I **stop** mariaDB2 and and NEXTCLOUD2 and restart it after few seconds, it works again. 

Could anyone suggest where to look for problems?
----------------
 
Nextcloud version: `Nextcloud 22.1.1`
Operating system and version : `UNRAID Version: 6.9.2 `
Nginx version:  `v2.9.9 2021`
The output of your Nextcloud log in **Admin > Logging**:
This is the only error warning I get since it has worked:
 
Warning    core Login failed: '67.513466269904' (Remote IP: '184.XXX.242.192')    
 
Sounds like the mariadb is crashing, check the logs for it.
In my experience, if it gives 502 without any changes in your Network set-up, it's the DB.

Sent from my Mi 10 Pro using Tapatalk

Link to comment
43 minutes ago, skois said:

Sounds like the mariadb is crashing, check the logs for it.

 

Thank for the tip. 
I only get these warnings, that do not really correlate to the 502s. 

Quote

2021-10-10  0:40:00 1322 [Warning] Aborted connection 1322 to db: 'nextcloudXXX' user: 'adminXXX' host: '172.17.0.1' (Got an error reading communication packets)

 

Quote

2021-10-05  8:43:36 4 [Warning] IP address '172.17.0.1' could not be resolved: Name does not resolve

 

 

Also one more think to note ... the only way to make it work again is to restart mariadb and nextcloud. 

I will test if whether i restart only one it also helps ... next time this error shows up. 

  • Like 1
Link to comment
in the meantime, any tips how to make it more "stable" ? 
There is max 5 people connected to it during the day and the data transfer is minimum. 
Tbh I've used mariadb for a while but had some issues. After moving to postgres, never had any problems.


Sent from my Mi 10 Pro using Tapatalk

  • Like 1
Link to comment

Running Nextcloud on my Unraid server and I have a bunch of video files on it which I used to play on my iOS devices via the Nextcloud app. Lately for some reason it only just downloads them not like before where it opened the video player like I want to. Via the browser it still opens up the video player. Anyone?

Link to comment

I'm trying to run this docker in a custom bridge network in conjuction with your mariadb docker.

 

At first I tried running both dockers in the same custom br0, this led to a 304 error starting the second docker though (is this not possible).

 

Running the Nextcloud docker in a custom br0 and the mariadb docker in default bridge mode, Nextcloud is unable to connect to the database.

 

So far the only possible config of running this setup is running them both in bridge mode.

 

Is there any workaround for this?

Link to comment

Hi Folks, can any one assist me with a recent error I noticed in the overview section under setting in Nexcloud.

 

The warning is: 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.

 

I've tried amending the config.php in line with the documentation, but am still getting the error.

 

Any assistance would be appreciated.

 

Thanks.

Link to comment

Help please :/

 

Im trying to create an external strorage mount for paperless-ng using the app in nextcloud

 

1. I have installed the external storage app in nextcloud

2.  I am trying to make a storage path in the docker template but the docker wont start when I add this field

 

Obviosuly im doing something wrong, even read the help pages and im still stuck, Id appreciate your help.

 

 

 

 

Screenshot 2021-10-17 081522.png

Screenshot 2021-10-17 081557.png

Link to comment

hi there

 

i have successfully setup the docker and got everything working, I was then trying to put it behind a reverse proxy using HAProxy on pfsense but for the life of me I cannot get it working, have tried checking the thread but so far my search-fu is letting me down so wondering if anyone has got this working 

 

my logs don't seem to show much and have added the trusted proxies etc and nothing seems to help :(

Link to comment

I have followed space invaderones video to set this up and have it working ok, i set this up specifically to share a 2TB disk image, initially i tried moving it with MC to the nextcloud folder but it wouldnt show up, i then tried to upload it...that was going to take a year i think. I have been seraching through this thread and read that i needed to install the external storage app which i have and i need to map the folder in the docker, this is where i am getting confused i think...


https://gyazo.com/321449172c01b0dfe44984073a199180

 

i added a new path and named the container path /ellis and then the host path /mnt/user/xbox/OG XBOX DISK CLONE/ and then clicked add, when i go to external storage on nextcloud it says 'No external storage configured or you don't have the permission to configure them'

I know i am just not understanding or typing something correctly, any help or a quicker and easier way to share this file

Link to comment
21 minutes ago, loady said:

i added a new path and named the container path /ellis and then the host path /mnt/user/xbox/OG XBOX DISK CLONE/ and then clicked add, when i go to external storage on nextcloud it says 'No external storage configured or you don't have the permission to configure them'

 

1st using spaces in a share or folders aint the best idea, just as general note

 

then in NC, settings, the buttom checkbox (red arrow) ... there you add your external storage, you sure you click there ?

 

image.thumb.png.fee2fd49afdf760a8dbbef1898e9c9c0.png

Link to comment
12 minutes ago, alturismo said:

 

1st using spaces in a share or folders aint the best idea, just as general note

 

then in NC, settings, the buttom checkbox (red arrow) ... there you add your external storage, you sure you click there ?

 

image.thumb.png.fee2fd49afdf760a8dbbef1898e9c9c0.png

i think i got it...i was using the wrong 'external storage' in nextcloud..when i went to administraion there was another 'external storage' and i added 'local' and typed /data2 and this now shows up...see below..however, space invader ones video doesnt tell you how to get an external link to the files, its using the internal IP...im so close i can taste it.

 

https://gyazo.com/c94cdcc2a249cf434f7bcf0c3ed5dd11

 


https://gyazo.com/2eba215baf065ffb4df9b2fc9934a45e 

Edited by loady
Link to comment

Have setup Nextcloud with MariaDB behind Swag. Used the very good YT tutorials from spaceinvader one. Everything is fine. I can log in, i have activated 2fa with TOTP and it is working.

now I’m curious and wanted to setup the 2FA notification plugin. At first everything seems working. Login with user and password, get notification to my iOS app and can „approve“ but then in the login window which triggered the push notification is not doing anything and the login goes nowhere.

At second sight i noticed that the notification in the app seems to come in from my local gateway address and not from my external IP. So i think there is some problem with my swag setup. But i really don’t know how to fix it.

I thought i was clever enough just using spaceinvaders instructions for the old letsencrypt docker on my swag container. But now it seems that was not the whole story.

 

Link to comment
On 10/18/2021 at 7:48 PM, loady said:

i think i got it...i was using the wrong 'external storage' in nextcloud..when i went to administraion there was another 'external storage' and i added 'local' and typed /data2 and this now shows up...see below..however, space invader ones video doesnt tell you how to get an external link to the files, its using the internal IP...im so close i can taste it.

 

https://gyazo.com/c94cdcc2a249cf434f7bcf0c3ed5dd11

 


https://gyazo.com/2eba215baf065ffb4df9b2fc9934a45e 

 

It looks like your trying to do the same as me. Allow nextxloud to share another path on the unpaid system using the external storage plugin for nextcloud.

 

Did you get this working?

Link to comment
1 hour ago, Greygoose said:

It looks like your trying to do the same as me. Allow nextxloud to share another path on the unpaid system using the external storage plugin for nextcloud.

 

 

its really not so hard ... if its this what you try todo, use unraid shares in NC

 

mount the Share(s) you would like to add inside, sample. all /mnt/user are inside NC now as /mnt/Share

image.thumb.png.d4d0bba11364ee16d1f6ec72287e39fa.png

 

then mount them using the external storage plugin, settings (left side panel at the buttom ...)

image.thumb.png.64906d211ab90fec12fd87726c7314aa.png

 

thats it ...

Link to comment
On 10/21/2021 at 9:17 AM, alturismo said:

 

its really not so hard ... if its this what you try todo, use unraid shares in NC

 

mount the Share(s) you would like to add inside, sample. all /mnt/user are inside NC now as /mnt/Share

image.thumb.png.d4d0bba11364ee16d1f6ec72287e39fa.png

 

then mount them using the external storage plugin, settings (left side panel at the buttom ...)

image.thumb.png.64906d211ab90fec12fd87726c7314aa.png

 

thats it ...

 Thank you,

 

I never realised there was another setting in nextcloud admin panel

 

I now have it working great.

Link to comment

Hi Everyone,

 

I am hoping to find some help here. I have recently just started using unraid and am pretty new to all this so have been relying heavily on online resources and am hoping the community can help.

 

I have setup Ombi and Nextcloud through reverse proxy and cloudflare ddns. Using swag. Ombi is working fine. On a fresh install of NC it works fine for probably 20 minutes or so and I can get in and start customizing and setting up the NC. Now after a certain amount of time, time seems to be the only trigger, NC just stops working. I tried uninstalling and resetting up NC after DROPPING the databases in mariadb. here is the error I am currently getting:

 

errroorororo.png.e6ee372bbb8784e0bbf7813a9d5a7882.png

 

I can't seem to get anything to get it working again.

Here is a copy of the php and nginx error logs in the Nextcloud appdata. Also no errors in the docker logs for any used containers.

 

nginx

2021/10/25 14:14:42 [error] 441#441: *3 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.0.31, server: _, request: "POST /settings/apps/enable HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.0.103:444"

 

php - nothing really looks abnormal here

[25-Oct-2021 15:50:36] NOTICE: fpm is running, pid 395
[25-Oct-2021 15:50:36] NOTICE: ready to handle connections

 

Here is my docker configs

 

Nextcloud

nextcloudonfig.thumb.png.ee901c02025749a8b9905808023e1d5b.png

 

Here is my /nextcloud/www/config/config.php with obvious personal data removed

 

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'ocmgltviw73g',
  'passwordsalt' => 'IDO I need To Censor This?',
  'secret' => 'DO I need To Censor This?',
  'trusted_domains' => 
  array (
    0 => '192.168.0.103:444',
    1 => 'cloud.mydomain.com',
  ),
  'dbtype' => 'mysql',
  'version' => '22.2.0.2',
  'overwrite.cli.url' => 'https://cloud.mydomain.com',
  'overwritehost' => 'cloudmydomain.com',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.0.103:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'MYDBUSER',
  'dbpassword' => 'MYDBPASS',
  'installed' => true,
  'trusted_proxies' => 'swag',
  'has_rebuilt_cache' => true,
  'mail_from_address' => 'NONYA',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'gmail.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'email@gmail.com',
  'mail_smtppassword' => 'NONYA',
);

 

I don't know what else would be helpful. I followed spaceinvader ones older video for letsencrypt to setup the SWAG proxy subdomain config and checked it against the linuxserver wiki for the docker as well. Please help me... please I am begging.... dear god help me.... thanks all in advance!

 

EDIT: On restarting the docker containers I also found this line in the SWAG containers nginx error logs

2021/10/25 16:38:03 [error] 513#513: *124 nextcloud could not be resolved (3: Host not found), client: 172.70.98.169, server: cloud.*, request: "GET / HTTP/2.0", host: "cloud.MYDOMAIN.com"
2021/10/25 16:38:03 [error] 513#513: *124 nextcloud could not be resolved (3: Host not found), client: 172.70.98.169, server: cloud.*, request: "GET / HTTP/2.0", host: "cloud.MYDOMAIN.com"
2021/10/25 16:38:03 [error] 513#513: *125 nextcloud could not be resolved (3: Host not found), client: 172.70.98.123, server: cloud.*, request: "GET /favicon.ico HTTP/2.0", host: "cloud.MYDOMAIN.com", referrer: "https://cloud.MYDOMAIN.com/"
2021/10/25 16:38:03 [error] 513#513: *125 nextcloud could not be resolved (3: Host not found), client: 172.70.98.123, server: cloud.*, request: "GET /favicon.ico HTTP/2.0", host: "cloud.MYDOMAIN.com", referrer: "https://cloud.MYDOMAIN.com/"

 

Edited by kyaustad
New log file
Link to comment
On 10/20/2021 at 3:34 PM, screwbox said:

Have setup Nextcloud with MariaDB behind Swag. Used the very good YT tutorials from spaceinvader one. Everything is fine. I can log in, i have activated 2fa with TOTP and it is working.

now I’m curious and wanted to setup the 2FA notification plugin. At first everything seems working. Login with user and password, get notification to my iOS app and can „approve“ but then in the login window which triggered the push notification is not doing anything and the login goes nowhere.

At second sight i noticed that the notification in the app seems to come in from my local gateway address and not from my external IP. So i think there is some problem with my swag setup. But i really don’t know how to fix it.

I thought i was clever enough just using spaceinvaders instructions for the old letsencrypt docker on my swag container. But now it seems that was not the whole story.

 

 

I am no expert but have you setup app passwords under the section in settings where you enable 2fa totp?

Link to comment

So I’m looking into ways to speed up my Nextcloud container and found redis. I have tried to configure Nextcloud to use it but all attempts have failed and the container won’t start properly. 
Is anyone else using redis with Nextcloud and can give me some advice?

Link to comment
On 10/10/2021 at 10:53 PM, MarekNosek said:

 Hi guys, 

 

I have two nextcloud dockers setup and it all seems to run fine, but once a day the NEXTCLOUD #2 gets the 502 error. 

 

I have the following unraid docker running:


- NginxProxyManager  `autostart wait 0` 
- mariadb  `autostart wait 5` on port 3306
- mariadb2 `autostart wait 20` on port 3307
- nextcloud  `autostart wait 20` on port 444
- nextcloud2  `autostart wait 20` on port 448

 

 

All on bridged network. 
Each nextcloud is directed to via a proxy from Nginx.
Each nextcloud is linked to mariaDB via separate port.


Most of the time all is running fine, but from time to time I encounter the 


Maybe once a day...

 

 

Steps to replicate it:

1. I assumed that it was a problem of dockers starting too fast.
2. I tried to have a wait time before they start. But problem appears again. 
3. When I **stop** mariaDB2 and and NEXTCLOUD2 and restart it after few seconds, it works again. 


Could anyone suggest where to look for problems?

----------------

 

Nextcloud version: `Nextcloud 22.1.1`
Operating system and version : `UNRAID Version: 6.9.2 `
Nginx version:  `v2.9.9 © 2021`

The output of your Nextcloud log in **Admin > Logging**:
This is the only error warning I get since it has worked:
 

 

Which version of nextcloud?

I've come across an issue when upgrading to v21, then upgrading to latest mariadb docker. The fix was to revert Mariadb to an earlier version.  All good again after going to V22.

Link to comment
On 10/19/2021 at 5:12 AM, loady said:

I have followed space invaderones video to set this up and have it working ok, i set this up specifically to share a 2TB disk image, initially i tried moving it with MC to the nextcloud folder but it wouldnt show up, i then tried to upload it...that was going to take a year i think. I have been seraching through this thread and read that i needed to install the external storage app which i have and i need to map the folder in the docker, this is where i am getting confused i think...


https://gyazo.com/321449172c01b0dfe44984073a199180

 

i added a new path and named the container path /ellis and then the host path /mnt/user/xbox/OG XBOX DISK CLONE/ and then clicked add, when i go to external storage on nextcloud it says 'No external storage configured or you don't have the permission to configure them'

I know i am just not understanding or typing something correctly, any help or a quicker and easier way to share this file

Not expert on this but move the data to the nextcloud folder. I assume you have created the users.

You then need to update the database.

Open a shell and put this in..

sudo -u abc php /config/www/nextcloud/occ files:scan --all

Then go to bed and don't hold your breath.

Link to comment
On 9/28/2021 at 5:16 AM, Eddie_B said:

When I try to enter the collabora address into the settings for Collabora Online in Nextcloud, it tells me that it could not establish a connection to the server. Looking at the nextcloud.log file, I found an error referring to the SSL certificate saying that it is a self signed certificate. Seeing as how I have both Nextcloud and Collabora sitting behind SWAG, this error doesn't make much sense to me, but I admit to not being an expert on this.

Anyone got any ideas here?

Need to set up subdomain for collabora eg collabora.mydomain.com as well as cloud.mydomain.com and point them to your server. Then declare them in swag and check the logs for certificate creation.

Run them all under proxynet. Check the config file in swag relating to collabora as well as cloud.Don't forget to rename them as .conf.  Then configure collabora in nextcloud settings. Otherwise no idea.

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.