[Support] Linuxserver.io - Nextcloud


Recommended Posts

On 10/21/2019 at 9:29 PM, studentgrant said:

Hi there, just after setting this up and I'm receiving the following error message when I access the web GUI: "This version of Nextcloud is not compatible with PHP 7.2.
You are currently running 7.3.10".

 

I'm running Version: 6.7.2 of unraid and followed space invaders installation video.. any assistance would be appreciated.

At one point you have imstalled nextcloud and when you installed it again now, it picks up the old version. Nextcloud is installed in appdata, so if you didn't use a fresh folder for nextclouds appdata, you will not get the latest version.

Link to comment
@blaine07 Go to Unraids web ui, click the docker tab, left click the nextcloud icon and select "console" and type the following
nano /config/nginx/site-confs/default 

Thats the file I modified.



Yep just broke something. Trying to figure out how to undo what I evidently did. All I did was take hash away and space it back but ugh. Facepalm

27e16c37a8a062d8a913d2b4cc22dafd.jpg
Link to comment
42 minutes ago, blaine07 said:

If youd feel inclined to glance it over, here is my site-confs/default file

 

https://pastebin.com/TCnB7dHa

 

Spot my idiocracy? Sigh 😞

Oh FFS Facepalm.

 

Admittance: first time I have used nano.

 

Pros: learn something new every day

 

Cons: thought I had it all wrecked.

 

So, I was editing file correct, and hitting Control-O to save... and every time somehow it was saving a new file rather than saving edited file as original filename.

 

Crisis Adverted at the expense of my learning. As they say..."Now you know...!"

 

So, in Nextcloud I am down to these two errors now:

 

-The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation.

 

-SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend. This is particularly recommended when using the desktop client for file synchronisation. To migrate to another database use the command line tool: 'occ db:convert-type', or see the documentation ↗.

 

Not particularly worreid about using SWLite for backed; small operation just used for me. Maybe one day I'll figure this out but I fear converting will be more undertaking than I am ready for at moment.

 

I have read some stuff about first error but found nothing definitive. Im sure though, as error above, it's likely just a line commented in/out that should or should not be.

 

 

Link to comment

Has anyone gotten Nextcloud and ONLYOFFICE to work on UnRaid? If so how did you do it? 

Nextcloud using lets encrypt reverse proxy works great.

ONLYOFFICE Docserver serves up welcome page...

 

Linking Nextcloud to ONLYOFFFICE seems to be about as easy as finding a unicorn....

 

@SpaceInvaderOne any input on this? Have you ventured into this territory or know of anyone who has who may help shine some light on this?

Edited by Smooth Beaver
Tagged space invader.
Link to comment

To sum up the last few posts from @bastl and a few others..

If you used the directions from @SpaceInvaderOne on how to setup Nextcloud using letsencrypt reverse proxy and get these issues:

1017717429_ScreenShot2019-10-23at11_35_20AM.thumb.png.717118613f61e6f4cd7fe45f58f945b2.png

 

Go to the Dockers tab click the Nextcloud docker icon then click >_ Console, You are NOT editing the letsencrypt docker.

 

1521443405_ScreenShot2019-10-23at11_50_55AM.thumb.png.0ecd57d5c454b7be112806414bae73d3.png

 

Now type or copy & paste:

nano /config/nginx/site-confs/default

You will need to enter two lines to solve those issues.

Note: for some installs these lines may already be in place but are commented out by using the # simply remove the # in front of those lines, there is no need to add them again, and close nano saving the file.

add_header X-Frame-Options "SAMEORIGIN";
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";

When you are done it will look like this:

Note: The order does not matter.

 

1458224679_ScreenShot2019-10-23at11_47_01AM.thumb.png.6367c490e80c9f3f0d32e496f067f6f8.png

 

Once those lines are added close nano using ctrl + x. You can now also close the console window.

Now click the Nextcloud docker icon, and click restart. You can now login to Nextcloud and should find everything is now checking out...

 

1481841998_ScreenShot2019-10-23at11_41_29AM.thumb.png.d0ae1f1eb56ba60e5c6df3618d19e784.png

 

 

  • Like 1
  • Thanks 1
Link to comment

Sharing some interesting notes

 

Today my nextcloud docker auto updated like it does..

I have version 16.05 installed have not been prompted for 17 that's ok.

I have collabora installed and that's up to date.

When to edit a document and it would not connect to open the document.

Check the nextcloud logs and found and error when it tried to connect to collabora  that read something like below

GET https://co.la.org/hosting/discovery server response error "502 Bad Gateway"

Which was odd because i could reach everything behind the LE proxy.

To the googles I go and find several entries about bad gateways but none of them apply to my setup except one.

This person uses almost the same setup with a vm and docker install.  They find out that they pgp keys are expired and that she need to get a new cert from LE.

I Think hmmm... I've checked everything and its ok,  I will try that, get a updated cert and boom collabora starts  to work.

 

Crazy HUH?

 

(might not be PGP but something to that effect)

Link to comment
7 hours ago, Smooth Beaver said:

To sum up the last few posts from @bastl and a few others..

If you used the directions from @SpaceInvaderOne on how to setup Nextcloud using letsencrypt reverse proxy and get these issues:

1017717429_ScreenShot2019-10-23at11_35_20AM.thumb.png.717118613f61e6f4cd7fe45f58f945b2.png

 

Go to the Dockers tab click the Nextcloud docker icon then click >_ Console, You are NOT editing the letsencrypt docker.

 

1521443405_ScreenShot2019-10-23at11_50_55AM.thumb.png.0ecd57d5c454b7be112806414bae73d3.png

 

Now type or copy & paste:


nano /config/nginx/site-confs/default

You will need to enter two lines to solve those issues.

Note: for some installs these lines may already be in place but are commented out by using the # simply remove the # in front of those lines, there is no need to add them again, and close nano saving the file.


add_header X-Frame-Options "SAMEORIGIN";
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";

When you are done it will look like this:

Note: The order does not matter.

 

1458224679_ScreenShot2019-10-23at11_47_01AM.thumb.png.6367c490e80c9f3f0d32e496f067f6f8.png

 

Once those lines are added close nano using ctrl + x. You can now also close the console window.

Now click the Nextcloud docker icon, and click restart. You can now login to Nextcloud and should find everything is now checking out...

 

1481841998_ScreenShot2019-10-23at11_41_29AM.thumb.png.d0ae1f1eb56ba60e5c6df3618d19e784.png

 

 

I followed this exactly and was unable to login to Nextcloud afterwards using my browser.   So I went back and took the lines out and still was not able to login.  Multiple docker restarts and finally a server reboot.  Still cannot login.  Any ideas?

Link to comment
2 minutes ago, ur6969 said:

I followed this exactly and was unable to login to Nextcloud afterwards using my browser.   So I went back and took the lines out and still was not able to login.  Multiple docker restarts and finally a server reboot.  Still cannot login.  Any ideas?

What errors are you seeing? Are you seeing the login page but simply cannot login or are you getting the Nginx bad gateway page....

I first did this on my test server and it worked fine, so I then proceeded to do it to my production server with favorable results....

Link to comment
Just now, Smooth Beaver said:

What errors are you seeing? Are you seeing the login page but simply cannot login or are you getting the Nginx bad gateway page....

I first did this on my test server and it worked fine, so I then proceeded to do it to my production server with favorable results....

I have a shortcut on my browser bar to: https://192.168.1.2XX:XXX/login   (XXX for some privacy)

 

I logged into the Admin account BEFORE changing anything.  Worked fine.  Added both lines and then unable to login.  Deleted both and unable.  Finally a server restart, still unable.

 

I get an "Unable to connect" error.  Specifically, "Firefox can't establish a connection to the server at 192.168.1.2XX:XXX.

Link to comment
1 minute ago, ur6969 said:

I have a shortcut on my browser bar to: https://192.168.1.2XX:XXX/login   (XXX for some privacy)

 

I logged into the Admin account BEFORE changing anything.  Worked fine.  Added both lines and then unable to login.  Deleted both and unable.  Finally a server restart, still unable.

 

I get an "Unable to connect" error.  Specifically, "Firefox can't establish a connection to the server at 192.168.1.2XX:XXX.

When I restart my Nextcloud docker even though it says its started it takes a little while after for it to actually fully load and I am able to login. I guess maybe 15-20 seconds of so after the GUI shows it started... are your dockers set to autostart?

Link to comment
Just now, Smooth Beaver said:

When I restart my Nextcloud docker even though it says its started it takes a little while after for it to actually fully load and I am able to login. I guess maybe 15-20 seconds of so after the GUI shows it started... are your dockers set to autostart?

Same.  Yes to Autostart.  They've been running for 19 minutes now and no luck.

 

FWIW I am NOT running the LetsEncrypt or anything.  Just doing a local sync.  I wanted to add

add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";

just to clean up the security setting page.

Link to comment
2 minutes ago, ur6969 said:

Same.  Yes to Autostart.  They've been running for 19 minutes now and no luck.

 

FWIW I am NOT running the LetsEncrypt or anything.  Just doing a local sync.  I wanted to add


add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";

just to clean up the security setting page.

Are you running this on a subdomain? or a subfolder or neither?

Change that line to this:

add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload";

 

Link to comment
9 minutes ago, Smooth Beaver said:

Are you running this on a subdomain? or a subfolder or neither?

Change that line to this:


add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload";

 

I removed that.  Here is what I have now in that section

 

}
server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name _;
    ssl_certificate /config/keys/cert.crt;
    ssl_certificate_key /config/keys/cert.key;
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;
    add_header Referrer-Policy no-referrer;
    fastcgi_hide_header X-Powered-By;
    root /config/www/nextcloud/;
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;

Link to comment
Just now, ur6969 said:

I removed that.  Here is what I have now in that section

 

}
server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name _;
    ssl_certificate /config/keys/cert.crt;
    ssl_certificate_key /config/keys/cert.key;
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;
    add_header Referrer-Policy no-referrer;
    fastcgi_hide_header X-Powered-By;
    root /config/www/nextcloud/;
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;

Clear your browsers cache or use a different browser...

Link to comment
5 minutes ago, ur6969 said:

I removed that.  Here is what I have now in that section

 

}
server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name _;
    ssl_certificate /config/keys/cert.crt;
    ssl_certificate_key /config/keys/cert.key;
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;
    add_header Referrer-Policy no-referrer;
    fastcgi_hide_header X-Powered-By;
    root /config/www/nextcloud/;
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;

Here is mine for you to compare: I am not sure it will be the same as I am running letsencrypt as a reverse proxy

 

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name _;
    ssl_certificate /config/keys/cert.crt;
    ssl_certificate_key /config/keys/cert.key;
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;
    add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
    add_header Referrer-Policy no-referrer;
    add_header X-Frame-Options "SAMEORIGIN";
    fastcgi_hide_header X-Powered-By;
    root /config/www/nextcloud/;
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

 

Link to comment

From what I can tell it's the same, just missing the two options I added and then deleted.  Is there any harm in posting the whole thing?

 

I do the Spaceinvader Appdata backup of the folder and flashdrive, would last night's file be in there to grab or compare?

 

I appreciate the help.

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.