[Support] Linuxserver.io - Nextcloud


Recommended Posts

Just had a notice that there was a new version of Nextcloud v 18.0.4.  Successfully upgraded utilising the Nextcloud web gui updater.

 

Had one hitch that I thought I would share. The upgrade steps check that the right files are in the appropriate dir before upgrading and won't proceed if there are unexpected files found. Fine for most right?

 

OSX: Hold my beer!!

 

As I had previously browsed those folders, you guessed it, .DS_Store files were present and this stopped the updater from proceeding. In fact the exact error was:

 

"Check for expected files // The following extra files have been found // .DS_Store"

 

You cant set Nextcloud to ignore these files so i had to manually get rid of them. Didn't want to mess around with finder and turning on show hidden files, so did this:

 

root@unraid:~# cd /mnt/user/appdata/nextcloud/
root@unraid:/mnt/user/appdata/nextcloud# find -name ".DS*"
./www/.DS_Store
root@unraid:/mnt/user/appdata/nextcloud# cd www/
root@unraid:/mnt/user/appdata/nextcloud/www# rm .DS_Store 
root@unraid:/mnt/user/appdata/nextcloud/www# 

I was able to click try again in the Nextcloud updater web gui and now he file had gone, it proceeded on and completed without an issue.

 

  • Thanks 1
Link to comment
20 hours ago, saarg said:

It's there. Click here (in the first post).

For upgrading the Nextcloud version, please see this guide here. 

This is the first post bellow, I understand that you want me to read and find it by my self, but i am telling you i can't find OCC code to scan and what ever i found didn't work for me. could you just give me the code, or if you want me to find it then at list give me the right link to read. thanks for the replies

 

linuxserver_medium.png

 

Application Name: Nextcloud

Application Site: https://nextcloud.com/

Docker Hub: https://hub.docker.com/r/linuxserver/nextcloud/

Github: https://github.com/linuxserver/docker-nextcloud

 

Note: Requires MariaDB or MySQL, please note the issues with binlogging detailed here.  This is a Nextcloud issue which we have no control over.

 

For setup guide please see the article on our website here.

 

For upgrading the Nextcloud version, please see this guide here.  Alternatively, you can update via the Nextcloud webui.

 

Please post any questions/issues relating to this docker you have in this thread.

 

If you are not using Unraid (and you should be!) then please do not post here, instead head to linuxserver.io to see how to get support.

Link to comment
3 hours ago, ssinseeme said:

This is the first post bellow, I understand that you want me to read and find it by my self, but i am telling you i can't find OCC code to scan and what ever i found didn't work for me. could you just give me the code, or if you want me to find it then at list give me the right link to read. thanks for the replies

 

linuxserver_medium.png

 

Application Name: Nextcloud

Application Site: https://nextcloud.com/

Docker Hub: https://hub.docker.com/r/linuxserver/nextcloud/

Github: https://github.com/linuxserver/docker-nextcloud

 

Note: Requires MariaDB or MySQL, please note the issues with binlogging detailed here.  This is a Nextcloud issue which we have no control over.

 

For setup guide please see the article on our website here.

 

For upgrading the Nextcloud version, please see this guide here.  Alternatively, you can update via the Nextcloud webui.

 

Please post any questions/issues relating to this docker you have in this thread.

 

If you are not using Unraid (and you should be!) then please do not post here, instead head to linuxserver.io to see how to get support.

I even quoted you the text from the first post and where to click in that text to get to the post describing the command to update.

Link to comment
10 minutes ago, saarg said:

I even quoted you the text from the first post and where to click in that text to get to the post describing the command to update.

I am sorry but there was not a quote " " and where to click is not hyperlink this is what you wrote

"

It's there. Click here (in the first post).

For upgrading the Nextcloud version, please see this guide here."

 

Link to comment
3 minutes ago, ssinseeme said:

I am sorry but there was not a quote " " and where to click is not hyperlink this is what you wrote

"

It's there. Click here (in the first post).

For upgrading the Nextcloud version, please see this guide here."

 

It is on the first post. here is the command. 
 

sudo -u abc php7 /config/www/nextcloud/occ scan --all

Link to comment
25 minutes ago, Tucubanito07 said:

It is on the first post. here is the command. 
 

sudo -u abc php7 /config/www/nextcloud/occ scan --all

Finally!  thank you very much man, was very helpful.

it was actually 

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

i hope this will be useful for newbies like me.

the mysterious first post!  had too many links.

Link to comment
5 minutes ago, ssinseeme said:

Finally!  thank you very much man, was very helpful.

it was actually 


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

i hope this will be useful for newbies like me.

the mysterious first post!  had too many links.

Oops. I forgot that. Trying to help you out on my phone. I am glad you got it to work. 

  • Like 1
Link to comment

I think I am starting to lose my mind trying to make NextCloud work, just as a local service at this stage, without reverse proxy etc.

 

I have followed both the installation guide at the beginning of this thread, and SpaceInvaderOne's guide to the letter, multiple times now over the last day.

 

MariaDB installs ok, I am able to create the databases required.

When I get to the WebUI setup for NextCloud, I am always brought to a halt by "504 Gateway TimeOut"

 

Checking the NextCloud error log I see "2020/04/29 11:35:41 [error] 358#358: *4 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.1.101, server: _, request: "POST /index.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.69:4445"

 

If I try again, I get an error that "user already exists" but I can't seem to be able to get past the installation webui.

 

I see that this question has been asked previously in this thread, but there was no response to it.  I also see a couple of reddit posts specifically asking the same question in relation to unraid and nextcloud, but with no solutions either.

 

Any help or suggestions would be most appreciated please.

 

 

Link to comment

I have a quick question. I have successfully setup letsencrypt, received my cert, setup nextcloud and can go to my domain/subdomain, however it always returns the index.html page contents in the browser that are found in the letsencrypt www folder. It's like it isn't using the let's encrypt proxy-conf file that I've configured: nextcloud.subdomain.conf

 

Please help me with what I'm missing here. I know it has to be something very simple. This is my nextcloud config.php file I have changed some of the values to keep them private, but you should get the gist.

 

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'instanceid',
  'passwordsalt' => 'passalt',
  'secret' => 'mysecret key',
  'trusted_domains' => 
  array (
    0 => 'nextcloud ip:port',
    1 => 'mysub.duckdns.org',
  ),
  'dbtype' => 'mysql',
  'version' => '18.0.4.2',
  'dbname' => 'dbname',
  'dbhost' => 'mariadb ip:port',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'dbuser',
  'dbpassword' => 'mypass',
  'installed' => true,

  'trusted_proxies' => 'letsencrypt',
  'overwrite.cli.url' => 'https://mysub.duckdns.org',
  'overwritehost' => 'mysub.duckdns.org',
  'overwriteprotocol' => 'https',
);

 

Here is my nextcloud.subdomain.conf again, i changed some of the values to keep privacy. Since I have redirected port 443 to a port 8054, should I change the listening port in the below file?

 

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name subdomain.*;

    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_app nextcloud;
        set $upstream_port 444;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
        proxy_max_temp_file_size 2048m;
    }
}

 

I appreciate any assistance. These were really the only two files I edited, so if there is something else that needs changed, please shout out and I'll take a look.

 

EDIT: I found in the readme:

### Configure your default site config

Make sure that your default site config contains the following lines in the appropriate spots as seen in the default version:

1) For subfolder methods: `include /config/nginx/proxy-confs/*.subfolder.conf;`
2) For subdomain methods: `include /config/nginx/proxy-confs/*.subdomain.conf;`

 

Are they talking about adding that in to the default site conf of nextcloud or in letsencrypt? I see that letsencrypt already has them included. I would imagine this could be my issue.

Edited by live4soccer7
Additional Details
Link to comment

Hi,

 

I have just built myself a new server and need to move the nextcloud docker to it, I have tried copying the appdata and user shares but they do not display, I cannot find a guide other than for a VM, can anyone help me out please?

 

Thank you 🙂

Link to comment
1 hour ago, mbc0 said:

Hi,

 

I have just built myself a new server and need to move the nextcloud docker to it, I have tried copying the appdata and user shares but they do not display, I cannot find a guide other than for a VM, can anyone help me out please?

 

Thank you 🙂

When you place it on the new Nextcloud, just run this command and it will update Nextcloud. 
 

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

Link to comment
36 minutes ago, Tucubanito07 said:

When you place it on the new Nextcloud, just run this command and it will update Nextcloud. 
 

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

ah, fantastic, so I copy all appdata then the user shares then run that command? 🙂

Link to comment
9 minutes ago, mbc0 said:

ah, fantastic, so I copy all appdata then the user shares then run that command? 🙂

I don’t know about the appdata. What I did was a fresh new install of Nextcloud and then I copied the users data from my back up to the new Nextcloud container and ran the scan all command and all of the user data showed up. Also, I would create the users first on the new Nextcloud and then copy over the old data to new Nextcloud. 

Link to comment
49 minutes ago, Tucubanito07 said:

I don’t know about the appdata. What I did was a fresh new install of Nextcloud and then I copied the users data from my back up to the new Nextcloud container and ran the scan all command and all of the user data showed up. Also, I would create the users first on the new Nextcloud and then copy over the old data to new Nextcloud. 

ok, thank you for that, I was hoping if I did appdata and userdata it would magically be all done 🙂 I can only try and see what happens!

Link to comment

I'm pretty sure my issue is a setting in let's encrypt that is not passing along the necessary place to look to serve the files for nextcloud since it is serving the default let's encrypt index.html file. I have attempted to setup sonarr as well and it resulted in the same response.

 

I have noticed that in the Let's Encrypt Subdomain conf files are different than what is in spaceinvader's videos and even what people have posted in this thread. It must be an update to the let's encrypt container that's fairly new??? You can see the upstream in most people's files goes at follows:

 

$set upstream_nextcloud nextcloud;

 

You can see how my default nextcloud.subdomain.conf file looks.

 

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name subdomain.*;

    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_app nextcloud;
        set $upstream_port 444;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
        proxy_max_temp_file_size 2048m;
    }
}

 

Edit: I have confirmed that I indeed have both the nextcloud and letsencrypt LSIO versions installed. hmm...... any ideas? I'm still convinced that the nextcloud.subdomain.conf still isn't being utilized by let's encrypt or I would at least get an error and not the default index.html page when visiting the subdomain via the web.

 

That leads me to believe it must be something in the default site-conf for let's encrypt.

 

## Version 2020/03/05 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/default

# redirect all traffic to https
server {
	listen 80 default_server;
	listen [::]:80 default_server;
	server_name _;
	return 301 https://$host$request_uri;
}

# main server block
server {
	listen 443 ssl http2 default_server;
	listen [::]:443 ssl http2 default_server;

	root /config/www;
	index index.html index.htm index.php;

	server_name _;

	# enable subfolder method reverse proxy confs
	include /config/nginx/proxy-confs/*.subfolder.conf;

	# enable subdomain method reverse proxy confs
	#include /config/nginx/proxy-confs/*.subdomain.conf;

	# all ssl related config moved to ssl.conf
	include /config/nginx/ssl.conf;

	# enable for ldap auth
	#include /config/nginx/ldap.conf;

	client_max_body_size 0;

	location / {
		try_files $uri $uri/ /index.html /index.php?$args =404;
	}

	location ~ \.php$ {
		fastcgi_split_path_info ^(.+\.php)(/.+)$;
		fastcgi_pass 127.0.0.1:9000;
		fastcgi_index index.php;
		include /etc/nginx/fastcgi_params;
	}

# sample reverse proxy config for password protected couchpotato running at IP 192.168.1.50 port 5050 with base url "cp"
# notice this is within the same server block as the base
# don't forget to generate the .htpasswd file as described on docker hub
#	location ^~ /cp {
#		auth_basic "Restricted";
#		auth_basic_user_file /config/nginx/.htpasswd;
#		include /config/nginx/proxy.conf;
#		proxy_pass http://192.168.1.50:5050/cp;
#	}

}

# sample reverse proxy config without url base, but as a subdomain "cp", ip and port same as above
# notice this is a new server block, you need a new server block for each subdomain
#server {
#	listen 443 ssl http2;
#	listen [::]:443 ssl http2;
#
#	root /config/www;
#	index index.html index.htm index.php;
#
#	server_name cp.*;
#
#	include /config/nginx/ssl.conf;
#
#	client_max_body_size 0;
#
#	location / {
#		auth_basic "Restricted";
#		auth_basic_user_file /config/nginx/.htpasswd;
#		include /config/nginx/proxy.conf;
#		proxy_pass http://192.168.1.50:5050;
#	}
#}

# sample reverse proxy config for "heimdall" via subdomain, with ldap authentication
# ldap-auth container has to be running and the /config/nginx/ldap.conf file should be filled with ldap info
# notice this is a new server block, you need a new server block for each subdomain
#server {
#	listen 443 ssl http2;
#	listen [::]:443 ssl http2;
#
#	root /config/www;
#	index index.html index.htm index.php;
#
#	server_name heimdall.*;
#
#	include /config/nginx/ssl.conf;
#
#	include /config/nginx/ldap.conf;
#
#	client_max_body_size 0;
#
#	location / {
#		# the next two lines will enable ldap auth along with the included ldap.conf in the server block
#		auth_request /auth;
#		error_page 401 =200 /login;
#
#		include /config/nginx/proxy.conf;
#		resolver 127.0.0.11 valid=30s;
#		set $upstream_app heimdall;
#		set $upstream_port 443;
#		set $upstream_proto https;
#		proxy_pass $upstream_proto://$upstream_app:$upstream_port;
#	}
#}

# enable subdomain method reverse proxy confs
include /config/nginx/proxy-confs/*.subdomain.conf;
# enable proxy cache for auth
proxy_cache_path cache/ keys_zone=auth_cache:10m;

 

Edited by live4soccer7
Link to comment

Hi everyone, quick question about my nextcloud speed.

 

I setup nextcloud with nginxproxymanager(DNS cloudflare) and the external device plugin which connects to one of my shares. Everything is working great, except that when I download the files externally, I get a max download speed of 2mbps. My internet connection is 300mbps and would like help trying to figure out where my bottleneck is. 

 

I have downloaded the speedtest docker, and through the proxy I am getting 16mbps. Locally with the speedtest docker I am breaking 250+mbps.

 

What speeds are other users getting?

 

Thanks,

 

Owen

Edited by ozone31912
Link to comment
33 minutes ago, mbc0 said:

ok, thank you for that, I was hoping if I did appdata and userdata it would magically be all done 🙂 I can only try and see what happens!

The folder that Nextcloud creates was different for me, so I created the same user on the Nextcloud and just transfer the data from the old one. It worked like a charm for me. 

Link to comment
35 minutes ago, live4soccer7 said:

I'm pretty sure my issue is a setting in let's encrypt that is not passing along the necessary place to look to serve the files for nextcloud since it is serving the default let's encrypt index.html file. I have attempted to setup sonarr as well and it resulted in the same response.

 

I have noticed that in the Let's Encrypt Subdomain conf files are different than what is in spaceinvader's videos and even what people have posted in this thread. It must be an update to the let's encrypt container that's fairly new??? You can see the upstream in most people's files goes at follows:

 

$set upstream_nextcloud nextcloud;

 

You can see how my default nextcloud.subdomain.conf file looks.

 


server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name subdomain.*;

    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_app nextcloud;
        set $upstream_port 444;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
        proxy_max_temp_file_size 2048m;
    }
}

 

Edit: I have confirmed that I indeed have both the nextcloud and letsencrypt LSIO versions installed. hmm...... any ideas? I'm still convinced that the nextcloud.subdomain.conf still isn't being utilized by let's encrypt or I would at least get an error and not the default index.html page when visiting the subdomain via the web.

 

That leads me to believe it must be something in the default site-conf for let's encrypt.

 


## Version 2020/03/05 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/default

# redirect all traffic to https
server {
	listen 80 default_server;
	listen [::]:80 default_server;
	server_name _;
	return 301 https://$host$request_uri;
}

# main server block
server {
	listen 443 ssl http2 default_server;
	listen [::]:443 ssl http2 default_server;

	root /config/www;
	index index.html index.htm index.php;

	server_name _;

	# enable subfolder method reverse proxy confs
	include /config/nginx/proxy-confs/*.subfolder.conf;

	# enable subdomain method reverse proxy confs
	#include /config/nginx/proxy-confs/*.subdomain.conf;

	# all ssl related config moved to ssl.conf
	include /config/nginx/ssl.conf;

	# enable for ldap auth
	#include /config/nginx/ldap.conf;

	client_max_body_size 0;

	location / {
		try_files $uri $uri/ /index.html /index.php?$args =404;
	}

	location ~ \.php$ {
		fastcgi_split_path_info ^(.+\.php)(/.+)$;
		fastcgi_pass 127.0.0.1:9000;
		fastcgi_index index.php;
		include /etc/nginx/fastcgi_params;
	}

# sample reverse proxy config for password protected couchpotato running at IP 192.168.1.50 port 5050 with base url "cp"
# notice this is within the same server block as the base
# don't forget to generate the .htpasswd file as described on docker hub
#	location ^~ /cp {
#		auth_basic "Restricted";
#		auth_basic_user_file /config/nginx/.htpasswd;
#		include /config/nginx/proxy.conf;
#		proxy_pass http://192.168.1.50:5050/cp;
#	}

}

# sample reverse proxy config without url base, but as a subdomain "cp", ip and port same as above
# notice this is a new server block, you need a new server block for each subdomain
#server {
#	listen 443 ssl http2;
#	listen [::]:443 ssl http2;
#
#	root /config/www;
#	index index.html index.htm index.php;
#
#	server_name cp.*;
#
#	include /config/nginx/ssl.conf;
#
#	client_max_body_size 0;
#
#	location / {
#		auth_basic "Restricted";
#		auth_basic_user_file /config/nginx/.htpasswd;
#		include /config/nginx/proxy.conf;
#		proxy_pass http://192.168.1.50:5050;
#	}
#}

# sample reverse proxy config for "heimdall" via subdomain, with ldap authentication
# ldap-auth container has to be running and the /config/nginx/ldap.conf file should be filled with ldap info
# notice this is a new server block, you need a new server block for each subdomain
#server {
#	listen 443 ssl http2;
#	listen [::]:443 ssl http2;
#
#	root /config/www;
#	index index.html index.htm index.php;
#
#	server_name heimdall.*;
#
#	include /config/nginx/ssl.conf;
#
#	include /config/nginx/ldap.conf;
#
#	client_max_body_size 0;
#
#	location / {
#		# the next two lines will enable ldap auth along with the included ldap.conf in the server block
#		auth_request /auth;
#		error_page 401 =200 /login;
#
#		include /config/nginx/proxy.conf;
#		resolver 127.0.0.11 valid=30s;
#		set $upstream_app heimdall;
#		set $upstream_port 443;
#		set $upstream_proto https;
#		proxy_pass $upstream_proto://$upstream_app:$upstream_port;
#	}
#}

# enable subdomain method reverse proxy confs
include /config/nginx/proxy-confs/*.subdomain.conf;
# enable proxy cache for auth
proxy_cache_path cache/ keys_zone=auth_cache:10m;

 

When you go to the website for Letsencrypt, where does it take you? Screenshot please. 

Link to comment
5 minutes ago, live4soccer7 said:

 

You can see the screenshot here. It is the same when I go to the letsencrytp UI from the docker page and when I visit the subdomain I have setup from outside the network.

 

 

letsencrypt screenshot.png

Ok so the letsencrypt is setup correctly. Send me a screenshot of the Nextcloud.subdomain.conf please. Also the config for config.php. 

Link to comment
5 minutes ago, Tucubanito07 said:

Ok so the letsencrypt is setup correctly. Send me a screenshot of the Nextcloud.subdomain.conf please. Also the config for config.php. 

Here is the nextcloud.subdomain.conf (I have removed the .sample)

 

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name subdomain.*;

    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_app nextcloud;
        set $upstream_port 444;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
        proxy_max_temp_file_size 2048m;
    }
}

 

Link to comment
1 minute ago, live4soccer7 said:

Here is the nextcloud.subdomain.conf (I have removed the .sample)

 


server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name subdomain.*;

    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_app nextcloud;
        set $upstream_port 444;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
        proxy_max_temp_file_size 2048m;
    }
}

 

You have to place you subdomain where you see this “subdomain.*;” once you have save it and restart both containers. Letsencrypt and Nextcloud. 

Link to comment

Here is the nextcloud config.php

 

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'instanceid',
  'passwordsalt' => 'passalt',
  'secret' => 'mysecret key',
  'trusted_domains' => 
  array (
    0 => 'nextcloud ip:port',
    1 => 'mysub.duckdns.org',
  ),
  'dbtype' => 'mysql',
  'version' => '18.0.4.2',
  'dbname' => 'dbname',
  'dbhost' => 'mariadb ip:port',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'dbuser',
  'dbpassword' => 'mypass',
  'installed' => true,

  'trusted_proxies' => 'letsencrypt',
  'overwrite.cli.url' => 'https://mysub.duckdns.org',
  'overwritehost' => 'mysub.duckdns.org',
  'overwriteprotocol' => 'https',
);

 

Link to comment

In my opinion it seems that the subdomain.conf isn't even getting read yet by letsencrypt. It it were and the subdomain.conf wasn't setup properly then I would think there simply would be a gateway error and not the default letsencyrpt index.html page.

 

It simply seems that letsencrypt is not being told to read the subdomain.conf and therefore not pointing to the container location where that container's file would then be served from by the webserver.

 

 

Edited by live4soccer7
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.