[Support] Linuxserver.io - Nextcloud


4834 posts in this topic Last Reply

Recommended Posts

3 hours ago, REllU said:

@skois @whitedwarf

I watched through the Spaceinvadeone's video about setting up reverse proxy, and that indeed confirmed my hunch.

Your modem is required to have NAT Relfection / Hairpinning / loopback, in order for the setup to work properly, and the domain name to be accessed from the same network.

 

I'm a bit upset, as we _just_ bought a new modem to the office, but it's a consumer grade one, so it doesn't have these features.

 

So I'll just have to figure out what kind of a modem we actually need, and how to get everything to work on out network the way we need.

 

Oh well...

 

Have you tried to add the (sub)domain name to your hosts file? (On Windows 10 it's located at "C:\Windows\System32\drivers\etc\hosts")

Link to post
  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Application Name: Nextcloud Application Site: https://nextcloud.com/ Docker Hub: https://hub.docker.com/r/linuxserver/nextcloud/ Github: https://github.com/linuxserver/docker-nextcl

Here's my list of instructions....    Use them at your own risk.....   If upgrading to v12 please see here:   ##Turn on maintenance mode docker exec -it nextcloud occ m

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

Posted Images

26 minutes ago, ICDeadPpl said:

Have you tried to add the (sub)domain name to your hosts file? (On Windows 10 it's located at "C:\Windows\System32\drivers\etc\hosts")

 

I've read about this approach, and if it was just me at the office, that'd probably be fine.

But we have a bunch of PC's in there, and the idea of "hard coding" such a thing into each machine doesn't sound too great.

 

Also, I don't think that'd still help with the issue of trying to get OnlyOffice to sync with UnRaid

Link to post
4 hours ago, blaine07 said:

Would that be related to seeing this in my NC instance today? Looks like AppStore opens and such today though? Also seeing update to 20.0.7; maybe that fixes conundrum?
 
4D090DA9-0228-4E91-8E6D-EAE189402B53.thumb.jpeg.670673956197f4df4c763fda1eb65721.jpeg
01D00D81-ADDA-48FD-A5B0-ADC20FBA1BA8.thumb.jpeg.2a7cb4a070eabfe91db86e4acc9fab04.jpeg

Also, with apps server maybe being broke is it even safe to attempt to update to 20.0.7 today at all? emoji848.png

It seems (at least on my end) that everything is back to normal, so I've disabled the above settings and updated my instance to 20.07 just fine...

Link to post
3 hours ago, gshlomi said:

It seems (at least on my end) that everything is back to normal, so I've disabled the above settings and updated my instance to 20.07 just fine...

Same upgraded to 20.0.7 without incident. Thanks!

Link to post

Im having issues with a nextcloud update that I just did. It tells me "This version of Nextcloud is not compatible with > PHP 7.3. You are currently running 7.4.14." Im really not sure what to do. Can anyone help me?

 

 

EDIT: I finally figured out how to change versions. I tried 20.0.7,20.0.6,20.0.5. I landed on 20.0.4 and im working again.

Edited by Coy
Formatting
Link to post

This might be a simple answer. 

 

I'm getting this warning in my nextcloud instance. Where do I need to add this in the swag proxy.conf or in the nextcloud conf?

 

The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. 

Link to post
On 2/3/2021 at 3:17 PM, Coy said:

Im having issues with a nextcloud update that I just did. It tells me "This version of Nextcloud is not compatible with > PHP 7.3. You are currently running 7.4.14." Im really not sure what to do. Can anyone help me?

 

 

EDIT: I finally figured out how to change versions. I tried 20.0.7,20.0.6,20.0.5. I landed on 20.0.4 and im working again.

Boom, Bob's your uncle. Thank you for this!

Link to post
On 2/4/2021 at 4:48 PM, gacpac said:

This might be a simple answer. 

 

I'm getting this warning in my nextcloud instance. Where do I need to add this in the swag proxy.conf or in the nextcloud conf?

 

The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. 

Stop nextcloud and letsencrypt

go and edit nextcloud.subdomain.conf

and under line 

include /config/nginx/ssl.conf;

add this line 

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

Edited by Danuel
Link to post

I had a server crash and now my NC seems to not get connected to database. 

","app":"remote","method":"GET","url":"/status.php","message":{"Exception":"Doctrine\\DBAL\\DBALException","Message":"Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Host is unreachable","Code":0,

 

Anyone knows how to fix this? The config and data volumes look to be fine. I have no idea why can't it reach the mariadb...

Link to post
14 hours ago, KrisMin said:

I had a server crash and now my NC seems to not get connected to database. 


","app":"remote","method":"GET","url":"/status.php","message":{"Exception":"Doctrine\\DBAL\\DBALException","Message":"Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Host is unreachable","Code":0,

 

Anyone knows how to fix this? The config and data volumes look to be fine. I have no idea why can't it reach the mariadb...

OK, that was an issue with subnet availability.  For some reason the NC could not connect to the database when pointed the database IP and port to it. When I joined the same bridge as the mariadb, the issue disappeared. 

As far as i know this should not be happening, but it somehow did.

Link to post

How do I reset my admin/user password via the terminal?

 

I had v16 and couldn't access it via the webUI cause of the PHP issue. I was able to update it to v17.0.0.1 and would like to continue to update it via the webUI. But now, when I try to login, it says my username/password is incorrect (even though I know it's right since I used it not too long ago). Thanks!

Link to post
On 2/5/2021 at 2:36 PM, Danuel said:

Stop nextcloud and letsencrypt

go and edit nextcloud.subdomain.conf

and under line 

include /config/nginx/ssl.conf;

add this line 

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

Thank you Sr! i rebooted the swag container to make it work. Just out of curiosity, what does this setting do? because if you go to a website https://hstspreload.org/ to check it, it says that is not possible because is a subdomain and all that stuff. 

Edited by gacpac
Link to post
49 minutes ago, gacpac said:

Thank you Sr! i rebooted the swag container to make it work. Just out of curiosity, what does this setting do? because if you go to a website https://hstspreload.org/ to check it, it says that is not possible because is a subdomain and all that stuff. 

that setting was regarding HSTS (HTTP) which is a web security policy, if you search on google HSTS you will find more information.

 

Link to post

Hello All,

 

So I have the same issue with 7.4 not compatible with 7.3, but i'm running a pretty old version of NC. It's run like a champ without any interference from me, so i've generally left it alone and updated the build as available.... but i digress. Please see below steps i've taken and if there is any hope to salvage my NextCloud.  i'm not well versed on linux containers/commands, but i am trying to read and follow others examples. 

 

 

root@fea7f36c9a57:/# updater.phar
Nextcloud Updater - version: v15.0.7-4-ged74b90

Current version is 15.0.12.

Update to Nextcloud 15.0.12 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-15.0.12.zip

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Continue update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
This version of Nextcloud is not compatible with > PHP 7.3.<br/>You are currently running 7.4.15.
Keep maintenance mode active? [y/N] y
Maintenance mode kept active
root@fea7f36c9a57:/# 

 

 

 

 

Link to post
On 2/3/2021 at 9:17 PM, Coy said:

Im having issues with a nextcloud update that I just did. It tells me "This version of Nextcloud is not compatible with > PHP 7.3. You are currently running 7.4.14." Im really not sure what to do. Can anyone help me?

 

 

EDIT: I finally figured out how to change versions. I tried 20.0.7,20.0.6,20.0.5. I landed on 20.0.4 and im working again.

 

I had the same problem.

 

If anyone else needs a fix for now, edit the docker container and change the repository to linuxserver/nextcloud:20.0.2-ls107, this has got my Nextcloud working again.

Link to post

Hi All, 

 

I'm trying to get my nextcloud container setup for use with reverse proxy + duck dns. I've followed SpaceInvaderOne's video tutorial but I'm running into a curious issue where the reverse proxy doesn't seem to be able to access the container correctly; it simply pulls up swag's default 'Welcome to our server' message. I have Sonarr and Radarr setup via a similar means and those are working correctly without issue. I'm not sure if I have a misconfiguration in my config.php file or what the issue might be. Not seeing anything in the logs for either nextcloud or swag. Hoping someone has run into something similar and can point me in the right direction. 

 

Thanks

 

unknown.png.5ac3df692c2b1a592a964f377d660250.png

 

1885964519_Screenshot2021-02-08211743.png.b20c9a9eacea379a26ec8f0f6e98ec99.png

 

 

Link to post

Looks like your overwrite.cli.url might be wrong. 

 

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'something',
  'passwordsalt' => 'klsjsadhflkasjdhflakshf',
  'secret' => 'lkashdjflaskjhdflakshdflka',
  'trusted_domains' => 
  array (
    0 => '192.168.1.151:444',
    1 => 'something.something.duckdns.org',
  ),
  'dbtype' => 'mysql',
  'version' => '20.0.7.1',
  'overwrite.cli.url' => 'https://something.something.duckdns.org:443',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.151:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_admin',
  'dbpassword' => 'klasdhgflkashflashf',
  'installed' => true,
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' => 
  array (
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
  'mail_from_address' => 'myuser',
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'mail.server.ca',
  'mail_smtpport' => '25',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'server.ca',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'updater.release.channel' => 'stable',
  'has_rebuilt_cache' => true,
  'app_install_overwrite' => 
  array (
    0 => 'passman',
  ),
);

 

Subdomain conf:

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

    #HTTP Strict Transport Security for NextCloud
    add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
    server_name cloud.*;

    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 192.168.1.151;
        proxy_max_temp_file_size 2048m;
        proxy_pass https://$upstream_nextcloud:444;
    }
}

 

Note I use the static ip of my server not the internal docker names or IPs, I find those rarely work. 

 

Then you make sure that in your nginx.conf the following line...

include /config/nginx/site-confs/*;

...is not commented.

Edited by exist2resist
HTTP STS
Link to post
11 hours ago, exist2resist said:

Actually there is a file you need to purge as per their github.

image.png.1a40d88c02df825e5d4cb64cad00bbb0.png

 

 

Not after every update. There is a date on top of the file so you can check it yours is up to date or not. We might also have added a check that outputs any outdated files in the log. Not sure if we added it to nextcloud or its only in swag.

Link to post

I believe that my upgrade broke something with the Photo viewer and I am getting error 404 for previews. 

The photo tab intermittently displays the photos. I tried all kinds of occ commands. 

 

What table do I look in to find fileID and corresponding file loaction?

Also can someone shine some light on how to clear the file cache and the file cache table, is this recommended?

Screenshot 2021-02-10 191146.png

Edited by exist2resist
Add pic
Link to post
17 hours ago, exist2resist said:

I believe that my upgrade broke something with the Photo viewer and I am getting error 404 for previews. 

The photo tab intermittently displays the photos. I tried all kinds of occ commands. 

 

What table do I look in to find fileID and corresponding file loaction?

Also can someone shine some light on how to clear the file cache and the file cache table, is this recommended?

Screenshot 2021-02-10 191146.png

Try first to do this

Right click on the docker and select console

 

"occ preview:repair"

"occ preview:delete_old"

"occ preview:generate-all"

 

This might fix it
 

Link to post
5 hours ago, skois said:

Try first to do this

Right click on the docker and select console

 

"occ preview:repair"

"occ preview:delete_old"

"occ preview:generate-all"

 

This might fix it
 

It was the preview folder and database file locations that didn't add up. 

I purged the appdata_xxxxxxxxx/preview folder, ran file scan and regenerated the previews from scratch.

Ran a bunch of occ repairs on the file system, database stuff, etc. 

 

Realistically I just need to migrate to a new and clean instance. 

All these upgrades from version 15 left too much stuff behind. 

 

 

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