Jump to content
linuxserver.io

[Support] Linuxserver.io - Nextcloud

2468 posts in this topic Last Reply

Recommended Posts

Is there a way to add your existing unRAID shares into Nextcloud? E.g. If I have some files stored in an unRAID share that I would like to send some users a public nextcloud link to.

 

 

Share this post


Link to post

Yes you can mount them using a plugin that mounts external shares.  I've done so in the past but can't remember the details.

 

Sent from my LG-H815 using Tapatalk

 

 

Share this post


Link to post

I was using Owncloud and a reversy proxy setup, but it is SO SLOW. So I thought I'd should give Nextcloud a try if it is faster.

 

I installed Nextcloud and made it work behind a reverse proxy.

But it is almost just as damn slow as the Owncloud.

 

I am using duckdns, and my internet speed is 50 Mbits upload so can't be that.

The server runs i7-2600K and 16Gb RAM. So can't be that either.

 

I have googled and a lot of people have the same issues with slow loading admin-page and so on. But I haven't found any solutions just yet.

 

Can anyone please help me out?

 

These are my configs, if they say something that makes the apps go terribly slow:

 

Nextcloud "config.php"

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'xxxxxx',
  'passwordsalt' => 'xxxxxx',
  'secret' => 'xxxxxx',
  'trusted_domains' => 
  array (
    0 => '192.168.1.8:8000',
1 => 'xxxxxx',
2 => 'xxxxxx.duckdns.org',
3 => 'xxxxxx',
),
  'overwritewebroot' => '/nextcloud',
  'overwrite.cli.url' => 'https://xxxxxxxx.duckdns.org',
  'overwritehost' => 'xxxxxxx.duckdns.org',
  'overwriteprotocol' => 'https',
  'dbtype' => 'mysql',
  'version' => '9.0.53.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'xxxxxx',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxxxxx',
  'logtimezone' => 'UTC',
  'installed' => true,
);

 

Owncloud "config.php"

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'instanceid' => 'xxxxxx',
  'passwordsalt' => 'xxxxxx',
  'secret' => 'xxxxxxx',
  'trusted_domains' => 
  array (
    0 => '192.168.1.8',
    1 => 'xxxxx',
    2 => 'xxxxxx.duckdns.org',
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwritewebroot' => '/owncloud',
  'overwrite.cli.url' => 'https://xxxxx.duckdns.org',
  'overwritehost' => 'xxxxxxx.duckdns.org',
  'overwriteprotocol' => 'https',
  'forcessl' => true,
  'forceSSLforSubdomains' => true,
  'dbtype' => 'mysql',
  'version' => '8.2.7.1',
  'dbname' => 'owncloud',
  'dbhost' => 'xxxxxx',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'xxxxxx',
  'logtimezone' => 'UTC',
  'installed' => true,
  'loglevel' => 0,
  'maintenance' => false,
  'trashbin_retention_obligation' => 'auto',
  'theme' => '',
);

 

Apache "default.conf"

I never have Owncloud and Nextcloud running at the same time, so I haven't changed the port yet.

<VirtualHost *:8008>
    DocumentRoot /config/www/
CustomLog /dev/null common

    <Directory "/config/www/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
            Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:443>
ServerName xxxxx
SSLEngine on
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyRequests off
SSLProtocol All -SSLv2 -SSLv3
SSLCipherSuite xxxxxxxxx
SSLCertificateFile "/config/keys/cert.crt"
SSLCertificateKeyFile "/config/keys/cert.key"
SSLCertificateChainFile "/config/keys/server.pem"
DocumentRoot /config/www/
CustomLog /dev/null common

<Location /owncloud>
	ProxyPass https://xxxxxx:8000
	ProxyPassReverse https://xxxxxx:8000
</Location>

<Location /nextcloud>
	ProxyPass https://xxxxxx:8000
	ProxyPassReverse https://xxxxxx:8000
</Location>

<Directory "/config/www/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
            Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

Share this post


Link to post

I was using Owncloud and a reversy proxy setup, but it is SO SLOW. So I thought I'd should give Nextcloud a try if it is faster.

 

I installed Nextcloud and made it work behind a reverse proxy.

But it is almost just as damn slow as the Owncloud.

 

I am using duckdns, and my internet speed is 50 Mbits upload so can't be that.

The server runs i7-2600K and 16Gb RAM. So can't be that either.

 

I have googled and a lot of people have the same issues with slow loading admin-page and so on. But I haven't found any solutions just yet.

 

Can anyone please help me out?

 

These are my configs, if they say something that makes the apps go terribly slow:

<snip>

 

Shot in the dark, but how are you using the reverse proxy?  I don't see 'trusted_proxies' configured in the config.php.  Also, do you get a warning about memcache on the admin page?  I see you have APCu configured, I'm just not sure on the double '\\'.  Is there a specific reason for enabling/needing 'MultiViews'?

Share this post


Link to post

Shot in the dark, but how are you using the reverse proxy?  I don't see 'trusted_proxies' configured in the config.php.  Also, do you get a warning about memcache on the admin page?  I see you have APCu configured, I'm just not sure on the double '\\'.  Is there a specific reason for enabling/needing 'MultiViews'?

 

Thanks for reply

 

The reverse proxy is pointed internally and reaches out through one port (443).

It has been working without the need of the 'trusted_proxies' in config.php. I can try to add it, but not sure how to use the command or how it should help?

 

I don't get any warnings in the log-file. The APCu was on by default on my Owncloud, and I almost copied the entire config.php file to Nextcloud, perhaps that's why I have brought it all along. Maybe I should disable that?

Same thing with MultiViews, I don't really know what APCu or MultiViews do, maybe I should comment that part out too?

 

This is what I get in the network-tab in the developer interface in Chrome. In this case I am using owncloud trying to reach the admin-page. But this problem can occour on any page. Same problem in Nextcloud of course and only behind the reverse proxy.

GET https://xxxxxx.duckdns.org/owncloud/core/js/mimetypelist.js?v=fbfda69922277ac52b88aedece79bcf2 net::ERR_CONNECTION_TIMED_OUT
GET https://xxxxxx.duckdns.org/owncloud/core/js/jquery.avatar.js?v=fbfda69922277ac52b88aedece79bcf2 net::ERR_CONNECTION_TIMED_OUT
GET https://xxxxxx.duckdns.org/owncloud/core/js/avatar.js?v=fbfda69922277ac52b88aedece79bcf2 net::ERR_CONNECTION_TIMED_OUT
GET https://xxxxxx.duckdns.org/owncloud/apps/files/l10n/sv.js?v=fbfda69922277ac52b88aedece79bcf2 net::ERR_CONNECTION_TIMED_OUT
GET https://xxxxxx.duckdns.org/owncloud/core/js/setupchecks.js?v=fbfda69922277ac52b88aedece79bcf2 net::ERR_CONNECTION_TIMED_OUT
Uncaught TypeError: Cannot read property 'checkWebDAV' of undefined

Share this post


Link to post

Shot in the dark, but how are you using the reverse proxy?  I don't see 'trusted_proxies' configured in the config.php.  Also, do you get a warning about memcache on the admin page?  I see you have APCu configured, I'm just not sure on the double '\\'.  Is there a specific reason for enabling/needing 'MultiViews'?

 

Thanks for reply

 

The reverse proxy is pointed internally and reaches out through one port (443).

It has been working without the need of the 'trusted_proxies' in config.php. I can try to add it, but not sure how to use the command or how it should help?

 

I don't get any warnings in the log-file. The APCu was on by default on my Owncloud, and I almost copied the entire config.php file to Nextcloud, perhaps that's why I have brought it all along. Maybe I should disable that?

Same thing with MultiViews, I don't really know what APCu or MultiViews do, maybe I should comment that part out too?

 

This is what I get in the network-tab in the developer interface in Chrome. In this case I am using owncloud trying to reach the admin-page. But this problem can occour on any page. Same problem in Nextcloud of course and only behind the reverse proxy.

GET https://xxxxxx.duckdns.org/owncloud/core/js/mimetypelist.js?v=fbfda69922277ac52b88aedece79bcf2 net::ERR_CONNECTION_TIMED_OUT
GET https://xxxxxx.duckdns.org/owncloud/core/js/jquery.avatar.js?v=fbfda69922277ac52b88aedece79bcf2 net::ERR_CONNECTION_TIMED_OUT
GET https://xxxxxx.duckdns.org/owncloud/core/js/avatar.js?v=fbfda69922277ac52b88aedece79bcf2 net::ERR_CONNECTION_TIMED_OUT
GET https://xxxxxx.duckdns.org/owncloud/apps/files/l10n/sv.js?v=fbfda69922277ac52b88aedece79bcf2 net::ERR_CONNECTION_TIMED_OUT
GET https://xxxxxx.duckdns.org/owncloud/core/js/setupchecks.js?v=fbfda69922277ac52b88aedece79bcf2 net::ERR_CONNECTION_TIMED_OUT
Uncaught TypeError: Cannot read property 'checkWebDAV' of undefined

 

You can try removing the multiviews from the config file.  I don't use it, but searches have come up with various issues when using it.  APCu is one of the available memcaches for use with PHP 5.5+, but Redis is probably a better choice since it supports the file locking that is enabled by default in NextCloud.  I can't say for certain it is directly affecting your performance, more of an observation and  same with the multiviews.  How busy/hammered is your nextcloud server?  I'm not sure on your reverse proxy config as I do not use one.  Perhaps try without it?

Share this post


Link to post

I'm using NextCloud and letsencrypt for reverse proxy.

 

I see this in NextCloud. Is there any solution to fix this ?

Security & setup warnings

The "X-XSS-Protection" HTTP header is not configured to equal to "1; mode=block". This is a potential security or privacy risk and we recommend adjusting this setting.
The "X-Content-Type-Options" HTTP header is not configured to equal to "nosniff". This is a potential security or privacy risk and we recommend adjusting this setting.
The "X-Robots-Tag" HTTP header is not configured to equal to "none". This is a potential security or privacy risk and we recommend adjusting this setting.
The "X-Frame-Options" HTTP header is not configured to equal to "SAMEORIGIN". This is a potential security or privacy risk and we recommend adjusting this setting.

Share this post


Link to post

I'm trying to get nextcloud working as per the instructions provided here, but I'm running into an issue when trying to configure nextcloud for the first time through its webgui. Specifically, I put in the details of my MariaDB, however I get an error (taken from MariaDB logs)

 

2016-08-31 10:27:44 47012320705280 [Warning] IP address '172.17.42.1' could not be resolved: Name or service not known
2016-08-31 10:27:44 47012320705280 [Warning] Access denied for user 'root'@'172.17.42.1' (using password: YES)

 

which is strange considering that's not the ip address of my db, it should be 192.168.1.107:3306 (which is what I entered in the database host field). As far as I can tell my MariaDB docker is configured correctly, as I've made sure:

1. Installed MariaDB from linuxserver repo

2. Enabled binary logging

3. Provided a MYSQL_ROOT_PASSWORD

 

Any help with this would be greatly appreciated.

 

* Edit below *


Solved this problem after doing some reading up on MariaDB (noob here). Thought I'd post the solution in case someone else runs into the same problem.

 

From the Unraid command line entered the MariaDB container:

docker exec -it mariadb bash

 

Login (it should prompt you for root's password)

mysql -p

 

Since nextcloud (for whatever reason) was trying to connect from 172.17.42.1, I created a user from this host. I called the user nextcloud

CREATE USER 'nextcloud'@'172.17.42.1' IDENTIFIED BY 'password';

 

Grant the nextcloud user privileges equivalent to root

GRANT ALL PRIVILEGES ON *.* TO 'nextcloud'@'172.17.42.1' WITH GRANT OPTION;

 

Then all I had to do was change the username and password in the nextcloud gui and voila! it connected and created the nextcloud db.

 

 

Share this post


Link to post

Hello,

 

I am running UnRaid 6.2 RC5 with MariaDB and Nextcloud inside Docker.

 

Is is normal, that Version 9.0.53 (stable) is installed while there is Nextcloud 10 as a stable build?

 

If this is normal, will there be an automated Update to Version 10 with the Container?

 

 

thanks!

Share this post


Link to post

I'm using NextCloud and letsencrypt for reverse proxy.

 

I see this in NextCloud. Is there any solution to fix this ?

Security & setup warnings

The "X-XSS-Protection" HTTP header is not configured to equal to "1; mode=block". This is a potential security or privacy risk and we recommend adjusting this setting.
The "X-Content-Type-Options" HTTP header is not configured to equal to "nosniff". This is a potential security or privacy risk and we recommend adjusting this setting.
The "X-Robots-Tag" HTTP header is not configured to equal to "none". This is a potential security or privacy risk and we recommend adjusting this setting.
The "X-Frame-Options" HTTP header is not configured to equal to "SAMEORIGIN". This is a potential security or privacy risk and we recommend adjusting this setting.

 

I'm having the same issue.

Share this post


Link to post

I'm dealing with 2 other issues in Nextcloud.

 

1. I get the following warnings (same at Peter_SM)

 

Security & setup warnings

 

    The "X-XSS-Protection" HTTP header is not configured to equal to "1; mode=block". This is a potential security or privacy risk and we recommend adjusting this setting.

    The "X-Content-Type-Options" HTTP header is not configured to equal to "nosniff". This is a potential security or privacy risk and we recommend adjusting this setting.

    The "X-Robots-Tag" HTTP header is not configured to equal to "none". This is a potential security or privacy risk and we recommend adjusting this setting.

    The "X-Frame-Options" HTTP header is not configured to equal to "SAMEORIGIN". This is a potential security or privacy risk and we recommend adjusting this setting.

 

I tried googling the issue and tried a few of the recommended remedies, but nothing has helped.

 

 

2. I can't seem to be able to upload a file. I get various different errors, ranging from:

 

a. Internal Server Error

b. Bad Gateway

c. Request Entity too Large

 

I was successful in uploading one file, but nothing else will work. These files are small. A few MB at most.

Share this post


Link to post

I'm dealing with 2 other issues in Nextcloud.

 

1. I get the following warnings (same at Peter_SM)

 

Security & setup warnings

 

    The "X-XSS-Protection" HTTP header is not configured to equal to "1; mode=block". This is a potential security or privacy risk and we recommend adjusting this setting.

    The "X-Content-Type-Options" HTTP header is not configured to equal to "nosniff". This is a potential security or privacy risk and we recommend adjusting this setting.

    The "X-Robots-Tag" HTTP header is not configured to equal to "none". This is a potential security or privacy risk and we recommend adjusting this setting.

    The "X-Frame-Options" HTTP header is not configured to equal to "SAMEORIGIN". This is a potential security or privacy risk and we recommend adjusting this setting.

 

I tried googling the issue and tried a few of the recommended remedies, but nothing has helped.

 

 

2. I can't seem to be able to upload a file. I get various different errors, ranging from:

 

a. Internal Server Error

b. Bad Gateway

c. Request Entity too Large

 

I was successful in uploading one file, but nothing else will work. These files are small. A few MB at most.

 

My setup is reverse proxied with Apache and I'm not seeing these warnings, so I can only assume it's something to do with the way you've got it setup.  I still haven't learned how to use nginx I'm afraid.

 

Is this the bit you're getting the warnings in?

h_1473491338_3008593_54c61f2c75.png

Share this post


Link to post

My setup is reverse proxied with Apache and I'm not seeing these warnings, so I can only assume it's something to do with the way you've got it setup.  I still haven't learned how to use nginx I'm afraid.

 

Is this the bit you're getting the warnings in?

h_1473491338_3008593_54c61f2c75.png

 

Yup, that's the spot. Peter_SM has a very similar setup to me and is getting the same problem. So ya, definitely sounds like it's something with our reverse proxy / nginx setup.

Share this post


Link to post

Hi,

 

Having read through this thread I still can't get MariaDB (LSIO container) to keep mixed binlog mode. I've changed the custom.cnf file both from within the container, and externally using NP++ but when MariaDB starts up it just switches back to statement mode. At the moment, I'm having to use an SQL query to set the global binlog mode every time my server is rebooted.

 

Any help would be appreciated!

 

Thanks

Tom

Share this post


Link to post

Hi Tom, not really sure what to suggest as mine just works, you using our version of mariadb?  If so post your mappings over in the mariadb support thread and we'll take a look.

Share this post


Link to post

I see that the docker was updated to NextCloud version 10 recently...

 

When I force update the docker container I am still stuck on version 9.52...

 

Is there a special method to update?  Should I delete something from my appdata mappings nad the force update?

 

Any help would be great!

 

Thanks

Share this post


Link to post

We have updated the container, however due to the way the container is the only ways you can get to v10 if you're an existing user is by either.

 

[*]Deleting your current container, image and appdata

[*]Via command line

 

At some point to get this container out of beta we're going to have to rewrite this and work out an upgrade strategy, one problem we're facing Sparklyballs has mentioned here.

 

I did test a command line upgrade yesterday and it worked fine for me, give me some time and I'll post it on here.  Naturally you do so at your own risk...

Share this post


Link to post

We have updated the container, however due to the way the container is the only ways you can get to v10 if you're an existing user is by either.

 

[*]Deleting your current container, image and appdata

[*]Via command line

 

At some point to get this container out of beta we're going to have to rewrite this and work out an upgrade strategy, one problem we're facing Sparklyballs has mentioned here.

 

I did test a command line upgrade yesterday and it worked fine for me, give me some time and I'll post it on here.  Naturally you do so at your own risk...

 

I tried this and it worked:

 

1. Renamed the appdata /www/nextcloud colder to nextcloud.old.v9

2. Deleted the existing container and image

3. Pulled new image and started container

4. Stopped container and renamed config.php to config.old

5. Copied config.php form old installation to new /www/nextcloud/config folder

6. Started container

7. Went to web login page and was prompted to upgrade installation to Nextcloud 10

8. Updated and logged in...everything seems to be working great!

9. Thanks for the updated container and all your efforts!!!

Share this post


Link to post

Here's my list of instructions....  ;-)

 

Use them at your own risk.....

 

If upgrading to v12 please see here:

 

Quote

For those that upgrade to v12.  Nextcloud have changed the config slightly.  You will need to go to your nextcloud appdata and edit the default file in /nginx/site-confs/ and hash the line so it reads #add_header X-Frame-Options "SAMEORIGIN";

##Open terminal in container
docker exec -it nextcloud bash

##Turn on maintenance mode
sudo -u abc php7 /config/www/nextcloud/occ maintenance:mode --on

##Backup current nextcloud install
mv /config/www/nextcloud /config/www/nextcloud-backup

##Grab newest nextcloud release and unpack it
wget https://download.nextcloud.com/server/releases/latest.tar.bz2
tar -xvf latest.tar.bz2 -C /config/www

##Copy across old config.php from backup
cp /config/www/nextcloud-backup/config/config.php /config/www/nextcloud/config/config.php

##Now Restart docker container
exit
docker restart nextcloud

##Open terminal in container
docker exec -it nextcloud bash

##Perform upgrade
sudo -u abc php7 /config/www/nextcloud/occ upgrade

##Turn off maintenance mode
sudo -u abc php7 /config/www/nextcloud/occ maintenance:mode --off

## Now Restart docker container
exit
docker restart nextcloud
 

 

Once all is confirmed as working

 

##Open terminal in container
docker exec -it nextcloud bash

##remove  backup folder
rm -rf /config/www/nextcloud-backup

##Remove Nextcloud tar file
rm latest.tar.bz2
 
Edited by CHBMB
Updated for php7

Share this post


Link to post

Here's my list of instructions....  ;)

 

Use them at your own risk.....

 

##Open terminal in container
docker exec -it nextcloud bash

##Turn on maintenance mode
cd /config/www/nextcloud/
sudo -u abc php occ maintenance:mode --on

##Backup current nextcloud install
cd /config/www/
mv nextcloud nextcloud-backup

##Grab newest nextcloud release and unpack it
wget https://download.nextcloud.com/server/releases/nextcloud-10.0.0.tar.bz2
tar -xvf nextcloud-10.0.0.tar.bz2

##Copy across old config.php from backup
cp nextcloud-backup/config/config.php nextcloud/config/config.php

##Now Restart docker container via Unraid WebGUI

##Open terminal in container
docker exec -it nextcloud bash

##Perform upgrade
cd /config/www/nextcloud/
sudo -u abc php occ upgrade

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

## Now Restart docker container via Unraid WebGUI

 

time to break stuff!!! yeah!!

Share this post


Link to post

Here's my list of instructions....  ;)

 

Use them at your own risk.....

 

##Open terminal in container
docker exec -it nextcloud bash

##Turn on maintenance mode
cd /config/www/nextcloud/
sudo -u abc php occ maintenance:mode --on

##Backup current nextcloud install
cd /config/www/
mv nextcloud nextcloud-backup

##Grab newest nextcloud release and unpack it
wget https://download.nextcloud.com/server/releases/nextcloud-10.0.0.tar.bz2
tar -xvf nextcloud-10.0.0.tar.bz2

##Copy across old config.php from backup
cp nextcloud-backup/config/config.php nextcloud/config/config.php

##Now Restart docker container via Unraid WebGUI

##Open terminal in container
docker exec -it nextcloud bash

##Perform upgrade
cd /config/www/nextcloud/
sudo -u abc php occ upgrade

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

## Now Restart docker container via Unraid WebGUI

 

Just worked for me on one of my instances, now to move on to my others.

Share this post


Link to post

Ye Gods man, how many clouds do you have?  Like a damn thunderstorm or something?!

 

Glad it worked for you.  ;D

Share this post


Link to post

Ye Gods man, how many clouds do you have?  Like a damn thunderstorm or something?!

 

Glad it worked for you.  ;D

 

And it worked on the rest, have 3 environments, personal, small business, and small business testing.

Share this post


Link to post

My setup is reverse proxied with Apache and I'm not seeing these warnings, so I can only assume it's something to do with the way you've got it setup.  I still haven't learned how to use nginx I'm afraid.

 

Is this the bit you're getting the warnings in?

h_1473491338_3008593_54c61f2c75.png

 

Yup, that's the spot. Peter_SM has a very similar setup to me and is getting the same problem. So ya, definitely sounds like it's something with our reverse proxy / nginx setup.

 

 

Final I get a solution ! :-)

 

In your server settings try to add this line

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

 

example ...

server {
    listen 443 ssl;
    server_name www.example.com;

    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
}

 

Share this post


Link to post

Final I get a solution ! :-)

 

In your server settings try to add this line

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

 

example ...

server {
    listen 443 ssl;
    server_name www.example.com;

    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
}

 

Nice! I just nuked my installation and starting from scratch with Nextcloud 10.0. I just got it setup and so far no error, but i haven't enabled reverse proxy yet. So when i do, i'll add your code and see if it works for me.

 

Thanks!

Share this post


Link to post

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.