[Support] Linuxserver.io - Nextcloud


Recommended Posts

On 7/15/2020 at 12:33 PM, mwwb said:

I have the exact same issue. Can't seem to find the cause though.. Also assigned 2048M to the memori limit. Could Redis be the cause of this problem?

Hi I also have the same problem.
 

Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158

I already tried to fix it, I manually allocated the 2048 M but it did not change anything.

 

I have found another Error, I don't know if it depends on the other one

Sabre\DAV\Exception: An exception occurred while executing 'UPDATE `oc_file_locks` SET `lock` = `lock` + 1, `ttl` = ? WHERE `key` = ? AND `lock` >= 0' with params [1595517022, "files\/4928438206cae1cd38d56633a8b93eb1"]: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction
/config/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php - line 418:
OCA\DAV\Connector\Sabre\File->convertToSabreException(Doctrine\DBA ... {})
/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 85:
OCA\DAV\Connector\Sabre\File->get()
<<closure>>
Sabre\DAV\CorePlugin->httpGet(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})
/config/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:
call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])
/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:
Sabre\Event\EventEmitter->emit("method:GET", [ Sabre\HTTP ... }])
/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:
Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})
/config/www/nextcloud/apps/dav/lib/Server.php - line 319:
Sabre\DAV\Server->exec()
/config/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:
OCA\DAV\Server->exec()
/config/www/nextcloud/remote.php - line 165:
require_once("/config/www ... p")

 

When I try to upload Files to my server it is very slow since the problem occurred.

 

It is since I updated to 18.0.7. Security & setup warning are all fine, nothing wrong.

Link to comment

Thanks alturismo I will give this a whirl....

 

On 7/24/2020 at 12:46 AM, alturismo said:

sudo -u abc php /config/www/nextcloud/updater/updater.phar

 

Cheers

 

saarg

On 7/24/2020 at 12:53 AM, saarg said:

If you are using a subfolder for the reverse proxy, the webui usually doesn't work.

 

I didn't know that - good thing to know for future

 

Thanks

Link to comment

Well the updater command worked!! Thanks alturismo!!

 

In case others are wondering - this is actually a "fullsome" update since it updates (and disables those apps that can't be upgraded) everything in nextcloud.

 

This is a partial pic of the output:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

root@Tower:~# docker exec -it nextcloud bash
root@21f58053c2fa:/# sudo -u abc php /config/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v16.0.3-3-ga0c2b25 dirty

Current version is 19.0.0.

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

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

Start 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 ......

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 

Much easier and doesn't hang.

 

image.png.2e7cc018396a93ebc2ba44c0fa00f0b4.png

 

Cheers

Link to comment

Is it any way to upload files let say from home using full network speed? My ISP has poor upload speeds, so to move files which i want to nextcloud is taking ages.  I am accessing nextcloud via reverse proxy

Or i need to move files manually to the nextcloud share?

Link to comment
3 minutes ago, J05u said:

Is it any way to upload files let say from home using full network speed? My ISP has poor upload speeds, so to move files which i want to nextcloud is taking ages.  I am accessing nextcloud via reverse proxy

Or i need to move files manually to the nextcloud share?

Use WiFi at home. Then you are not using your ISP. You also have to set the client to only upload using WiFi.

Edited by saarg
Link to comment

Has anyone had success with the TALK app?

If so How?

I can get it to run on the local network. Or at least I could a couple of nextcloud version ago.  I don't think I can get it to run at all now.

Also how do you successfully get talk to work across a WAN connection?

 

Link to comment
On 7/28/2020 at 2:15 PM, Jessie said:

Has anyone had success with the TALK app?

If so How?

I can get it to run on the local network. Or at least I could a couple of nextcloud version ago.  I don't think I can get it to run at all now.

Also how do you successfully get talk to work across a WAN connection?

 

I was wonder also if someone can share some tips about this .I try to configure Stun/Turn server from App store Unraid ,but no luck.

I think we need Spaceinvader One to help us .

 

edit: today i play a bit  again this time for last time in my life with nextcloud talk  this is useless app need 10-15  years more maybe to be useful for Android .Maybe my skills are very bad I don't know.

Edited by Vesko
Link to comment

Hello everybody. I set up nextcloud on my unraid for the firsttime following this tutorial:

 

While initialising nextcloud for the firsttime I always get time outs from nginx

 

This is the log with the time out notices:

 

2020/07/30 05:35:22 [error] 383#383: *4 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.178.20, server: _, request: "GET / HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.178.29:444"
2020/07/30 05:38:25 [error] 383#383: *4 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.178.20, server: _, request: "POST /index.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.178.29:444"
2020/07/30 05:52:39 [error] 383#383: *16 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.178.20, server: _, request: "POST /index.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.178.29:444"

 

Can anybody help?

Link to comment
16 hours ago, 1q8448q1 said:

Hello everybody. I set up nextcloud on my unraid for the firsttime following this tutorial:

 

While initialising nextcloud for the firsttime I always get time outs from nginx

 

This is the log with the time out notices:

 


2020/07/30 05:35:22 [error] 383#383: *4 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.178.20, server: _, request: "GET / HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.178.29:444"
2020/07/30 05:38:25 [error] 383#383: *4 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.178.20, server: _, request: "POST /index.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.178.29:444"
2020/07/30 05:52:39 [error] 383#383: *16 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.178.20, server: _, request: "POST /index.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.178.29:444"

 

Can anybody help?

As often in live :), it turned out the solution was simply to be patient. For reasons unknown to me it worked a couple of hours later.

 

I have another question tough:

What is the best practice to "import" data into the nextcloud user folders locally. Let's say I have some data in a usually Unraid share and I want to move it to a nextcloud user folder, without uploading. What I tried is moving the files with the Unraid console, (mv command) and then initiate a file scan with: 

occ files:scan --all

I execute this command within console that is accessible via a right-click on the nextcloud docker. It actually works. However I still get some errors:

Starting scan for user 1 out of 2 (user1)
Path not found: /user1
Starting scan for user 2 out of 2 (user2)
Home storage for user user2 not writable
Make sure you're running the scan command only as the user the web server runs as
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 271     | 3215  | 00:54:52     |
+---------+-------+--------------+

How can I make sure to run the command as "the user the web server runs as"? I can't seem to figure that out.

 

Also isn't it strange that the command works, finds the folders and files but still says that he could not find user1's home path and can not write to user2's home path. 

Link to comment

I'm using a Cron job using rclones WebDAV remote to copy objects to my nextcloud instance locally.

 

And as it's using a WebDAV connection I don't need to worry about the occ commands or permissions as nextcloud deals with the files directly as if you uploaded them via GUI or web.

 

All my local file changes are synced to UnRAID file shared on my local laptop shutdown, which in turn every hour syncs to nextcloud via a custom Cron container so it'll be available remotely. (They are not edited remotely just viewed) but I can't see any reason why you couldn't sync both ways if needed.

 

Dave

Link to comment

Hi guys, I require some help. I can't get let's encrypt docker to redirect to my NextCloud container as shown in the screenshot as it is stuck in the Let's Encrypt Web UI. I have posted my nextcloud.subdomain.conf and config.php file below for reference. I can't spot the mistake. Let me know if I am doing anything wrong.

 

image.thumb.png.5489f0905ad0f1bd87e54b618918419f.png

 

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => '**********************',
  'passwordsalt' => '************************',
  'secret' => '**************************',
  'trusted_domains' => 
  array (
    0 => '192.168.0.16:444',
    1 => 'nextcloud.protech.my',
  ),
  'dbtype' => 'mysql',
  'version' => '19.0.1.1',
  'trusted_proxies' => ['letsencrypt'],
  'overwrite.cli.url' => 'https://nextcloud.protech.my',
  'overwritehost' => 'nextcloud.protech.my',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.0.16:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '**********',
  'installed' => true,
);
 

# 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;
    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_app nextcloud;
        set $upstream_port 443;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        proxy_max_temp_file_size 2048m;
    }
}
 

 

Edited by Wong
Updated to a latest version
Link to comment
2 hours ago, Wong said:

  'trusted_domains' => 
  array (
    0 => '192.168.0.16:444',
    1 => 'nextcloud.protech.my',
  ),

 

The only thing that is different is my files is that I don't have the port on that first address.  Mine is simply     0 => '192.168.5.105', (my unraid network IP).  A "domain" isn't going to be limited to a specific port, so not sure why it's even in the example file.

 

Everything else is the same in my 2 files.. so it's either that, or something else with how you've configured your dockers.

Edited by Energen
Link to comment
23 minutes ago, Energen said:

Put nextcloud on 443 and try that.

Yeah tried that. Still remain at the Let's Encrypt UI. Could it be I am running on the beta version 25 of Unraid that is causing the problem. Actually, I don't see any thing in the configuration file that is directing to the NextCloud container. Let say if I use port 444 for nextcloud. Do I need to port forward 444 as well?

 

Edit: Port Forward 444 did not work as well.

Edited by Wong
Link to comment

Honestly at this point I'd say your best bet is to delete everything and start over from scratch --- and also do one thing at a time.  Get Nextcloud working properly without using your hostname/dns, and once that is working set it up for the dns name.  Mine worked right away with duckdns but that's not the same type of setup that you're using.    Maybe that's overkill but when in double start fresh ;)

 

What happens when you try to access the page directly with your (external) IP (and port 444 opened on your router) rather than your dns hostname?

 

And looking a little closer, and thinking about this, since I'm not an expert on these config files...

 

Your Nextcloud is sitting on 444, check.

 

You WANT to access it via regular ssl 443, right?  So https://nextcloud.protech.my is the standard ssl port on 443, you DON'T want to access it via port 444 right? ---> https://nextcloud.protech.my:444

 

So actually I think you just need to change set $upstream_port 443; to 444 because that's where the Nextcloud docker container is sitting.

 

Link to comment

 

9 hours ago, Energen said:

What happens when you try to access the page directly with your (external) IP (and port 444 opened on your router) rather than your dns hostname?

So if I port forward 443 -> 444 (NextCloud Container Port). I am able to access the nextcloud login page. But then it kinda defeated the purpose of reverse proxy right.  So that mean my NextCloud is working properly. Only thing is Let's Encrypt would not pass it to my NextCloud Container for some reason when using my subdomain name. What could be the problem ?😂. I am running out of idea.

 

9 hours ago, Energen said:

So actually I think you just need to change set $upstream_port 443; to 444 because that's where the Nextcloud docker container is sitting.

Yeah it make sense theoretically, but then it is still not directing me to NextCloud.

Link to comment

Hi,

 

did someone found a solution for this Error?

Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		36 minutes ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		13 hours ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		a day ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		2 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		2 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		3 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		3 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		4 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		4 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		5 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		5 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		6 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		6 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		7 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		7 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158		8 days ago
Error	PHP	Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) at /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#158

I have it multiple times a day, it's always exactly the same Error.

I already tried to fix it, but I can't figure it out.

 

Can someone help me out? Thank you

Link to comment
6 hours ago, Wong said:

 

So if I port forward 443 -> 444 (NextCloud Container Port). I am able to access the nextcloud login page. But then it kinda defeated the purpose of reverse proxy right.  So that mean my NextCloud is working properly. Only thing is Let's Encrypt would not pass it to my NextCloud Container for some reason when using my subdomain name. What could be the problem ?😂. I am running out of idea.

 

Yeah it make sense theoretically, but then it is still not directing me to NextCloud.

 

So in another thread you said you used cloudfare for dns and it set an A name for the DNS, but what about a CNAME as trurl mentioned?  My understanding that is with only an A name it doesn't matter what subdomain you use (nextcloud.protech.my, unraid.protech.my, pizza.protech.my) with only an A name set all of those domains will redirect to your IP and Lets Encrypt will only see that you are accessing the host IP (root nginx path).  The CNAME tells Lets Encrypt/NGINX that you actually want to access nextcloud, unraid, or pizza and to redirect appropriately.

 

I'm not a DNS expert but that's my understanding of A names and CNAMES, and you said Cloudfare only set an A name for you.

Link to comment
31 minutes ago, Energen said:

 

So in another thread you said you used cloudfare for dns and it set an A name for the DNS, but what about a CNAME as trurl mentioned?  My understanding that is with only an A name it doesn't matter what subdomain you use (nextcloud.protech.my, unraid.protech.my, pizza.protech.my) with only an A name set all of those domains will redirect to your IP and Lets Encrypt will only see that you are accessing the host IP (root nginx path).  The CNAME tells Lets Encrypt/NGINX that you actually want to access nextcloud, unraid, or pizza and to redirect appropriately.

 

I'm not a DNS expert but that's my understanding of A names and CNAMES, and you said Cloudfare only set an A name for you.

Alright thank for the suggestion, I think I get what you trying to say. I will try it and let you know in a few days. Cause I think I reach a limit of certificate from Let's Encrypt from here https://letsencrypt.org/docs/rate-limits/. i pasted the log below for reference. Plus, I also let the CNAME propagate for awhile before I test again to makesure it work. I will update the forum again in a week time. Thanks again for been so helpful.

 

An unexpected error occurred:
There were too many requests of a given type :: Error creating new order :: too many certificates already issued for exact set of domains: *.protech.my,protech.my: see https://letsencrypt.org/docs/rate-limits/

Link to comment
On 8/8/2020 at 8:54 PM, Energen said:

So in another thread you said you used cloudfare for dns and it set an A name for the DNS, but what about a CNAME as trurl mentioned?  My understanding that is with only an A name it doesn't matter what subdomain you use (nextcloud.protech.my, unraid.protech.my, pizza.protech.my) with only an A name set all of those domains will redirect to your IP and Lets Encrypt will only see that you are accessing the host IP (root nginx path).  The CNAME tells Lets Encrypt/NGINX that you actually want to access nextcloud, unraid, or pizza and to redirect appropriately.

 

I'm not a DNS expert but that's my understanding of A names and CNAMES, and you said Cloudfare only set an A name for you.

@Energen So the changes that I have done is by using CloudflareDDNS docker by oznu and connect to my cloudflare account. I key in the domain section protech.my and leave the subdomain empty. Then, my cloudflare account manage to track it my IP with the domain name protech.my with A record. So I added a CNAME "nextcloud" point to protech.my as shown in the screenshot below. I am still stuck at the nginx Web UI. I know my nextcloud docker is working properly. What version of nextcloud r u guys running?

image.thumb.png.4a29c4b64a253c74985fc68dd2d2514b.png

 

If my nextcloud docker is 192.168.0.16:444. Do I need to adjust anything in subdomain.conf file? Do I need to change the listen 443 ssl to 444 ssl? 

 

server {
    listen 443 ssl;   (need to change?)
    listen [::]:443 ssl; (need to change?)

    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_app nextcloud;
        set $upstream_port 443; (need to change? I tried 444 but still not directing me to nextcloud)
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        proxy_max_temp_file_size 2048m;
    }
}

 

Link to comment
6 hours ago, Wong said:

If my nextcloud docker is 192.168.0.16:444. Do I need to adjust anything in subdomain.conf file? Do I need to change the listen 443 ssl to 444 ssl?

I'm not sure where your problem is.  You should probably put nextcloud on 443 like it's supposed to be and see if that works.  I'd also see if you can get nextcloud to work with a dynamic ip service like duckdns.  If that works like it should then you know it's a problem with the cloudfare stuff.

 

I had never used nextcloud, letsencrypt, or reverse proxies and mine worked right away with duckdns so something you are doing is not working right.

  • Like 1
Link to comment
On 8/7/2020 at 7:38 PM, Wong said:

Hi guys, I require some help. I can't get let's encrypt docker to redirect to my NextCloud container as shown in the screenshot as it is stuck in the Let's Encrypt Web UI. I have posted my nextcloud.subdomain.conf and config.php file below for reference. I can't spot the mistake. Let me know if I am doing anything wrong.

 

image.thumb.png.5489f0905ad0f1bd87e54b618918419f.png

 

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => '**********************',
  'passwordsalt' => '************************',
  'secret' => '**************************',
  'trusted_domains' => 
  array (
    0 => '192.168.0.16:444',
    1 => 'nextcloud.protech.my',
  ),
  'dbtype' => 'mysql',
  'version' => '19.0.1.1',
  'trusted_proxies' => ['letsencrypt'],
  'overwrite.cli.url' => 'https://nextcloud.protech.my',
  'overwritehost' => 'nextcloud.protech.my',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.0.16:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '**********',
  'installed' => true,
);
 

# 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;
    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_app nextcloud;
        set $upstream_port 443;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        proxy_max_temp_file_size 2048m;
    }
}
 

 

For What its worth, I have the 2 lines below underneath 'overwriteprotocol' => 'https',

'dbtype' => 'mysql',
  'version' => '19.0.1.1',

Link to comment
On 8/7/2020 at 10:35 PM, Wong said:

@Energen I removed the port and still not working. I attached my nextcloud and letsencrpyt docker configuration screenshot below for reference. It there any problem with my configuration?

image.thumb.png.9e7fc8455330648e622ee8af9d1ae36a.png

image.thumb.png.4253642f7367a3e2f66ba9306a876374.png

image.thumb.png.acb2f783def4cba34b00ad1071c42274.png

To me, this looks ok. I've never used dns validation though.  Is there any reason you can't use http?  What do the letsencrypt logs look like.  Were the certificates generated?  If they were and it still doesn't work then blow the letsencrypt docker away. Remove files and reinstall a fresh one.  Don't know why but it works for me sometimes.

Dont forget to forward ports 443 and 80 in the router. (443ext to 1443 int) and (80ext to 180 int)

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.