[Support] Linuxserver.io - Nextcloud


Recommended Posts

On 12/26/2018 at 1:38 PM, snowboardjoe said:

 

Programs run as abc--not www-data. Pretty sure you need to specify the PHP interpreter too. So, it should look like this:


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

 

I'm getting the following when I try to run the command

Quote

bash: sudo: command not found

 

Link to comment

Nextcloud and SABNZBD issue:  Nextcloud missing files after SABNZBD download

 

Hey Guys,

In Nextcloud I created a folder called "Howard Stern" and in SABNZBD I created a path to that folder.   I also added a category in SABNZBD to have those downloads moved to that folder.  SABnazbd is moving the file correctly and I can see it the files in that path but NEXTCLOUD is not showing those files in the WEBUI.    

 

Can any advise on the fix?   (I tried to show hidden files option and that didnt work)

 

 

 

 

Edited by BDLR
Link to comment

Hi if I want to access the webui of my nextcloud server i get an http error 500 message.

In the container log it says that:

Stack trace:
#0 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(125): OC\AppFramework\Utility\SimpleContainer->resolve('defaultTokenPro...')
#1 /config/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('defaultTokenPro...')
#2 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(81): OC\ServerContainer->query('defaultTokenPro...')
#3 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(104): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#4 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(125): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#5 /config/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppF in /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 110
PHP Fatal error: Uncaught OCP\AppFramework\QueryException: Could not resolve defaultTokenProvider! Class defaultTokenProvider does not exist in /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php:110

And in SimpleContainer.php this:

  

					// Service not found, use the default value when available
					if ($parameter->isDefaultValueAvailable()) {
						$parameters[] = $parameter->getDefaultValue();
					} else if ($parameterClass !== null) {
						$resolveName = $parameter->getName();
(Line 81)						$parameters[] = $this->query($resolveName);
					} else {
						throw $e;
					}
				}
			}
			return $class->newInstanceArgs($parameters);
		}
	}


	/**
	 * If a parameter is not registered in the container try to instantiate it
	 * by using reflection to find out how to build the class
	 * @param string $name the class name to resolve
	 * @return \stdClass
	 * @throws QueryException if the class could not be found or instantiated
	 */
	public function resolve($name) {
		$baseMsg = 'Could not resolve ' . $name . '!';
		try {
			$class = new ReflectionClass($name);
			if ($class->isInstantiable()) {
(Line 104)				return $this->buildClass($class);
			} else {
				throw new QueryException($baseMsg .
					' Class can not be instantiated');
			}
		} catch(ReflectionException $e) {
(Line 110)			throw new QueryException($baseMsg . ' ' . $e->getMessage());
		}
	}


	/**
	 * @param string $name name of the service to query for
	 * @return mixed registered service for the given $name
	 * @throws QueryException if the query could not be resolved
	 */
	public function query($name) {
		$name = $this->sanitizeName($name);
		if ($this->offsetExists($name)) {
			return $this->offsetGet($name);
		} else {
(Line 125)			$object = $this->resolve($name);
			$this->registerService($name, function () use ($object) {
				return $object;
			});
			return $object;
		}
	}

And in ServerContainer.php this:

	/**
	 * @param string $name name of the service to query for
	 * @return mixed registered service for the given $name
	 * @throws QueryException if the query could not be resolved
	 */
(line 107)	public function query($name) {
		$name = $this->sanitizeName($name);

		// In case the service starts with OCA\ we try to find the service in
		// the apps container first.
		if (strpos($name, 'OCA\\') === 0 && substr_count($name, '\\') >= 2) {
			$segments = explode('\\', $name);
			try {
				$appContainer = $this->getAppContainer(strtolower($segments[1]), $segments[1]);
				return $appContainer->queryNoFallback($name);
			} catch (QueryException $e) {
				// Didn't find the service or the respective app container,
				// ignore it and fall back to the core container.
			}
		} else if (strpos($name, 'OC\\Settings\\') === 0 && substr_count($name, '\\') >= 3) {
			$segments = explode('\\', $name);
			try {
				$appContainer = $this->getAppContainer(strtolower($segments[1]), $segments[1]);
				return $appContainer->queryNoFallback($name);
			} catch (QueryException $e) {
				// Didn't find the service or the respective app container,
				// ignore it and fall back to the core container.
			}
		}

(Line 132)		return parent::query($name);
	}
}

I hope that helps you to find the error.

Thank you very much!

Link to comment
1 hour ago, mkono87 said:

Can someone help me out with the configs for setting it up with a subfolder with the letsencrypt docker? I have tried spaceinvaders video but his only focuses on subdomains  and the proxy conf examples iv tried using but just pulling my hair out trying to get it to work.

Did you check the instructions in the nextcloud config sample?  Do you have a custom network interface defined?  (docker network create forletsencrypt0).  Is nextcoud using that network interface in the container definition?

Link to comment
Did you check the instructions in the nextcloud config sample?  Do you have a custom network interface defined?  (docker network create forletsencrypt0).  Is nextcoud using that network interface in the container definition?
no I do not have a custom network interface defined. I have used the default with all my other services which are working fine in nginx.. mainly bridge mode. I havenlooked at all examples.

Sent from my ONEPLUS A3000 using Tapatalk

Link to comment
12 minutes ago, mkono87 said:

no I do not have a custom network interface defined. I have used the default with all my other services which are working fine in nginx.. mainly bridge mode. I havenlooked at all examples.

Sent from my ONEPLUS A3000 using Tapatalk
 

It can work without the custom interface but you'll have to modify the template, give it your server IP.

 

Please start by reading the template, all the info is in there as to what you need to modify to get it working.  If you can't figure out how to put your server's IP in there, I can help.

Link to comment
It can work without the custom interface but you'll have to modify the template, give it your server IP.
 
Please start by reading the template, all the info is in there as to what you need to modify to get it working.  If you can't figure out how to put your server's IP in there, I can help.
thanks I apreciate your offer to help. I just wanted to make sure, do you mean the let's encrypt template?

Sent from my ONEPLUS A3000 using Tapatalk

Link to comment
3 hours ago, Gog said:

It can work without the custom interface but you'll have to modify the template, give it your server IP.

 

Please start by reading the template, all the info is in there as to what you need to modify to get it working.  If you can't figure out how to put your server's IP in there, I can help.

So I have looked at the template and doing some more research I came up with this but when trying it in an incognito window I get a refused to connect error.

 

https://hastebin.com/ozefovuriv.php

Edited by mkono87
Link to comment
4 hours ago, mkono87 said:

So I have looked at the template and doing some more research I came up with this but when trying it in an incognito window I get a refused to connect error.

 

https://hastebin.com/ozefovuriv.php

config.php looks good.  I'm not sure 'trusted_proxies' => ['letsencrypt'] is essential, it was missing from mine :P

 

for the site-config, change

proxy_pass https://$upstream_nextcloud:443;

to 

proxy_pass https://192.168.0.50:446;

 

and you can remove: set $upstream_nextcloud nextcloud;  That's the bit that needs the custom network interface.

 

 

Link to comment
17 minutes ago, Gog said:

config.php looks good.  I'm not sure 'trusted_proxies' => ['letsencrypt'] is essential, it was missing from mine :P

 

for the site-config, change

proxy_pass https://$upstream_nextcloud:443;

to 

proxy_pass https://192.168.0.50:446;

 

and you can remove: set $upstream_nextcloud nextcloud;  That's the bit that needs the custom network interface.

 

 

Changed but I get this error

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 webserver log.

I checked the logs and server is ready   I do get a warning about increasing the max buffer hash size.  I dont think that would cause it to not run though

Link to comment
12 hours ago, mkono87 said:

Changed but I get this error


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 webserver log.

I checked the logs and server is ready   I do get a warning about increasing the max buffer hash size.  I dont think that would cause it to not run though

I wouldn't be too worried about the hash size.  Do you get the same behavior if you try to connect with https://192.168.0.50:446 ?

 

Do you see the connection go through in the letsencrypt access log?

Link to comment
2 hours ago, Gog said:

I wouldn't be too worried about the hash size.  Do you get the same behavior if you try to connect with https://192.168.0.50:446 ?

 

Do you see the connection go through in the letsencrypt access log?

Yes it still the same after changing it. In the activity log is shows 

 [10/Jan/2019:11:43:19 -0500] "GET / HTTP/1.1" 500 304 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"

IM guessing its a problem with nextcloud config?   I was trying with a subdomain too but was getting the same error

Link to comment
3 hours ago, Chrism2015 said:

Does anyone know how to install an SSL certificate when using this docker image?

 

i am trying to configure access to nextcloud using a reverse proxy and i need to install the ssl the proxy uses on the image 

That is exactly what @mkono87 did just before you.  Use LetsEncrypt handle the SSL certificate for you and reverse proxy nextcloud through it.  No need to go through the certificate generation and worry about renewal, letsencrypt is free and auto renews.

Link to comment

having an issue with this docker. I kind of want to blame unraid for this though. All my other dockers are working fine. In fact, this docker is working. The problem is I'm not getting a port mapping from the host to the docker and I can't even specify one completely. You can see in my attachment that I attempt to create a port map, but the options don't give me a place to choose a docker port, only a host port. and if you look in dockers tab, you see there's no mappings meanwhile the other dockers have no issues.

 

 

Screenshot_20190110_192656.png

Screenshot_20190110_192813.png

Link to comment

Hi Everyone,

hope to get some help here.
I tried to do an online update in the nextcloud container from version 15.0.0 to 15.0.1. I think that was a bad idea, because my nextcloud gets stucked and it shows the following page only:

 

grafik.png.76196a15cabd76cb046af56523626746.png

Hope someone can help me with that.

Thx for your help!

Edited by b0rgi85
Link to comment
10 hours ago, b0rgi85 said:

Hi Everyone,

hope to get some help here.
I tried to do an online update in the nextcloud container from version 15.0.0 to 15.0.1. I think that was a bad idea, because my nextcloud gets stucked and it shows the following page only:

 

grafik.png.76196a15cabd76cb046af56523626746.png

Hope someone can help me with that.

Thx for your help!

I'm new to Nextcloud, but you will likely need to manually remove it from Maintenance mode, you can do that from the console (select docker drop down down, then console).  Would be something like this from the /config/www/nextcloud folder.

 

sudo -u abc php occ maintenance:mode --off 

 

or from any path

 

sudo -u abc php /config/www/nextcloud/occ maintenance:mode -off

 

 

Then restart docker and troubleshoot from there I suppose.  Did you backup before upgrading?

 

 

Edited by jbear
Link to comment
19 hours ago, Chrism2015 said:

Does anyone know how to install an SSL certificate when using this docker image?

 

i am trying to configure access to nextcloud using a reverse proxy and i need to install the ssl the proxy uses on the image 

 

20 hours ago, Chrism2015 said:

Does anyone know how to install an SSL certificate when using this docker image?

 

i am trying to configure access to nextcloud using a reverse proxy and i need to install the ssl the proxy uses on the image 

https://blog.linuxserver.io/2017/05/10/installing-nextcloud-on-unraid-with-letsencrypt-reverse-proxy/

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.