# Nextcloud & Nginx Proxy Manager (or changing URL path)

**URL:** <https://dietpi.com/forum/t/nextcloud-nginx-proxy-manager-or-changing-url-path/23061>\
**Category:** General Discussion\
**Tags:** nextcloud\
**Created:** [15 March 2025 22:12 UTC](https://dietpi.com/forum/t/nextcloud-nginx-proxy-manager-or-changing-url-path/23061 "2025-03-15T22:12:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RyoShinzo](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/r/c4cdca/32.png) [@RyoShinzo](https://dietpi.com/forum/u/RyoShinzo)\
**Post date:** [15 March 2025 22:12 UTC](https://dietpi.com/forum/t/nextcloud-nginx-proxy-manager-or-changing-url-path/23061/1 "2025-03-15T22:12:46Z")

</div>

I have DietPi running within a Proxmox VM. I want to use this DietPi installation solely for Nextcloud. Since I’m using Nginx Proxy Manager to access my services (Immich, Home Assistant, etc.) from outside my home, I want to use this for the Nextcloud instance as well.

My problem is that usually, I will simply point incoming requests for any of my subdomains, e.g., immich.domain.tld to Nginx Proxy Manager and then forward it to the relevant server. e.g., 192.168.0.100:2283. But for Nextcloud, I cannot simply use an IP address and a port for the forward address, but I need to include the /nextcloud. I’m not sure how to do this with Nginx Proxy Manager.

So I have two options: Either move Nextcloud to the root path, so I don’t need /nextcloud anymore. Or somehow configure Nginx Proxy Manager to use the sub path /nextcloud.

Is someone able to help me with either of those solutions?

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [15 March 2025 22:56 UTC](https://dietpi.com/forum/t/nextcloud-nginx-proxy-manager-or-changing-url-path/23061/2 "2025-03-15T22:56:26Z")

</div>

Simply use the `custom location` option on a proxy host. That’s it.

---

<div class="post-metadata">

**Author:** ![RyoShinzo](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/r/c4cdca/32.png) [@RyoShinzo](https://dietpi.com/forum/u/RyoShinzo)\
**Post date:** [15 March 2025 23:10 UTC](https://dietpi.com/forum/t/nextcloud-nginx-proxy-manager-or-changing-url-path/23061/3 "2025-03-15T23:10:28Z")

</div>

I thought as much, but I’m not sure how I have to configure the custom location. Could you please provide an example or link to one?

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [16 March 2025 05:49 UTC](https://dietpi.com/forum/t/nextcloud-nginx-proxy-manager-or-changing-url-path/23061/4 "2025-03-16T05:49:31Z")

</div>

Its quite simple. Add the location folder `/nextcloud` and as usual target IP+port

---

<div class="post-metadata">

**Author:** ![RyoShinzo](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/r/c4cdca/32.png) [@RyoShinzo](https://dietpi.com/forum/u/RyoShinzo)\
**Post date:** [16 March 2025 22:25 UTC](https://dietpi.com/forum/t/nextcloud-nginx-proxy-manager-or-changing-url-path/23061/5 "2025-03-16T22:25:36Z")

</div>

Any suggestions as to what I need to change here? I’ve tried various combinations, but either I end up at the default apache2 index.php file, or I get an error.

 ![Screenshot 2025-03-16 232004](https://dietpi.com/forum/uploads/default/original/2X/d/dbc8e401d62335e895a797fc8de73efa8f264c28.jpeg)  
 ![Screenshot 2025-03-16 232304](https://dietpi.com/forum/uploads/default/original/2X/a/ab809a185ac9ba291154efc44335548c559e7ec1.jpeg)

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [17 March 2025 07:31 UTC](https://dietpi.com/forum/t/nextcloud-nginx-proxy-manager-or-changing-url-path/23061/6 "2025-03-17T07:31:55Z")

</div>

On the 2nd scree, don’t add the sub forward hostname

---

<div class="post-metadata">

**Author:** ![RyoShinzo](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/r/c4cdca/32.png) [@RyoShinzo](https://dietpi.com/forum/u/RyoShinzo)\
**Post date:** [17 March 2025 08:02 UTC](https://dietpi.com/forum/t/nextcloud-nginx-proxy-manager-or-changing-url-path/23061/7 "2025-03-17T08:02:30Z")

</div>

Seems like the custom locations are not working as you would expect. I found other people having similar issues on the Nginx Proxy Manager GitHub. Luckily, someone provided a solution that works. So if anyone stumbles upon this issue as well, here is what I did to make it work:

 ![Screenshot 2025-03-17 091159](https://dietpi.com/forum/uploads/default/original/2X/d/dc84a736852297be7f20118747fad4afd3a4e53e.jpeg)

```auto
location = / {
    return 301 /<subpath>/;
}

```

The custom location can be deleted.

Taken from here:

> <https://github.com/NginxProxyManager/nginx-proxy-manager/issues/104#issuecomment-1926689952>
>
> I'd like to have something like
> 
> https://sub.domain.com forward to https://192….168.1.1:8080/sub
> 
> is that currently possible? I can't find a way to achieve it.. I've tried searching issues but i think i'm missing some fundamental vocabulary to find my answer..

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [13 September 2025 08:03 UTC](https://dietpi.com/forum/t/nextcloud-nginx-proxy-manager-or-changing-url-path/23061/8 "2025-09-13T08:03:18Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
