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/nextcloudin the browser). trusted_domainsinconfig.phpincludesnc.domain.net.- I have NOT yet set
overwritewebroot,overwritehost,overwriteprotocol, oroverwritecondaddr— 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:
- What is the correct
config.phpconfiguration (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/nextcloudsubfolder to remain physically in place? - Does
occ maintenance:update:htaccessneed to be run after changing these values, and will this survive a DietPi-triggered Nextcloud update, or does it need to be reapplied afterward? - Are there any known NPM-side header settings (
X-Forwarded-Proto,X-Forwarded-Host, etc.) that are required in addition to theconfig.phpchanges for the Federated Cloud ID to resolve correctly? - 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!