[Support] Linuxserver.io - Nextcloud


Recommended Posts

so i have nextcloud installed and since i forced update am no longer able to access my files. i now realize that i never installed mariadb or anything to play with nextcloud, just this docker. i am very much a newb and would appreciate any help that could get me back to where i SHOULD be. if i uninstall nextcloud and start from scratch will i lose everything that i currently have in my folders? i have some 15 users with thousands of pics and files in my folders and would hate to lose everything on the account. please let me know what i should do. Thanks.

Link to comment
24 minutes ago, mrtek007 said:

the current container is up to date; i'm using "linuxserver's Repository container" is there something I am missing.

You have not updated the container if it reports that you have version 7.2.

What does it say if you go to settings and under administration go to system and scroll down to PHP.

Link to comment
7 minutes ago, saarg said:

You have not updated the container if it reports that you have version 7.2.

What does it say if you go to settings and under administration go to system and scroll down to PHP.

thanks for the help, I figured it out. In my docker setting I had this "linuxserver/nextcloud:16.0.1-ls22" I changed it to "linuxserver/nextcloud", this updated the container. Again thanks!

 

Link to comment
8 hours ago, kerpster said:

so i have nextcloud installed and since i forced update am no longer able to access my files. i now realize that i never installed mariadb or anything to play with nextcloud, just this docker. i am very much a newb and would appreciate any help that could get me back to where i SHOULD be. if i uninstall nextcloud and start from scratch will i lose everything that i currently have in my folders? i have some 15 users with thousands of pics and files in my folders and would hate to lose everything on the account. please let me know what i should do. Thanks.

Hi,

 

Try adding

  'filesystem_check_changes' => 1,

to config.php, then restart.

 

It makes NC aware of added files outside of the database.

 

Merry Christmas.

Link to comment
On 12/22/2020 at 7:42 PM, skois said:

By running "occ db:add-missing-primary-keys" those missing primary keys could be added manually while the instance keeps running.
Right click on docker and go to console

Sent from my Mi 10 Pro using Tapatalk
 

Hi,

 

THANKS.  

 

I did try that but was getting some sort of "missing' error.  Can't recall exactly.  Will examine it after Chrissy.  

 

THANKYOU again and have a wonderful Christmas 🙂

  • Like 1
Link to comment
8 hours ago, BrunoVic said:

All I did was update my Docker containers only to get stuck with this response:

 

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 have no clue how to recover this. I have no idea where the "server log" is.

 

This morning I am also getting this exact message. Any thoughts on what this is all about and how to go about fixing it?

 

My latest NC is 19.0.6

The Nextcloud.log is HUGE, over 310 MB, and growing all the time! 

Edited by levster
Link to comment
19 minutes ago, BrunoVic said:

Can someone help please. I have a finance document on that server that I need no later than this afternoon.

I just restored my dockers to a few days ago, and the console is back up and running. If you don't have any other option, try restoring it as well until someone can perhaps shine some light on the "proper" fix.

Link to comment
1 minute ago, BrunoVic said:

What do you mean by "other options". I am afraid to do anything with that docker container because I don't want to lose my data.

You data is unaffected, even if you completely remove the NC. You can probably just browse to that folder on your server and retrieve the file that you are looking for manually. So, if you know where your files are stored, such a networked PC, and you have access to it, just browse and find the folder/file to download manually.

Link to comment
1 minute ago, BrunoVic said:

How do I restore? Will I lose my logon creds? How do I restore the logon credentials like it was before?

Sorry, I was assuming that you have backup/restore plugin. Do you? If yes, and you have been regularly backing up the dockers... you will have the option to "go back" or restore to an earlier version of the apps/dockers. I am not a techie and my explanation is I am sure lacking. Look under Setting/User Utilities tab to see if you have Backup/Restore Appdata option. If you do not, then I am at loss of what to do next. If you do, restoring will not affect your credentialing.

Link to comment
1 minute ago, BrunoVic said:

No I am not familiar with that plugin.

I think that there are a LOT smarter people here who can guide you. however, because of the holidays, their response may be a bit delayed. 

 

In the meantime, try to find the file that you are looking for manually on your server. Your data should not be affected by the troubles with NC docker.

Link to comment

Evening All 

 

Have a question I am not sure on the answer - I have nextcloud running, but on the overview page it tells me I am not using the most current version. I am on 17.0.7 and the latest is 17.0.10

 

Is this due to whoever keeps the docker image up to date? I have told the docker to check for updates and it cant find any. Is it just a case of me waiting for someone to update it? 

I am using linuxserver/nextcloud repo. 

 

Many Thanks 

 

Link to comment

Hi everyone.

 

I'm running linuxserver docker of nextcloud ver. 20 with NginxProxyManager and I have couple of issues. Since I've seen that some of you also use NginxProxyManager I hope someone can help or at least point me at the right direction. So the problems are:
1. I'm currently able to only access my nextcloud from domain address. http://localip:port gives error 400 which is kind of expected. But when going https://localip:port I'm automatically forwarded to my domain address. I'd like to access nextcloud also locally to benefit from LAN speed.
2. Uploading big files from browser and getting "Error when assembling chunks, status code 504". The files are actually getting uploaded, but error is still displayed. Not sure if this is because limits have been removed with NC 20 (file upload limit is not displayed in UI settings > basic settings) or my client_max_body_size is 0 in nextcloud/site-confs/default and nextcloud/nginx/nginx.conf. If I understood correctly the error 504 about chunks is because of a NC timeout limits, but I don't know where should i change these limits. I've seen people change timeout limits in php.ini files and nginx/apache files, but since I don't have them or their setup is totally different I'm not sure where and what should I change to avoid this error.

 

Config.php:

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'instanceid',
  'passwordsalt' => '29t+passwordsalt',
  'secret' => 'secret',
  'trusted_domains' => 
  array (
    0 => '192.168.1.177:444',
    1 => 'nextcloud.my.server',
  ),
  'trusted_proxies' => 
  array (
    0 => 'NginxProxyManager',
  ),
  'dbtype' => 'mysql',
  'version' => '20.0.3.2',
  'forwarded_for_headers' => array('HTTP_X_FORWARDED_FOR'),
  'overwrite.cli.url' => 'https://192.168.1.177:444',
  'overwritehost' => 'nextcloud.my.server',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.177:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'dbuser',
  'dbpassword' => 'dbpassword',
  'installed' => true,
  'filesystem_check_changes' => 1,
  'updater.secret' => 'updater.secret',
);

NginxProxyManager/nginx/proxy_host/nextcloud.conf
 

# ------------------------------------------------------------
# nextcloud.my.server
# ------------------------------------------------------------


server {
  set $forward_scheme https;
  set $server         "192.168.1.177";
  set $port           444;

  listen 8080;
listen [::]:8080;

listen 4443 ssl http2;
listen [::]:4443;


  server_name nextcloud.my.server;


  # Let's Encrypt SSL
  include conf.d/include/letsencrypt-acme-challenge.conf;
  include conf.d/include/ssl-ciphers.conf;
  ssl_certificate /etc/letsencrypt/live/npm-5/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/npm-5/privkey.pem;






  # Block Exploits
  include conf.d/include/block-exploits.conf;






  access_log /config/log/proxy_host-5.log proxy;







  location / {

    


    # Force SSL
    include conf.d/include/force-ssl.conf;







    

    # Proxy!
    include conf.d/include/proxy.conf;
  }


  # Custom
  include /data/nginx/custom/server_proxy[.]conf;
}

 

If anyone has any ideas or need me to post any more conf files, I would appreciate very much.

Link to comment
6 hours ago, servererror said:

Hi everyone.

 

I'm running linuxserver docker of nextcloud ver. 20 with NginxProxyManager and I have couple of issues. Since I've seen that some of you also use NginxProxyManager I hope someone can help or at least point me at the right direction. So the problems are:
1. I'm currently able to only access my nextcloud from domain address. http://localip:port gives error 400 which is kind of expected. But when going https://localip:port I'm automatically forwarded to my domain address. I'd like to access nextcloud also locally to benefit from LAN speed.
2. Uploading big files from browser and getting "Error when assembling chunks, status code 504". The files are actually getting uploaded, but error is still displayed. Not sure if this is because limits have been removed with NC 20 (file upload limit is not displayed in UI settings > basic settings) or my client_max_body_size is 0 in nextcloud/site-confs/default and nextcloud/nginx/nginx.conf. If I understood correctly the error 504 about chunks is because of a NC timeout limits, but I don't know where should i change these limits. I've seen people change timeout limits in php.ini files and nginx/apache files, but since I don't have them or their setup is totally different I'm not sure where and what should I change to avoid this error.

 

Config.php:


<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'instanceid',
  'passwordsalt' => '29t+passwordsalt',
  'secret' => 'secret',
  'trusted_domains' => 
  array (
    0 => '192.168.1.177:444',
    1 => 'nextcloud.my.server',
  ),
  'trusted_proxies' => 
  array (
    0 => 'NginxProxyManager',
  ),
  'dbtype' => 'mysql',
  'version' => '20.0.3.2',
  'forwarded_for_headers' => array('HTTP_X_FORWARDED_FOR'),
  'overwrite.cli.url' => 'https://192.168.1.177:444',
  'overwritehost' => 'nextcloud.my.server',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.177:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'dbuser',
  'dbpassword' => 'dbpassword',
  'installed' => true,
  'filesystem_check_changes' => 1,
  'updater.secret' => 'updater.secret',
);

NginxProxyManager/nginx/proxy_host/nextcloud.conf
 


# ------------------------------------------------------------
# nextcloud.my.server
# ------------------------------------------------------------


server {
  set $forward_scheme https;
  set $server         "192.168.1.177";
  set $port           444;

  listen 8080;
listen [::]:8080;

listen 4443 ssl http2;
listen [::]:4443;


  server_name nextcloud.my.server;


  # Let's Encrypt SSL
  include conf.d/include/letsencrypt-acme-challenge.conf;
  include conf.d/include/ssl-ciphers.conf;
  ssl_certificate /etc/letsencrypt/live/npm-5/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/npm-5/privkey.pem;






  # Block Exploits
  include conf.d/include/block-exploits.conf;






  access_log /config/log/proxy_host-5.log proxy;







  location / {

    


    # Force SSL
    include conf.d/include/force-ssl.conf;







    

    # Proxy!
    include conf.d/include/proxy.conf;
  }


  # Custom
  include /data/nginx/custom/server_proxy[.]conf;
}

 

If anyone has any ideas or need me to post any more conf files, I would appreciate very much.

About the assembling chunks problem, i found a fix.

Go to NginxProxyManager edit your nextcloud proxy host, Go to advanced tab.

Now copy the location block from your nextcloud.conf and add the following lines:

(Set the times to your liking. I was doing some testing and had this big times. Also depends on your net speed. From my testing the time you need is time_to_upload + time_to_assemble_the_chunks, so on big uploads that needs eg. 1hour to upload you need like 1hour and 5 minutes timeout).

proxy_connect_timeout 1d;
proxy_send_timeout 1d;
proxy_read_timeout 1d;
send_timeout 1d;

 

The pasted conf on your advanced tab should be like this:

location / {

    proxy_connect_timeout 1d;
proxy_send_timeout 1d;
proxy_read_timeout 1d;
send_timeout 1d;
    


    # Force SSL
    include conf.d/include/force-ssl.conf;







    

    # Proxy!
    include conf.d/include/proxy.conf;
  }


  # Custom
  include /data/nginx/custom/server_proxy[.]conf;
}


 

Link to comment

 

only issues I'm having with NC is this error code.

 

Client error: `GET https://documentserver.MYDOMAIN.COM /healthcheck` resulted in a `400 Bad Request` response: <html> <head><title>400 Bad Request</title></head> <body> <center><h1>400 Bad Request</h1></center> <hr><center>ngin (truncated...)

 

can someone translate this to English for me please and thank you.

-onlyoffice for some reason stopped working. I suspect im in need of an updated onlyoffice.subdomain.conf file to work with swag (could be wrong), but everything else working normal (A+). here is my current onlyoffice.subdomain.conf file was working before swag migration. 

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

# only office doc server


server {
    listen 443 ssl;

    server_name documentserver.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;


    location / {
                include /config/nginx/proxy.conf;
                resolver 127.0.0.11 valid=30s;
                set $upstream_docs OnlyOfficeDocumentServer;
                proxy_pass https://$upstream_docs:443;
                proxy_redirect off;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $server_name;
                proxy_set_header X-Forwarded-Proto $scheme;
        }
}

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

 

 

Edited by Tolete
Link to comment

I have some log entries in nginx error log that look like this

 

2020/12/29 20:38:38 [error] 375#375: *405 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 172.17.0.1, server: _, request: "GET /wp-login.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "MYDOMAIN", referrer: "http://mta-sts.MYDOMAIN/wp-login.php"

is this normal?

Link to comment
7 minutes ago, andreidelait said:

I have some log entries in nginx error log that look like this

 


2020/12/29 20:38:38 [error] 375#375: *405 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 172.17.0.1, server: _, request: "GET /wp-login.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "MYDOMAIN", referrer: "http://mta-sts.MYDOMAIN/wp-login.php"

is this normal?

That also looks like my log unfortunately ... guess in the future I will not rush into an update :)

Link to comment
On 12/28/2020 at 4:04 PM, BrunoVic said:

Hello can someone help PLEASE!!!!!

Can you please post an update on what steps you have done, what state is the installation now, with error logs or anything you can gather, also pics of the docker template. 
I'll help as much as i know and can!

Link to comment

Fortunately for me I was stupid enough to leave my mysql-nextcloud docker offline and that was causing my server error but ... in the logs there was no hint whatsoever that this was the case ... now I have a different problem regarding swag and dynamic dns updating for namecheap (works for 15-30 minutes then my ip changes and it doesn't work from web but from inside my lan works well :) )

 

I'll bang my head against the scripts some more ... 

Edited by alexandru360
Link to comment
2 hours ago, BrunoVic said:

All I did was upgrade the docker image and it stopped working with the error I mentioned earlier. I also mentioned that I have no idea where the logs are to give to you.

 

Error:

 

Screen Shot 2020-12-30 at 1.20.59 PM.png

Screen Shot 2020-12-30 at 1.21.12 PM.png

Ok, please also post the docker template(1) of swag or letsencrypt (the one you use),

while you are on dashboard of unraid click on both nextcloud and swag/letsencrypt dockers and choose logs(2). post both logs.
Also post the config file(3) of nextcloud (located on appdata/nextcloud/www/nextcloud/config/config.php

and last post the nginx proxy conf(4) (should be in appdata/swag/nginx/proxy-confs/nextcloud.subdomain.conf (change letsencrypt with swag if you use letsencrypt).

PLEASE BEFORE POSTING THOSE FILES, hide any sensitive info like domain, passwords, secrets, hashes, instanceid's, etc
So in total i asked for 4 logs/confs :) 

Link to comment
On 12/22/2020 at 6:30 PM, Joc said:

EDITED BIT:  I ended up restoring from [Plugin] CA Appdata Backup / Restore .... Mess around with v20.0.4 after Christmas.

 

Hi,

 

This is doing my head in... What have I done??... And how do I fix??  😕

 

Fix is prolly sooo easy, I just can't see it ATM.

 

I upgraded to 20.0.4 from settings/overview page.

 

Security & setup warnings. 

 

There are some warnings regarding your setup.

The database is missing some primary keys. Due to the fact that adding primary keys on big tables could take some time they were not added automatically. By running "occ db:add-missing-primary-keys" those missing primary keys could be added manually while the instance keeps running.

Missing primary key on table "oc_federated_reshares".

Missing primary key on table "oc_systemtag_object_mapping".

Missing primary key on table "oc_comments_read_markers".

Missing primary key on table "oc_collres_resources".

Missing primary key on table "oc_collres_accesscache".

Missing primary key on table "oc_filecache_extended".

On 12/24/2020 at 1:50 PM, Joc said:

Hi,

 

THANKS.  

 

I did try that but was getting some sort of "missing' error.  Can't recall exactly.  Will examine it after Chrissy.  

 

THANKYOU again and have a wonderful Christmas 🙂

Future note to self 🙂  and hopefully others can learn or fix any similar NextCloud upgrade issue/s I had.   

 

LinuxServer do a great job – thankyou!  Though this is a NC issue or my missing something, or doing something incorrectly during upgrade, or just one of those things that happens.

 

I’ve never had so many problems upgrading a NC version, logs weren’t giving me much help.  I was getting corrupt database errors, upgrades (following all 3 install types on p-1 of this thread) wouldn’t take, etc.  I’d install previous backups using the CA Backup/Restore app and work forward from there.  

 

Even after reinstalling older NC and MariaDB versions from backups, NC was telling me it’s already on 20.0.4, though it was on 19.0.3 and just wouldn’t let me upgrade whatsoever.  I inspected or purged the the NC updater folders, etc.  NC just wouldn’t budge and kept giving me I’m already updated and occ command errors.

 

In the end, I kept all config files, backed up my NC files/folders, completely purged MariaDB and NC, then reinstalled them from scratch, made new databases, etc.

 

After a fresh install, I then upgraded to 20.0.4, then I ran the below OCC commands, then I manually added files/folders and everything works great now without any errors 🙂 

 

# in a NC docker terminal window:-

sudo -u abc php /config/www/nextcloud/occ db:add-missing-indices

 

sudo -u abc php /config/www/nextcloud/occ db:add-missing-primary-keys

 

sudo -u abc php /config/www/nextcloud/occ db:convert-filecache-bigint

 

# ADD files/folders for my NextCloud UserName to the MariaDB database:-

# # IF in NC docker terminal/console window:

sudo -u abc php /config/www/nextcloud/occ files:scan UserName  <-- Change UserName to username used in NextCloud

# # IF in an unRAID terminal window:-

docker exec -it nextcloud sudo -u abc /config/www/nextcloud/occ files:scan UN  <-- UN = username used in NextCloud

 

** or:- sudo -u abc php /config/www/nextcloud/occ files:scan all to detect all new and changed files and folders.

 

# # Or setup as a User Script to automate file:scan to run periodically/daily/weekly, etc:-

#!/bin/bash

echo "<font color='red'><b>Adding unrecognised files to NextCloud user database</b></font>"

docker exec -it nextcloud sudo -u abc /config/www/nextcloud/occ files:scan UN  <-- UN = associated username in NextCloud

echo ""

echo "<font color='red'>Done!!</b></font>"

 

Though the safest way is to upload files/folders through webdav.  I personally use ‘ocsmount Pro’ webdav on Mac to do this and not use the NextCloud app at all.

 

# May also add this line in NC config.php - Just in case you forget to run 'file:scan' function.  this makes files immediately visible when added from outside a NC environment;  Eg; Using samba share in Finder or Windows Explorer to connect directly to NextCloud files. 

 

# # Add following line towards the end of NC config.php.

   'filesystem_check_changes' => 1,

 

Then Docker restart nextcloud

 

Then I ran a fresh instance appdata backup ;-)

 

I hope this helps someone 🙂 

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.