# Enable HTTPS on Nextcloud

**URL:** https://community.umbrel.com/t/enable-https-on-nextcloud/5269
**Category:** General Discussions
**Created:** [December 18, 2021, 12:56am UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269 "2021-12-18T00:56:34Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![kerumirembora](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@kerumirembora](https://community.umbrel.com/u/kerumirembora)
#### Post date: [December 18, 2021, 12:56am UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/1 "2021-12-18T00:56:34Z")

</div>

Hello community.

I’m trying to expose Nextcloud via HTTPS to the internet so I can access it from my mobile and the Windows app in a secure manner. But so far, all I got was blood sweat and tears.

So far, I’ve tried [this in Github](https://github.com/docker-library/docs/blob/master/nextcloud/README.md#using-the-apache-image-behind-a-reverse-proxy-and-auto-configure-server-host-and-protocol) and [this in Nextcloud docs](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html) with Z E R O success.

Is there an easy way/wiki/tutorial on configuring HTTPS on Nextcloud?

Thanks in advance

---

<div class="post-metadata">

### Author: ![jonsyu](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/jonsyu/32/1803_2.png) [@jonsyu](https://community.umbrel.com/u/jonsyu)
#### Post date: [December 18, 2021, 1:40am UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/2 "2021-12-18T01:40:34Z")

</div>

I’ll ping @louneskmt on this - I’m not sure if there’s a way to do this right now since everything is routed over tor, but I personally haven’t tried it yet.

---

<div class="post-metadata">

### Author: ![kerumirembora](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@kerumirembora](https://community.umbrel.com/u/kerumirembora)
#### Post date: [December 18, 2021, 3:00am UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/3 "2021-12-18T03:00:13Z")

</div>

Thanks @jonsyu.

Is it possible to connect both the Android and Windows apps through Tor? Or in a secure manner out of the box?

Or currently Nextcloud is only secure on the internet consuming the web app via Tor?

---

<div class="post-metadata">

### Author: ![kerumirembora](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@kerumirembora](https://community.umbrel.com/u/kerumirembora)
#### Post date: [December 19, 2021, 3:01am UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/4 "2021-12-19T03:01:31Z")

</div>

Ok, I got it.

Solution: Add two new environment variables to the “~/umbrel/apps/nextcloud/docker-compose.yml” file:

- APACHE\_DISABLE\_REWRITE\_IP=1
- TRUSTED\_PROXIES= umbrel ip address(in my case)

Details: [https://github.com/docker-library/docs/blob/master/nextcloud/README.md#using-the-apache-image-behind-a-reverse-proxy-and-auto-configure-server-host-and-protocol](https://github.com/docker-library/docs/blob/master/nextcloud/README.md#using-the-apache-image-behind-a-reverse-proxy-and-auto-configure-server-host-and-protocol)

---

<div class="post-metadata">

### Author: ![jumpnkick](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/jumpnkick/32/2108_2.png) [@jumpnkick](https://community.umbrel.com/u/jumpnkick)
#### Post date: [February 1, 2022, 11:16am UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/5 "2022-02-01T11:16:48Z")

</div>

@kerumirembora I added both lines to “~/umbrel/apps/nextcloud/docker-compose.yml” file, with no luck.  
Still no https on nextcloud.  
That is the only thing I need to do? If the case is not, could you please explain how u got it working step by step (sorry am a noob).  
Thanx!!

---

<div class="post-metadata">

### Author: ![rawlingsta](https://avatars.discourse-cdn.com/v4/letter/r/8edcca/32.png) [@rawlingsta](https://community.umbrel.com/u/rawlingsta)
#### Post date: [February 2, 2022, 12:43am UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/6 "2022-02-02T00:43:36Z")

</div>

Are you able to access it locally on your own LAN over HTTPS? Do you already have SSL certs loaded?

---

<div class="post-metadata">

### Author: ![jumpnkick](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/jumpnkick/32/2108_2.png) [@jumpnkick](https://community.umbrel.com/u/jumpnkick)
#### Post date: [February 2, 2022, 1:47am UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/7 "2022-02-02T01:47:23Z")

</div>

No to both.

---

<div class="post-metadata">

### Author: ![jumpnkick](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/jumpnkick/32/2108_2.png) [@jumpnkick](https://community.umbrel.com/u/jumpnkick)
#### Post date: [February 3, 2022, 10:45pm UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/8 "2022-02-03T22:45:40Z")

</div>

Could somebody write a step by step guide on how to enable HTTPS on Nextcloud please?  
I tried following what this post says, but I can’t seem to get it working.

---

<div class="post-metadata">

### Author: ![viejodrauet](https://avatars.discourse-cdn.com/v4/letter/v/edb3f5/32.png) [@viejodrauet](https://community.umbrel.com/u/viejodrauet)
#### Post date: [April 19, 2023, 3:16am UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/9 "2023-04-19T03:16:45Z")

</div>

Hello! I’m also looking for a solution to this.  
Does anyone have step by steps?

---

<div class="post-metadata">

### Author: ![spa22a](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/spa22a/32/3966_2.png) [@spa22a](https://community.umbrel.com/u/spa22a)
#### Post date: [May 8, 2023, 3:14pm UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/10 "2023-05-08T15:14:06Z")

</div>

Another new user, looking for simple plain english steps.  
Fresh install of Umbrel & Nextcloud, working fine.  
Own domain, routed & working fine.  
Only http.  
Want https.  
Any pointers? Looked in the rest of this forum, but unfortunately no one seems to provide a decent guide for newbies.  
Thanks in advance.

---

<div class="post-metadata">

### Author: ![mcfly.eth](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@mcfly.eth](https://community.umbrel.com/u/mcfly.eth)
#### Post date: [May 20, 2023, 8:11pm UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/11 "2023-05-20T20:11:30Z")

</div>

I second these we please need a step by step guide yall. Is there any security risk apart from MAn in the middle attack with using HTTP?

---

<div class="post-metadata">

### Author: ![mcfly.eth](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@mcfly.eth](https://community.umbrel.com/u/mcfly.eth)
#### Post date: [May 20, 2023, 8:12pm UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/12 "2023-05-20T20:12:10Z")

</div>

how did you access “~/umbrel/apps/nextcloud/docker-compose.yml” file ? Like where is that in Umbrel?

---

<div class="post-metadata">

### Author: ![pgq](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@pgq](https://community.umbrel.com/u/pgq)
#### Post date: [June 25, 2023, 11:36pm UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/13 "2023-06-25T23:36:38Z")

</div>

Same here. using umbrel to manage my nextcloud is not any use if i cant enable https with my new server…

---

<div class="post-metadata">

### Author: ![scattolileo](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@scattolileo](https://community.umbrel.com/u/scattolileo)
#### Post date: [June 26, 2023, 3:37pm UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/14 "2023-06-26T15:37:01Z")

</div>

Maybe you can have a safe route using cloudflare tunnels

---

<div class="post-metadata">

### Author: ![scattolileo](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@scattolileo](https://community.umbrel.com/u/scattolileo)
#### Post date: [June 26, 2023, 5:03pm UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/16 "2023-06-26T17:03:27Z")

</div>

I resigned looking for https problem since almost 2 years ago. At last i gave a suggestion that you can use today. It wasnt my intention to use big techs but its better than nothing in my opinion. Cheers.

---

<div class="post-metadata">

### Author: ![pesz](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@pesz](https://community.umbrel.com/u/pesz)
#### Post date: [August 21, 2023, 11:55am UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/17 "2023-08-21T11:55:27Z")

</div>

really bad that https does not work. therefore impossible to properly use btcpay and nextcloud.

---

<div class="post-metadata">

### Author: ![grbfhkj21](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/grbfhkj21/32/6707_2.png) [@grbfhkj21](https://community.umbrel.com/u/grbfhkj21)
#### Post date: [January 5, 2025, 4:22pm UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/19 "2025-01-05T16:22:09Z")

</div>

( This is ancient but I guess this might be helpful for someone 🙂 )

I was able to enable HTTP using Nginx Proxy Manager, this should work for Nextcloud or any other app.

This is what I did:

1. Got a fixed IP address from my internet provider. (This cost like 1€/month for me).
2. Go to my DNS provider and add A record so _mydomain_ points to my home IP.
3. Access to my home router and make external port 443 point towards internal ip 192.168.0.33 (my umbrel machine), port 40443 (Nginx Proxy Manager listens to 40480 and 40433).
4. Login to my Umbrel and install Nginx Proxy Manager App.
5. Open Nginx Proxy Manager, go to SSL Certificates and add a Let’s Encrypt certificate for _mydomain_. I personally use a DNS challenge, that required to get API access from my DNS provider.
6. In Nginx Proxy Manager, add a Proxy Host. Choose your domain name _mydomain_, scheme: http, Forward Hostname / IP: umbrel.local, Forward Port: 8081. In SSL tab pick your certificate. (I also marked Force SSL and Block common exploits)
7. Test. At this point you should be able to access to _[https://mydomain.com](https://mydomain.com)_ and Nextcloud should tell you “Access through untrusted domain”.
8. Go to Umbrel advanced settings, open terminal for nextcloud app.
9. Simply run ./occ, it will tell you _If running with ‘docker exec’ try adding the option ‘-u XXX’_, where that XXX is the user id.
10. Close this terminal.
11. Again open a terminal, but this time for Umbrel OS. Then:

```auto
$ sudo -i
(type your umbrel password)
# docker ps | grep next | grep apache
(copy container id)
# docker exec -it -u XXX CONTAINER_ID /bin/bash
(Where CONTAINER_ID just comes from the command before, and user id XXX comes from step 9)

(Now you should be inside the nextcloud container with the right user)
$ ./occ config:system:set trusted_domains $(./occ config:system:get trusted_domains | wc -l) --value="mydomain"

```

1. Test, now it should work.

(Notice mydomain should be something like [nextcloud.mydomain.com](http://nextcloud.mydomain.com), but the forum doesn’t want me to post to many “links”)

Hope that was helpful.

---

<div class="post-metadata">

### Author: ![grbfhkj21](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/grbfhkj21/32/6707_2.png) [@grbfhkj21](https://community.umbrel.com/u/grbfhkj21)
#### Post date: [January 7, 2025, 3:42pm UTC](https://community.umbrel.com/t/enable-https-on-nextcloud/5269/20 "2025-01-07T15:42:06Z")

</div>

Alternatively, you can use a Cloudflare Tunnel.  
It seems to work fine with the advantage of not having any port open in your home router. On the other hand, I assume Cloudflare itself can see all your traffic. Also not sure about the limitations of the free Cloudflare plan.

Anyway, you’d need to:

1. Add Cloudflare Tunnel app in Umbrel.
2. Follow steps here: [How to set up Cloudflare Tunnel on your Umbrel · Radiokot/umbrel-cloudflared Wiki · GitHub](https://github.com/Radiokot/umbrel-cloudflared/wiki/How-to-set-up-Cloudflare-Tunnel-on-your-Umbrel)
3. Follow steps 7 to 12 above. That bit is the same.
