[Support] Linuxserver.io - Nextcloud


Recommended Posts

Here is my config file:

'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'ocdom0nknjo5',
  'passwordsalt' => 'ybg+QnhDLXBpv3kKaOPC9FdigKuFtzJ',
  'secret' => 'YSIrP185VwVGF1KdZZWFgtAq07KfE0pi7kRcQOwFLfvzuy7N4',
  'trusted_domains' => 
  array (
    0 => '192.168.0.100',
    1 => 'xxxxxxx.ddns.net',
  ),
  'overwrite.cli.url' => 'https://192.168.0.100',
  'dbtype' => 'mysql',
  'version' => '13.0.6.1',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.0.100:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'MrVilla',
  'dbpassword' => 'xxxxxxxx',
  'installed' => true,
  'maintenance' => false,
  'loglevel' => 2,
  'updater.secret' => '$2y$10$zWf8v4qeLKbY/HhbrlNNf.DmA6dW1IgMbx0.X04VgY3IdsWFo.54CW',
  'theme' => '',
 

Edited by mrvilla
Link to comment

I didnt find a good guide for integrating Collabora into Nextcloud on unraid... So I thought I would share my config. I am using Nextcloud v13.

 

Prerequisites:

  • Letsencrypt nginx docker
  • Nextcloud docker on a subdomain configure in nginx (e.g. could.yourdomain.com).

Instalation:

  1. Configure Letsencrypt/nginx
    1. Add new subdomain to your letsencrypt configuration (e.g. office.) by editing the lets encrypt docker parameters.
    2. Edit the nginx default file (usually: user/mnt/appdata/letsencrypt/nginx/site-confs/default) by adding a new subdomain block for collabora.
      server {
      
      	listen 443 ssl;
      
      	server_name office.yourdomain.com;
      
      	ssl_certificate /config/keys/letsencrypt/fullchain.pem;
      	ssl_certificate_key /config/keys/letsencrypt/privkey.pem;
      	ssl_dhparam /config/nginx/dhparams.pem;
      	ssl_ciphers 'XXX';
      	ssl_prefer_server_ciphers on;
      
      	# static files
      	location ^~ /loleaflet {
      	    include /config/nginx/proxy.conf;
      	    proxy_pass https://xxx.xxx.xx.xx:9980;
      	}
      
      	# WOPI discovery URL
      	location ^~ /hosting/discovery {
      	    include /config/nginx/proxy.conf;
      	    proxy_pass https://xxx.xxx.xx.xx:9980;
      	}
      
      	# main websocket
      	location ~ ^/lool/(.*)/ws$ {
      	    include /config/nginx/proxy.conf;
      	    proxy_pass https://xxx.xxx.xx.xx:9980;
      	    proxy_set_header Upgrade $http_upgrade;
      	    proxy_set_header Connection "Upgrade";
      	    proxy_set_header Host $http_host;
      	}
      
      	# download, presentation and image upload
      	location ~ ^/lool {
      	    include /config/nginx/proxy.conf;
      	    proxy_pass https://xxx.xxx.xx.xx:9980;
      	}
      
      	# Admin Console websocket
      	location ^~ /lool/adminws {
      	    include /config/nginx/proxy.conf;
      	    proxy_pass https://xxx.xxx.xx.xx:9980;
      	    proxy_set_header Upgrade $http_upgrade;
      	    proxy_set_header Connection "Upgrade";
      	    proxy_set_header Host $http_host;
      	}
      }

       

  2. Install the Collabora docker (I'm using chvb's Repository docker here, collabora/code) and fill out the docker variables appropriately. In the Domain field the subdomain of your nextcloud has to be entered in the following format: cloud\\.yourdomain\\.com
  3. Now you can download the collabora app through the nextcloud UI and put in the collabora address in the setting menu for the collabora app. (e.g. https://office.yourdomain.com)
  4. Restart letsencrypt, collabora and nextcloud. Now if you click on word document in nextcloud it should open in browser with collabora.

My nextcloud nginx config for reference:

server {

	listen 443 ssl;
	root /config/www ;
	index index.html index.htm index.php;

	server_name cloud.XXX.com;

	ssl_certificate /config/keys/letsencrypt/fullchain.pem;
	ssl_certificate_key /config/keys/letsencrypt/privkey.pem;
	ssl_dhparam /config/nginx/dhparams.pem;
	ssl_ciphers 'XXX';
	ssl_prefer_server_ciphers on;
	ssl_session_cache shared:SSL:10m;
	
	add_header Front-End-Https on;
	
	location / {
	    include /config/nginx/proxy.conf;
	    proxy_pass https://xxx.xxx.xx.xx:444/;
	}
}

 

 

Edited by MrChunky
  • Like 1
Link to comment

Hi, i have letsencrypt running, server ready.  When i click on webui under docker i get redirected to my subdomain, but it times out. I get this: 

image.thumb.png.1cf8e4934a2f4b650c40980d5c56cc16.png

 

my nextcloud config is:

 

 

<?php
$CONFIG = array (
  'instanceid' => 'oc2r526nrw27',
  'passwordsalt' => 'jahrU20+WU1udvy0TZpnKPrZhRnNC2',
  'secret' => 'l4iHAz1Fz0pCfZ44QhzzqGwy9gbpKrc8DEsz2uxjZer/+85E',
  'trusted_domains' => 
  array (
    0 => '192.168.7.60:444',
    1 => 'xxx.duckdns.org',
  ),
  'datadirectory' => '/data',
  'dbtype' => 'mysql',
  'version' => '14.0.0.19',
  'trusted_proxies' => ['letsencrypt'],
  'overwrite.cli.url' => 'https://xxx.duckdns.org',
  'overwritehost' => 'xxx.duckdns.org',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.7.60',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'glenn',
  'dbpassword' => 'Titan001',
  'installed' => true,
);

 

 

my letsencrypt nextcloud.subdomain.conf file looks like this:

 

 

# make sure that your dns has a cname set for nextcloud
# assuming this container is called "letsencrypt", edit your nextcloud container's config
# located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
#  'trusted_proxies' => ['letsencrypt'],
#  'overwrite.cli.url' => 'https://nextcloud.your-domain.com/',
#  'overwritehost' => 'nextcloud.your-domain.com',
#  'overwriteprotocol' => 'https',
#
# Also don't forget to add your domain name to the trusted domains array. It should look somewhat like this:
#  array (
#    0 => '192.168.0.1:444', # This line may look different on your setup, don't modify it.
#    1 => 'nextcloud.your-domain.com',
#  ),

server {
    listen 443 ssl;

    server_name nextcloud.*;

    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_nextcloud nextcloud;
        proxy_max_temp_file_size 2048m;
        proxy_pass https://$upstream_nextcloud:443;
    }
}
 

Edited by Glenn
Link to comment

Hi guys!

 

Haven't been able to update Nextcloud in a while due to this error, any ideas why it appears?

At first, I wasn't able to even see the upgrade screen since I got the "Step 4 is currently in process. Please reload this page later" error.

I found a site that recommends removing the "nextcloud-data/updater-randomstring/.step"-file wich I did and then could proceed. But then this error comes up!

 

Worth mentioning is that the data folder (including "nextcloud-data/updater-randomstring/.step" ) is on a FreeNAS server. The share is mounted in unRAID (NFS) with the "unassigned drives"-plug in and there's no problem storing and accessing data there otherwise (got all my sh*t there).

 

Any thoughts?

 

 

nextcloud_upgrade_fail.thumb.png.378a34515ceda68bee1a9602c6dfd727.png

Link to comment
On 9/17/2018 at 8:23 PM, iamnypz said:

Hi guys!

 

Haven't been able to update Nextcloud in a while due to this error, any ideas why it appears?

At first, I wasn't able to even see the upgrade screen since I got the "Step 4 is currently in process. Please reload this page later" error.

I found a site that recommends removing the "nextcloud-data/updater-randomstring/.step"-file wich I did and then could proceed. But then this error comes up!

 

Worth mentioning is that the data folder (including "nextcloud-data/updater-randomstring/.step" ) is on a FreeNAS server. The share is mounted in unRAID (NFS) with the "unassigned drives"-plug in and there's no problem storing and accessing data there otherwise (got all my sh*t there).

 

Any thoughts?

 

 

imageproxy.php?img=&key=00b562fcac28e727imageproxy.php?img=&key=00b562fcac28e727nextcloud_upgrade_fail.thumb.png.378a34515ceda68bee1a9602c6dfd727.png

Yeah, mount that folder locally to test.

Link to comment
On 9/17/2018 at 1:54 AM, Glenn said:

Hi, i have letsencrypt running, server ready.  When i click on webui under docker i get redirected to my subdomain, but it times out. I get this: 

image.thumb.png.1cf8e4934a2f4b650c40980d5c56cc16.png

 

my nextcloud config is:

 

 

<?php
$CONFIG = array (
  'instanceid' => 'oc2r526nrw27',
  'passwordsalt' => 'jahrU20+WU1udvy0TZpnKPrZhRnNC2',
  'secret' => 'l4iHAz1Fz0pCfZ44QhzzqGwy9gbpKrc8DEsz2uxjZer/+85E',
  'trusted_domains' => 
  array (
    0 => '192.168.7.60:444',
    1 => 'xxx.duckdns.org',
  ),
  'datadirectory' => '/data',
  'dbtype' => 'mysql',
  'version' => '14.0.0.19',
  'trusted_proxies' => ['letsencrypt'],
  'overwrite.cli.url' => 'https://xxx.duckdns.org',
  'overwritehost' => 'xxx.duckdns.org',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.7.60',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'glenn',
  'dbpassword' => 'Titan001',
  'installed' => true,
);

 

 

my letsencrypt nextcloud.subdomain.conf file looks like this:

 

 

# make sure that your dns has a cname set for nextcloud
# assuming this container is called "letsencrypt", edit your nextcloud container's config
# located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
#  'trusted_proxies' => ['letsencrypt'],
#  'overwrite.cli.url' => 'https://nextcloud.your-domain.com/',
#  'overwritehost' => 'nextcloud.your-domain.com',
#  'overwriteprotocol' => 'https',
#
# Also don't forget to add your domain name to the trusted domains array. It should look somewhat like this:
#  array (
#    0 => '192.168.0.1:444', # This line may look different on your setup, don't modify it.
#    1 => 'nextcloud.your-domain.com',
#  ),

server {
    listen 443 ssl;

    server_name nextcloud.*;

    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_nextcloud nextcloud;
        proxy_max_temp_file_size 2048m;
        proxy_pass https://$upstream_nextcloud:443;
    }
}
 

I'd take a look at the LetsEncrypt log first to see if that's working.

Link to comment

Don't know if this has been asked before or not but just in case.

My config for nextcliud is stored in appearance on my cache drive, and the /data folder is kept on the array. However, there is a file "own cloud.db" that is in this data directory that nextcliud keeps accessing, which is keeping my array spun up. How do i relocate this file to the config directory or similar?

Link to comment

Hi everyone,

 

I got this kinds of message after login + password entered:

"This page isn’t working
xxx.xxx.xxx.xxx is currently unable to handle this request.
HTTP ERROR 500"

 

The log file shows:

"PHP Fatal error: Declaration of OC\Files\Storage\Local::copyFromStorage(OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) must be compatible with OC\Files\Storage\Common::copyFromStorage(OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) in /config/www/nextcloud/lib/private/Files/Storage/Local.php on line 43"

 

How should I do next??🙄

Link to comment

Hi.  I saw this message in my Nextcloud docker container.  

 

Security & setup warnings

It's important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.

There are some warnings regarding your setup.
  • The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
    • Missing index "fs_mtime" in table "oc_filecache".
  • The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin" or "strict-origin-when-cross-origin". This can leak referer information. See the W3C Recommendation ↗.

Please double check the installation guides ↗, and check for any errors or warnings in the log.

Check the security of your Nextcloud over our security scan ↗.

 

What should I do to fix this?  This is a newly installed instance.

Link to comment
11 minutes ago, jang430 said:

Hi.  I saw this message in my Nextcloud docker container.  

 

Security & setup warnings

It's important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.

There are some warnings regarding your setup.
  • The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
    • Missing index "fs_mtime" in table "oc_filecache".
  • The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin" or "strict-origin-when-cross-origin". This can leak referer information. See the W3C Recommendation ↗.

Please double check the installation guides ↗, and check for any errors or warnings in the log.

Check the security of your Nextcloud over our security scan ↗.

 

What should I do to fix this?  This is a newly installed instance.

Me too

Link to comment

I followed the upgrade instructions but for v14. However when i run the upgrade command i get:


An unhandled exception has been thrown:
OC\HintException: [0]: Downgrading is not supported and is likely to cause unpredictable issues (from 12.0.3.3 to 12.0.0.29) ()

 

Any help please?

 

EDIT - OK so if i am reading the error correctly it is actually PHP that needs updating and not nextcloud. Does anyone have a guide on how to update PHP?

 

EDIT 2 - OK so i followed the procedure to update but used 13.04. It would not do the upgrade step after restarting the docker. I went to the webUI which then worked and allowed me to update.

 

All working now.

 

Edited by showstopper
Link to comment
On 9/21/2018 at 4:37 PM, geekypenguin said:

Don't know if this has been asked before or not but just in case.

My config for nextcliud is stored in appearance on my cache drive, and the /data folder is kept on the array. However, there is a file "own cloud.db" that is in this data directory that nextcliud keeps accessing, which is keeping my array spun up. How do i relocate this file to the config directory or similar?

Bump?

Link to comment
On 9/22/2018 at 7:19 AM, peter_sm said:

Me too

When i did enter the docker container with ssh and did run the following command the error message was gone

 

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

 

Only the "The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin" or "strict-origin-when-cross-origin". This can leak referer information." message to go

 

Edited by Konijntjes
  • Like 2
  • Thanks 3
  • Upvote 2
Link to comment
10 hours ago, Konijntjes said:

When i did enter the docker container with ssh and did run the following command the error message was gone

 

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

 

Only the "The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin" or "strict-origin-when-cross-origin". This can leak referer information." message to go

 

Thanks, fixed for me as well, and I also added this line

add_header Referrer-Policy no-referrer always;

to

appdata/nextcloud/nginx/site-confs/default

 

And now I have a green light

And A+ on the securite check, can this get better ?

//Peter

Edited by peter_sm
  • Like 2
  • Upvote 4
Link to comment
On 9/29/2018 at 6:55 AM, peter_sm said:

Thanks, fixed for me as well, and I also added this line

add_header Referrer-Policy no-referrer always;

to

appdata/nextcloud/nginx/site-confs/default

 

And now I have a green light

And A+ on the securite check, can this get better ?

//Peter

Can confirm this works a treat!

 

Cheers!

 

Anyone know how i can set local scan/container scan of file system used by nextcloud to update any files i have manually added into smb/explorer?

 

video file added into share - nextcloud web gui shows what i have added

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.