# Certificate issues with LetsEncryt and Nextcloud

**URL:** <https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587>\
**Category:** ℹ️ Support\
**Tags:** letsencrypt\
**Created:** [April 28, 2020, 2:01pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587 "2020-04-28T14:01:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 2:01pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/1 "2020-04-28T14:01:18Z")

</div>

First off,  
I really want to thank devnull for helping me solve some issues to get my Install accessible from the internet.  
I am extremely grateful.

I now have Nextcloud accessable from the internet but it is not yet secure.

After talking with devnull they suggested I start a new thread with the below details to help diagnosis this.

a.) i use docker for nextcloud  
b.) i use [linuxserver.io](http://linuxserver.io/) certificate  
c.) there is acually no CA for the certifcate (look in browser info)  
d.) post link [https://docs.linuxserver.io/images/docker-letsencrypt](https://docs.linuxserver.io/images/docker-letsencrypt)

If there is any info I can supply to help, please shout.

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [April 28, 2020, 2:33pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/2 "2020-04-28T14:33:03Z")

</div>

> [@daveo132](#):
>
> c.) there is acually no CA for the certifcate (look in browser info)

Just based on that description, it sounds like an intermediate certificate is missing from the chain. Can you confirm if that’s the case?

---

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 2:35pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/3 "2020-04-28T14:35:06Z")

</div>

Hi,  
How would I do that

devnull helped me out with that

---

<div class="post-metadata">

**Author:** ![devnull](https://help.nextcloud.com/user_avatar/help.nextcloud.com/devnull/32/27793_2.png) [@devnull](https://help.nextcloud.com/u/devnull)\
**Post date:** [April 28, 2020, 2:41pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/4 "2020-04-28T14:41:32Z")

</div>

I do not use docker. I think the nextcloud-docker-images includes the linuxserver.io-certificate without the other certificates. Perhaps it is also possible to change it to Lets Encrypt.

Perhaps someone can help with the docker-configuration or post the way for change the certificate in the docker-container. Perhaps it is possible to install “certbot” and use this software.

---

<div class="post-metadata">

**Author:** ![kevdog](https://help.nextcloud.com/letter_avatar/kevdog/32/6_22734026db12803ebb3e059622ac3534.png) [@kevdog](https://help.nextcloud.com/u/kevdog)\
**Post date:** [April 28, 2020, 5:05pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/5 "2020-04-28T17:05:22Z")

</div>

@devnull

If you want to use Let’s Encrypt certs – (which I recommend) – it’s actually pretty easy to do.

You need to install an acme client (certbot or acme.sh or a docker container that runs either certbot or acme). It just depends on what you want to do. I personally just install acme.sh on the docker host and obtain certs that method, however I’m aware many use a docker container. For example one container you could use is: [https://hub.docker.com/r/linuxserver/letsencrypt/](https://hub.docker.com/r/linuxserver/letsencrypt/).

It just depends on you how want to install your certs.

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [April 28, 2020, 5:13pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/6 "2020-04-28T17:13:31Z")

</div>

I’ve seen a few different ways people have enabled (or tried to enable) certbot with Docker. My solution to this was to run a reverse proxy and certbot on the host. I wrote a guide for this type of setup if you want to have a look.

[https://help.nextcloud.com/t/howto-ubuntu-docker-nextcloud-talk-collabora/76430](https://help.nextcloud.com/t/howto-ubuntu-docker-nextcloud-talk-collabora/76430)

> [@daveo132](#):
>
> c.) there is acually no CA for the certifcate (look in browser info)

Can you explain what you mean by this? What are you seeing?

---

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 5:16pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/7 "2020-04-28T17:16:00Z")

</div>

I’m sorry I’ll have to defer to @devnull about that.  
He (she? not sure!) picked it up when helping me get it accessible.

I know my way around a PC but Linux is a little bit beyond me but I am trying to learn.

What I can say is;  
I have nextcloud, mariadb and letscert installed in docker on UnRaid.  
I can access the nextcloud over the web but it isn’t secured.  
I don’t know if there is something up with ports maybe?

---

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 5:20pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/8 "2020-04-28T17:20:15Z")

</div>

I figured a snapshot of my docker might help.  
I don’t think there is any info in here that puts me at risk. All the IPs seem to be internal to my network…  
I hope you’ll tell me if I left something in I didn’t notice!

 ![Capture](https://help.nextcloud.com/uploads/default/original/3X/4/6/46f5eb45d00294e0f1c11dfb3f1bb97a75c6af95.png)

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [April 28, 2020, 5:59pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/9 "2020-04-28T17:59:59Z")

</div>

How are you getting the cert from Let’s Encrypt to Nextcloud? Can you post your NC vhost config?

---

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 6:03pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/10 "2020-04-28T18:03:05Z")

</div>

> [@KarlF12](#):
>
> NC vhost config

I might need to tell me how to find that… 😳

---

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 6:29pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/11 "2020-04-28T18:29:27Z")

</div>

Was it this you were after @KarlF12

```
<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'ocarcswhs8e5',
  'passwordsalt' => 'KradlQc9H9+2t2YjMKJuFQ2su+oQAw',
  'secret' => 'ENU2yii6SDjNIZTF2it/DdsjgGRlRiajZQYbbduGd1/FRvQu',
  'trusted_domains' => 
  array (
    0 => '192.168.1.200:444',
	1 => 'nextcloud. ***********.co.uk',
  ),
  'dbtype' => 'mysql',
  'version' => '18.0.4.2',
  'overwrite.cli.url' => 'https://nextcloud. *************.co.uk',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.200:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'dave',
  'dbpassword' => ' *************',
  'installed' => true,
);
```

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [April 28, 2020, 6:34pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/12 "2020-04-28T18:34:18Z")

</div>

No, that’s your Nextcloud config. I’m talking about your web server virtual host config. This would be Apache running in the Nextcloud container.

You should familiarize yourself with Apache. It will help you a lot long term in dealing with Nextcloud.

---

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 6:36pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/13 "2020-04-28T18:36:07Z")

</div>

right ok, Apache wasn’t mentioned in Spaceinvaderones guide.  
Is it part of the Nextcloud install?

Is so, do I need to go into the terminal and get it that way, or is it within the files for nextcloud on the root?

and I will get on that and read up about it, thanks.

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [April 28, 2020, 6:52pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/14 "2020-04-28T18:52:56Z")

</div>

Ok… I don’t know how someone writes a guide for running a website without mentioning the web server, but I guess that’s beside the point.

So Nextcloud is a website. A web server is what actually “runs” a website. In the Nextcloud Docker container, there is a web server called Apache that is “running” Nextcloud. This is already running on your system.

Apache is what ultimately needs to use the Let’s Encrypt certificate to provide HTTPS for the site.

---

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 6:53pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/15 "2020-04-28T18:53:57Z")

</div>

ok, that makes sense! I’m learning.  
So I just to know which config you need.

---

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 7:01pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/16 "2020-04-28T19:01:47Z")

</div>

So, I just want to make sure I understand.  
Apache is already part of my Nextcloud?

![Capture](https://help.nextcloud.com/uploads/default/original/3X/5/d/5d52990470a561909a435c06b18c914395c06a1d.png)

---

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 7:10pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/17 "2020-04-28T19:10:22Z")

</div>

Is it this one @KarlF12

```
# Section for Apache 2.4 to 2.6
<IfModule mod_authz_core.c>
  Require all denied
</IfModule>
<IfModule mod_access_compat.c>
  Order Allow,Deny
  Deny from all
  Satisfy All
</IfModule>

# Section for Apache 2.2
<IfModule !mod_authz_core.c>
  <IfModule !mod_access_compat.c>
    <IfModule mod_authz_host.c>
      Order Allow,Deny
      Deny from all
    </IfModule>
    Satisfy All
  </IfModule>
</IfModule>

# Section for Apache 2.2 to 2.6
<IfModule mod_autoindex.c>
  IndexIgnore *
</IfModule>

```

EDIT  
Ok I think i might know what I’m looking for now, I just have no idea how to find it…

---

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 7:29pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/18 "2020-04-28T19:29:16Z")

</div>

Ok, I’m sorry.  
I have no idea where to find the config file your after.

Feeling very out of my depth right now but appreciate the help.

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [April 28, 2020, 7:48pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/19 "2020-04-28T19:48:23Z")

</div>

In the container, under /etc/apache2/sites-available is probably where you’ll find the site configs.

Apache needs to use the certificate that’s being pulled by the Let’s Encrypt container. I’m wondering if that’s where this is getting messed up because I don’t see a mount in common between them in your containers. I don’t use unraid so it may just be that I’m not seeing it, but somehow that cert would have to be getting from one container to the other.

But yes, to answer your question, there is a web server running in the Nextcloud container (actually the only “program” being executed, Docker calls it an entrypoint). If you want to see some more about that, you can check out the official image documentation. They have quite a few versions of the Nextcloud image, but the default one uses Apache.

[https://hub.docker.com/\_/nextcloud](https://hub.docker.com/_/nextcloud)

---

<div class="post-metadata">

**Author:** ![daveo132](https://help.nextcloud.com/letter_avatar/daveo132/32/6_22734026db12803ebb3e059622ac3534.png) [@daveo132](https://help.nextcloud.com/u/daveo132)\
**Post date:** [April 28, 2020, 7:58pm UTC](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587/20 "2020-04-28T19:58:02Z")

</div>

Wow, sorry but how to I explore the files inside the docker image?  
Found a few commands to try but they don’t seem to work.

I’m also wondering if something is missing outright.

I’ll be off to bed soon. Far more complicated that I thought. I’m sure the guide didn’t go through any of this but seemed to just ‘work’

The guide I’m talking about is here.

[Next page](https://help.nextcloud.com/t/certificate-issues-with-letsencryt-and-nextcloud/79587.md?page=2)
