Jump to content

[Support] Linuxserver.io - Nextcloud


Recommended Posts

Anyone else having the issue of this docker locking up? It locks up and I cant stop, restart, nothing.  It gives Execution Error.  I cant even stop the docker service.  I have to do a hard reset of the whole server.  Its happened a few times now and seems random when it occurs.  Can be anywhere from a day to weeks it works before locking up.

Link to comment
18 hours ago, Kilrah said:

That'll likely be unrelated to this container and more general stability issues with your system.

 

Unlikely, its only this container that ever does it and its been posted by more then just me.  I tired these solutions but they dont seem to work.  This is the newest builds. Older builds used to be fine.

 

 

Edited by RAINMAN
Link to comment
  • 2 weeks later...

Hello!
i can't reach my cloud anymore:

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2006] MySQL server has gone away in /app/www/public/lib/private/DB/Connection.php:163

didn't change a thing :(

please help :o

Link to comment
On 7/21/2024 at 7:15 PM, RAINMAN said:

Unfortunately, its locked up again today so this wasn't the issue.

 

Currently running: 

Linuxserver.io version: 29.0.3-ls330
Build-date: 2024-07-14T17:27:42+00:00

 

NextCloud docker won't stop.

Just as an update, I found my tmp directory was using access mode Read/Write - Slave.  I changed it to Read/Write and haven't had an issue since.  Could be randomly working since then as the time varies but seems positive so far.

 

Honestly, i have no idea what the difference is.  I probably saw somewhere it was recommended and set it at some point.

Link to comment

For posterity: unraid nextcloud database connection details.

 

I had changed some settings a while back, and my changes got lost and nextcloud stopped connecting to the database. I found the database connection details in this file:

/mnt/user/appdata/nextcloud/www/nextcloud/config/config.php

 

 

excerpt below:

 

<?php
$CONFIG = array (
  'datadirectory' => '/data',
  'instanceid' => 'oc0w4lt90dch',
  'passwordsalt' => 'xxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => '192.168.11.2:444',
    1 => 'nextcloud.xxxxxxxxxxx.com',
  ),
  'dbtype' => 'pgsql',
  'version' => '29.0.4.1',
  'overwrite.cli.url' => 'https://nextcloud.xxxxxxxxxxxx.com/',
  'dbname' => 'nextclouddb',
  'dbhost' => '192.168.11.2:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'nextpass',
  'installed' => true,
  'trusted_proxies' => 
  array (
    0 => '192.168.11.2',
  ),

 

Link to comment
On 6/16/2024 at 1:05 PM, yayitazale said:

Hi:

 

I'm facing a issue that I'm not capable to correct. Since v28 I have this error:

 

Your web server does not serve `.mjs` files using the JavaScript MIME type. This will cause problems with some apps, preventing browsers from executing JavaScript files. You must configure your web server to serve `.mjs` files with either the `text/javascript`, or, `application/javascript` MIME type.

 

I have tried a lot of things and I have come to the conclusion that the problem is that the hostname is not being applied correctly to the server.

 

If I launch the "curl -I https://my.nextcloud.domain/apps/settings/js/esm-test.mjs" I get a HTTP/1.1 404 Not Found.

 

If I launch the "curl -I http://localhost/apps/settings/js/esm-test.mjs" from the console of the container I get:

 

HTTP/1.1 301 Moved Permanently
Server: nginx/1.24.0
Date: Sun, 16 Jun 2024 16:58:25 GMT
Content-Type: text/html
Content-Length: 169
Connection: keep-alive
Location: https://_/apps/settings/js/esm-test.mjs

 

So It looks like the hostname of the location is empty. The /etc/hostname of the container shows:

201a27d91820

 

And /etc/hosts:

127.0.0.1       localhost
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.16     201a27d91820

 

My /config/www/nextcloud/config/config.php file has:

'trusted_domains' =>
  array (
    0 => 'my.nextcloud.domain',
    1 => 'localhost',
    2 => '192.168.1.20',
  ),

and also:

'overwritehost' => 'my.nextcloud.domain',
  'overwriteprotocol' => 'https',
  'overwrite.cli.url' => 'my.nextcloud.domain',

 

 

It is behind reverse proxy (nginx proxy manager) witch I have configure like this for 6 years with no issues:

 

imagen.png.269cadc6f65509a4554c318d18e4fa3d.png

 

Where I have added the required locations and mime types:

imagen.thumb.png.2c4bdb2a118dbc6ba62e705e3d72eff1.png

 

What I'm doing wrong?

 

Thanks in advance.

 

Hello, were you able to fix the issue? The fix for me was to add mjs after js in the /etc/nginx/mime.types and restart the docker..

types {

...
    application/javascript                           js mjs;

...

Edited by miini
Link to comment
  • 2 weeks later...
59 minutes ago, dreadu said:

Stumbled upon this here as well: https://help.nextcloud.com/t/warning-after-upgrading-to-28-0-9-or-29-0-5/201289/13

Seems to be fixed in the meantime https://github.com/nextcloud/server/pull/47378

but I guess(?) it's not jet included in the linuxserverio-image

Did you try to perform this repair manually or are you just waiting? I was going to make the one little change but I don't even see the file/can't figure out where the "lib" folder is. - 

 

in folder nextcloud

/lib/private/Repair/RepairMimeTypes.php

 

Did you fix this yourself per chance?

 

Link to comment
On 8/21/2024 at 1:11 PM, blaine07 said:

Did you try to perform this repair manually or are you just waiting? I was going to make the one little change but I don't even see the file/can't figure out where the "lib" folder is. - 

 

in folder nextcloud

/lib/private/Repair/RepairMimeTypes.php

 

Did you fix this yourself per chance?

 

Sorry for the late reply- I was at work for two days and am bock home just now.

 

I tried to run 'occ maintenance:repair --include-expensive' as stated in:

One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command `occ maintenance:repair --include-expensive` to perform the migrations.

I did not resolve the message though. After that, I stumbled upon the above link and (because I was away) did intentionally not mess with any files directly.

 

My resulting question is:

will the php file be adjusted in the next change and I can simply re-run the repair including expensive, or to I have to adjust the php file anyway?

Link to comment

Optimizing Nextcloud Linuxserver.io Docker Performance

I wanted to share my experience with the Nextcloud Linuxserver.io Docker container. After installation two years ago, I tried to optimize various parameters, including Nginx settings for Docker and several other tweaks like max_upload. These initial optimizations made Nextcloud usable, but I felt it wasn't performing to its full potential, especially considering it's installed on a powerful server (128GB RAM, only SSDs [4x U.2 + 3x M.2 NVMe], 10Gbit network, etc.).

Recently, I decided to investigate how to improve speed and responsiveness. I finally found the key parameters for my setup, and now Nextcloud is lightning fast. It's almost unbelievable how quickly it works now - even faster than Windows. I want to share these parameters in case others want to try them out.

Key PHP Parameters for Docker

The most significant improvements came from adjusting the PHP-FPM settings within the Docker container itself:

  • PHP_FPM_PM=dynamic (instead of ondemand)
  • PHP_FPM_MAX_CHILDREN=250 (instead of 50)
  • PHP_FPM_MAX_SERVERS=50
  • PHP_FPM_MIN_SERVERS=30
  • PHP_FPM_START_SERVERS=40
  • PHP_FPM_MAX_REQUEST=750

Additional Optimizations

It's also crucial to optimize other areas:

config.php: Configure Redis server, Memcache, MySQL database, etc.

nginx.conf and php.ini: Ensure these are already optimized for your setup.

Note that the PHP settings mentioned above are for the Docker container itself, not for Nginx.

App Management

Some apps, like occweb, can significantly slow down Nextcloud. I recommend deactivating all apps that you're not actively using.

Conclusion

Nextcloud settings for Unraid are among the most complex of any app, even more so than Unraid itself. However, once properly configured, it performs phenomenally well.

 

After implementing these optimizations, I've seen remarkable improvements in performance:

  • Upload speeds now reach around 600MB/s, fully utilizing my 10Gbit internet connection.
  • The overall responsiveness of the Nextcloud interface has significantly improved, lightning fast after klick everyhting opens within ms (far less than a second)

I hope this information helps. If you already knew these optimizations, that's great. Feel free to share any better settings that could yield even better results!

 

image.thumb.png.f45e9bc9e428b9cd4be4f45e3f29bda2.png

Edited by Herkul
  • Like 1
  • Thanks 1
Link to comment

Thank you. The parameter values we initially used were just a first suggestion from ChatGPT based on my setup, and they weren't guaranteed to be optimal. We agreed to start with these values and increase them if necessary, but in my case, they worked perfectly. Your optimal values may differ depending on your specific setup.

During workloads, I recommend monitoring your memory consumption. If it's not too high, you can try increasing the values further. The default values were surprisingly small, and I'm not sure why they were set so low.

Feel free to experiment and find the best configuration for your system!

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.

×
×
  • Create New...