# Federated Cloud ID still shows /nextcloud suffix after NginxProxyManager reverse proxy setup

**URL:** https://dietpi.com/forum/t/federated-cloud-id-still-shows-nextcloud-suffix-after-nginxproxymanager-reverse-proxy-setup/25463
**Category:** General Discussion
**Created:** [2 September 2026 07:32 UTC](https://dietpi.com/forum/t/federated-cloud-id-still-shows-nextcloud-suffix-after-nginxproxymanager-reverse-proxy-setup/25463 "2026-09-02T07:32:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![roswitina](https://dietpi.com/forum/user_avatar/dietpi.com/roswitina/32/9162_2.png) [@roswitina](https://dietpi.com/forum/u/roswitina)
#### Post date: [2 September 2026 07:32 UTC](https://dietpi.com/forum/t/federated-cloud-id-still-shows-nextcloud-suffix-after-nginxproxymanager-reverse-proxy-setup/25463/1 "2026-09-02T07:32:47Z")

</div>

Hi all,

I have Nextcloud installed via `dietpi-software` on DietPi. As usual, DietPi installs it into its own subfolder, so locally it’s reachable at:

`http://<dietpi-ip>/nextcloud`

I’m using Nginx Proxy Manager (NPM, running in Docker on a separate/same host) as a reverse proxy to make it accessible externally under a clean subdomain:

`https://nc.domain.net`

The proxy host in NPM forwards to the internal DietPi address including the `/nextcloud` path, and the web UI itself works fine under `nc.domain.net` (login, files, etc. all load correctly).

**The problem:**  
The Federated Cloud ID shown in Nextcloud’s personal settings still includes the internal subfolder, e.g.:

`username@nc.domain.net/nextcloud`

instead of the expected:

`username@nc.domain.net`

This breaks federated sharing with other Nextcloud/ownCloud instances, since the `/nextcloud` suffix is not part of the actual public URL.

**What I’ve checked/tried so far:**

- The web interface itself works correctly under `nc.domain.net` (no visible `/nextcloud` in the browser).
- `trusted_domains` in `config.php` includes `nc.domain.net`.
- I have NOT yet set `overwritewebroot`, `overwritehost`, `overwriteprotocol`, or `overwritecondaddr` — unsure which combination is correct in this exact setup (DietPi’s Apache serving Nextcloud from `/var/www/nextcloud`, with NPM handling SSL termination and the subdomain mapping).

**My questions:**

1. What is the correct `config.php` configuration (`overwritewebroot`, `overwritehost`, `overwriteprotocol`, `trusted_proxies`, `overwritecondaddr`) for a DietPi-managed Nextcloud install sitting behind NPM, given that DietPi’s automated update mechanism (`dietpi-software`) expects the `/nextcloud` subfolder to remain physically in place?
2. Does `occ maintenance:update:htaccess` need to be run after changing these values, and will this survive a DietPi-triggered Nextcloud update, or does it need to be reapplied afterward?
3. Are there any known NPM-side header settings (`X-Forwarded-Proto`, `X-Forwarded-Host`, etc.) that are required in addition to the `config.php` changes for the Federated Cloud ID to resolve correctly?
4. Has anyone solved this exact scenario (DietPi + NPM + subfolder-to-subdomain mapping) without breaking local (non-proxied) access to `<dietpi-ip>/nextcloud`?

**Setup details:**

- DietPi version: v10.6.2
- Nextcloud version: 34.0.3
- NPM version: v2.15.1
- Infrastructure: Proxmox VE host running two separate VMs/LXCs — one for DietPi/Nextcloud, one for Nginx Proxy Manager. Both are on the same local network but communicate as separate hosts (not containers on the same Docker network).
- Access method: NPM (separate VM/LXC) → forwards to DietPi VM’s internal IP on port 80/443 → Apache/Nextcloud

Any pointers to a working `config.php` + NPM configuration would be greatly appreciated. Thanks in advance!

---

<div class="post-metadata">

### Author: ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)
#### Post date: [2 September 2026 10:07 UTC](https://dietpi.com/forum/t/federated-cloud-id-still-shows-nextcloud-suffix-after-nginxproxymanager-reverse-proxy-setup/25463/2 "2026-09-02T10:07:09Z")

</div>

There is an [example config in the Nextcloud docs](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/reverse_proxy_configuration.html#nextcloud-accessible-via-multiple-domains-conditional-overwrite) for your use case, to access it locally (via http) and externally via https.

> If Nextcloud is reachable both directly (HTTP) and through a reverse proxy (HTTPS), or through multiple proxies serving different public domains, use `overwritecondaddr` to apply the overwrite parameters only when requests arrive from a specific proxy IP address.

I found also [this statement in the NC forums](https://help.nextcloud.com/t/federated-cloud-id-is-something-wrong/242944/2)

> The Federated Cloud ID is derived from the `overwrite.cli.url` setting in your Nextcloud config.

So if I understand this correctly, you would need to set ( if DietPi = `192.168.1.20` and NPM = `192.168.1.30`)

```php
'trusted_domains' =>
[
    '192.168.1.20`',
    'nc.domain.net',
],

'trusted_proxies' =>
[
    '192.168.1.30',
],

'overwritehost' => 'nc.domain.net',
'overwriteprotocol' => 'https',
'overwritewebroot' => '/',
'overwrite.cli.url' => 'https://nc.domain.net',
'overwritecondaddr' => '^192\.168\.1\.30$',

```

What does `overwritecondaddr` do?  
So if the request is comming from the NPM-IP the host, protocol, webroot and cli URL is overwritten. But if you wanna also have correct cloud ID when accessed locally, you can not use `overwritecondaddr` (just don’t set it and it will overwrite always).  
If you choose not to set it, you can still access it via dietpi-ip/nextcloud, but every link generated from nextcloud would be then based on `nc.domain.net` and not `dietpi-ip/nextcloud`. I hope this makes sense 🙂

Restart apache and check:

```auto
ncc config:list system

```

Don’t mess with the headers and don’t do `occ maintenance:update:htaccess` ([on dietpi its `ncc` btw](https://dietpi.com/docs/software/cloud/#nextcloud-configuration), `occ` is for owncloud installations)

---

<div class="post-metadata">

### Author: ![roswitina](https://dietpi.com/forum/user_avatar/dietpi.com/roswitina/32/9162_2.png) [@roswitina](https://dietpi.com/forum/u/roswitina)
#### Post date: [2 September 2026 16:15 UTC](https://dietpi.com/forum/t/federated-cloud-id-still-shows-nextcloud-suffix-after-nginxproxymanager-reverse-proxy-setup/25463/3 "2026-09-02T16:15:09Z")

</div>

Thanks for the instructions. I’ll give it a try.
