An ownCloud redirect loop almost always means the URL your browser uses does not match the URL ownCloud thinks it is serving. The disagreement can be the protocol (http versus https), hostname, port, or webroot path. Behind a reverse proxy, correct the forwarded headers, explicitly trust the proxy, and use ownCloud’s overwrite settings only where automatic detection cannot work.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Diagnose the first changing part of the redirect chain before editing configuration. Then change one URL dimension, clear cached redirects, and verify the complete response sequence.
As an Amazon Associate I earn from qualifying purchases.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →What an ownCloud redirect loop means
Each HTTP response can contain a Location header telling the browser where to go next. A loop occurs when those destinations cycle instead of reaching the login page or a file. Typical cycles look like:
https://cloud.example.comredirects tohttp://cloud.example.com, which redirects back to HTTPS.https://cloud.example.comredirects tohttps://internal-host, then back to the public hostname.https://cloud.example.comredirects to a non-default port and then loses that port.https://cloud.example.com/owncloudalternates withhttps://cloud.example.com/.- The login page sends you to another hostname, where ownCloud starts a new login request.
ownCloud builds absolute URLs from the request information it receives. A reverse proxy may terminate TLS and connect to ownCloud over plain HTTP; unless the proxy and ownCloud agree that the public request was HTTPS, ownCloud can generate an HTTP redirect. The same problem occurs when the proxy hides the public host, changes the port, or mounts the application under a different path.
#1 Best Overall
- Entry-level NAS Personal Storage:UGREEN NAS DH2300 is your first and best NAS made easy. It is designed for beginners who want a simple, private way to store videos, photos and personal files, which is intuitive for users moving from cloud storage or external drives and move away from scattered date across devices. This entry-level NAS 2-bay perfect for personal entertainment, photo storage, and easy data backup (doesn't support Docker or virtual machines).
- Set Your Devices Free, Expand Your Digital World: This unified storage hub supports massive capacity up to 64TB.*Storage drives not included. Stop Deleting, Start Storing. You can store 22 million 3MB images, or 2 million 30MB songs, or 43K 1.5GB movies or 67 million 1MB documents! UGREEN NAS is a better way to free up storage across all your devices such as phones, computers, tablets and also does automatic backups across devices regardless of the operating system—Window, iOS, Android or macOS.
- The Smarter Long-term Way to Store: Unlike cloud storage with recurring monthly fees, a UGREEN NAS enclosure requires only a one-time purchase for long-term use. For example, you only need to pay $459.98 for a NAS, while for cloud storage, you need to pay $719.88 per year, $2,159.64 for 3 years, $3,599.40 for 5 years. You will save $6,738.82 over 10 years with UGREEN NAS! *NAS cost based on DH2300 + 12TB HDD; cloud cost based on 12TB plan (e.g. $59.99/month).
- Blazing Speed, Minimal Power: Equipped with a high-performance processor, 1GbE port, and 4GB RAM on Board, this NAS handles multiple tasks with ease. File transfers reach up to 125MB/s—a 1GB file takes only 8 seconds. Don't let slow clouds hold you back; they often need over 100 seconds for the same task. The difference is clear.
- Let AI Better Organize Your Memories: UGREEN NAS uses AI to tag faces, locations, texts, and objects—so you can effortlessly find any photo by searching for who or what's in it in seconds. It also automatically finds and deletes similar or duplicate photo, backs up live photos and allows you to share them with your friends or family with just one tap. Everything stays effortlessly organized, powered by intelligent tagging and recognition.
| URL dimension | What must agree | Typical symptom |
|---|---|---|
| Scheme | Public http/https, TLS termination state, and forwarded protocol |
HTTP and HTTPS alternate indefinitely |
| Host | Hostname users enter, proxy Host header, ownCloud overwrite value |
Public and internal names alternate |
| Port | External port, forwarded host including port, and canonical redirect rules | Redirects add or remove a port |
| Webroot | Public path and proxy path mapping | /owncloud is repeatedly added or removed |
Identify the exact loop before changing settings
Use a header-only request
Run a request against the URL that users actually enter and preserve every redirect:
curl -I -L https://cloud.example.com/
Replace the example with your real public URL. Read every Location value in order. The first place where scheme, host, port, or path changes is the dimension to investigate. If the command appears to hang, stop it and repeat without -L so you can inspect one response at a time:
Free tools Windows power users keep installed
One-click scans. No signup required.
curl -I https://cloud.example.com/
Do not infer the cause from the browser error alone. A browser can retain a cached permanent redirect after you have fixed the server.
Inspect the browser Network panel
Open Developer Tools, select the Network tab, enable preservation of the log, and load the public URL in a private window. Select each 3xx response and record its status code and Location header. Compare the first request with the URL in the address bar. An alternation between two destinations points to canonicalization rules; a growing path usually indicates a webroot mapping error.
Clear cached redirects only after recording them
Use a private window for every test. If a normal window still loops after the server is corrected, clear that site’s cached data or test from another browser. This prevents an old 301 response from hiding whether the configuration change worked.
Rank #2
- 【Advanced Home Data & Media Hub】For advanced home users who need phone backup, file storage, and centralized data management. Centralize family photos, 4K videos, movies, computer backups, and personal files in one place while running multiple apps for home entertainment and everyday data management. Suitable for households with growing digital libraries and multiple NAS use cases.
- 【Built for Creators, Media Servers & Advanced Apps】Powered by the Intel N100 Quad-Core CPU, 8GB DDR5 RAM, 2.5GbE networking, and dual M.2 NVMe slots, DXP2800 handles large files and heavier workloads with ease. Run Docker, virtual machines, and media server applications compatible with Plex—ideal for content creators, tech enthusiasts, and advanced home users managing 4K videos, RAW photos, personal media libraries, and multiple NAS apps.
- 【Up to 80TB for Growing Digital Libraries】 Supports up to 80TB of storage using two HDD bays and two M.2 NVMe SSD slots for family photos, movies, RAW photos, 4K videos, work files, and device backups. AI photo management supports recognition of people, objects, scenes, and locations, album organization, and duplicate photo detection. HDDs and SSDs are not included.
- 【AI-powered Home Surveillance】Turn DXP2800 into a centralized home surveillance hub by connecting compatible network cameras and storing recordings locally on your NAS. AI-powered features include Face Recognition, People Detection, and Pet Detection, helping advanced home users review important events more efficiently while managing home surveillance and personal data in one place.
- 【One data Center Across Your Devices】Keep files from desktops, laptops, phones, tablets, and other devices together instead of scattered across cloud accounts and external drives. Access, back up, organize, and share data across Windows, macOS, Android, iOS, web browsers, and compatible smart TVs—ideal for creators and advanced home users working across multiple devices.
Back up the configuration and establish the public URL
Before editing, copy config/config.php and write down the exact public URL, including a non-default port or subdirectory. Also note whether TLS terminates at the reverse proxy or at the ownCloud web server. The correct values depend on what users enter, not on the private address between proxy and backend.
Every hostname or IP address used to access ownCloud must be listed in trusted_domains. Include the public DNS name and any administrative IP or alternate name that is genuinely used. Do not add an arbitrary wildcard or an entire network just to suppress an error; an over-broad list weakens host validation.
Set the reverse-proxy trust and canonical URL
Reference configuration
Use the following pattern only after replacing each value with the values in your deployment:
// config/config.php
$CONFIG = [
'trusted_proxies' => ['10.0.0.10'],
'trusted_domains' => ['cloud.example.com'],
'overwritehost' => 'cloud.example.com',
'overwriteprotocol' => 'https',
'overwritewebroot' => '/owncloud',
'overwrite.cli.url' => 'https://cloud.example.com/owncloud',
];
trusted_proxies must contain only the proxy addresses that ownCloud is meant to trust. ownCloud’s Server Administration Manual warns that incorrect forwarded-header settings can let clients spoof their apparent IP. Do not place an arbitrary subnet in this setting. If several controlled proxies can reach the backend, list those specific addresses.
What each overwrite option controls
overwritehost: the externally visible hostname, with the external port when that port is not the default. Set it when the backend sees an internal name or the wrong port.overwriteprotocol: the public scheme, normallyhttpswhen TLS ends at the proxy. Set it when ownCloud sees an HTTP backend connection despite an HTTPS browser request.overwritewebroot: the path users see, such as/owncloud. Set it when the proxy publishes ownCloud below a subdirectory and automatic detection fails.overwrite.cli.url: the complete base URL used by cron and links generated byocc. A wrong value can send users to another domain and prompt another login.
Do not set a value merely because it appears in an example. A root deployment should not be given /owncloud, and a site that is genuinely HTTP should not be forced to HTTPS. Change only the option corresponding to the dimension you identified.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Rank #3
- Value NAS with RAID for centralized storage and backup for all your devices. Check out the LS 700 for enhanced features, cloud capabilities, macOS 26, and up to 7x faster performance than the LS 200.
- Connect the LinkStation to your router and enjoy shared network storage for your devices. The NAS is compatible with Windows and macOS*, and Buffalo's US-based support is on-hand 24/7 for installation walkthroughs. *Only for macOS 15 (Sequoia) and earlier. For macOS 26, check out our LS 700 series.
- Subscription-Free Personal Cloud – Store, back up, and manage all your videos, music, and photos and access them anytime without paying any monthly fees.
- Storage Purpose-Built for Data Security – A NAS designed to keep your data safe, the LS200 features a closed system to reduce vulnerabilities from 3rd party apps and SSL encryption for secure file transfers.
- Back Up Multiple Computers & Devices – NAS Navigator management utility and PC backup software included. NAS Navigator 2 for macOS 15 and earlier. You can set up automated backups of data on your computers.
Use conditional overwrites when multiple entry points exist
If only requests arriving from one proxy should receive an overwrite, use overwritecondaddr with a regular expression matching that proxy’s address. This is safer than forcing the same public URL on direct administrative access or on a second, differently configured proxy. The condition must match the actual source address ownCloud sees.
Fix an HTTP/HTTPS alternation
When TLS terminates at a reverse proxy
- Confirm that the browser connects to the proxy with HTTPS.
- Confirm that the proxy forwards the original public host and a forwarded protocol value indicating HTTPS. The relevant information is usually the
HostandX-Forwarded-Proto(or equivalent standardized forwarded protocol) header. - Ensure the proxy address is in
trusted_proxies, and setoverwriteprotocoltohttpsif automatic detection still sees HTTP. - Remove any second HTTP-to-HTTPS rule that conflicts with the proxy’s canonical redirect. There should be one authoritative scheme decision.
- Repeat the header request and verify that the first HTTPS request no longer returns a Location pointing to HTTP.
If TLS terminates directly on the ownCloud web server, the backend should receive the real HTTPS request and normally does not need a protocol overwrite. Forcing https in that case can conceal a different proxy or virtual-host error, so verify the termination point first.
Check for conflicting scheme rules
A proxy may redirect HTTP to HTTPS while an Apache or Nginx virtual host behind it redirects what it believes is HTTP back to another address. Keep one canonical rule at the edge and make sure the backend receives a trustworthy indication of the original scheme. Do not stack independent HTTP-to-HTTPS rules in the proxy, web server, and application without checking how each one interprets forwarded headers.
Fix hostname or port alternation
- List every hostname and port in the recorded
Locationchain. - Choose the single public host and port that users should enter.
- Configure the proxy to pass that public
Host, including the port when it is non-default. - Set
overwritehostto the same external host and port if ownCloud cannot reliably detect it. - Remove a competing canonical redirect in another virtual host, load balancer, or proxy layer.
- Add the exact public hostname (and any genuinely used alternate IP or name) to
trusted_domains.
A host redirect can look like a login problem: the first page loads under one name, authentication is submitted to another, and the session appears to disappear. Check the hostname in every response before changing cookies or credentials.
Fix a path or /owncloud loop
Decide whether the public deployment is at the domain root (https://cloud.example.com/) or under a subdirectory (https://cloud.example.com/owncloud/). The proxy mapping, overwritewebroot, and overwrite.cli.url must describe that same choice.
Rank #4
- Entry-level NAS Home Storage: The UGREEN NAS DH4300 Plus is an entry-level 4-bay NAS that's ideal for home media and vast private storage you can access from anywhere and also supports Docker but not virtual machines. You can record, store, share happy moment with your families and friends, which is intuitive for users moving from cloud storage, or external drives to create your own private cloud, access files from any device.
- Smart Photo Backup & AI Album: Automatically back up photos and videos from your phone in real time and keep growing family memories organized with AI-powered photo albums. Semantic search, custom learning, and recognition of people, objects, pets, and similar photos help you quickly find the moments you want. Duplicate photo removal also helps keep your library organized—ideal for families and users with large photo collections.
- User-Friendly App & Easy Setup: Connect quickly via NFC, set up simply and share files fast on Windows, macOS, Android, iOS, web browsers, and smart TVs. You can access data remotely from any of your mixed devices. What's more, UGREEN NAS enclosure comes with beginner-friendly user manual and video instructions to ensure you can easily take full advantage of its features.
- More Cost-effective Storage Solution: Unlike cloud storage with recurring monthly fees, A UGREEN NAS enclosure requires only a one-time purchase for long-term use. For example, you only need to pay $629.99 for a NAS, while for cloud storage, you need to pay $719.88 per year, $1,439.76 for 2 years, $2,159.64 for 3 years, $7,198.80 for 10 years. You will save $6,568.81 over 10 years with UGREEN NAS! *NAS cost based on DH4300 Plus + 12TB HDD; cloud cost based on 12TB plan (e.g. $59.99/month).
- Your Data, You Control:No third-party clouds, no hidden access, UGREEN NAS provides a more secure and private data storage solution. It stores data locally on your private hard drives and does automatic backups. Thus, you can keep full control over it. The advanced encryption is TRUSTe certified in the United States and is awarded the first (and only) ETSI EN 303 645 certification mark for NAS products by TÜV SÜD Group.
Subdirectory deployment
For a public path such as /owncloud, map that path to the matching backend path and set overwritewebroot to /owncloud. The complete CLI base URL should include the path. In Apache, the mapping requires both a forward proxy rule and a matching reverse rewrite; the official ownCloud example shows paired ProxyPass and ProxyPassReverse directives for this reason. If only the forward rule exists, backend redirects can expose an internal or path-less URL.
ProxyPass /owncloud http://127.0.0.1:8080/owncloud
ProxyPassReverse /owncloud http://127.0.0.1:8080/owncloud
Use the actual upstream address and path for your installation. Do not copy these values unchanged into a different layout.
Root deployment
If users enter the domain root, remove an obsolete /owncloud prefix from the proxy mapping and from ownCloud’s webroot overwrite. Leaving one layer configured for a subdirectory and another for the root creates repeated path additions or removals.
Make host validation pass
An “untrusted domain” message is separate from a redirect loop but often appears during the same migration. Add the exact public hostname or IP to trusted_domains, save the configuration, and test that same address. Include a non-default port only where your ownCloud version expects it as part of host validation; do not substitute a broad wildcard for the real name.
Docker-specific settings
In the official ownCloud Docker setup, OWNCLOUD_TRUSTED_DOMAINS supplies the trusted host list as a comma-separated value when more than one name is required. OWNCLOUD_DOMAIN is used when OWNCLOUD_TRUSTED_DOMAINS is not defined. Set the variable that your deployment actually uses, using the public hostname rather than the container name.
Best Value
- Secure private cloud - Enjoy 100% data ownership and multi-platform access from anywhere
- Easy sharing and syncing - Safely access and share files and media from anywhere, and keep clients, colleagues and collaborators on the same page
- Automated Backup Protection - Set-and-forget backups for Macs, PCs and mobile devices to multiple destinations including cloud and external drives
- Home Security System - Record and monitor your property 24/7 with support for multiple IP cameras and remote viewing
- 2-Year Warranty - Reliable hardware backed by Synology's expert customer support team and ongoing software updates
- Inspect the environment and generated ownCloud configuration inside the running container so you know which variable currently supplies the value.
- Replace it with the exact public hostname or a comma-separated list of real entry points.
- Restart the service; changing a compose or container environment value does not alter an already running process until it is recreated or restarted.
- Re-run the header request from outside the container and verify the public scheme, host, port, and path.
Docker networking addresses are normally internal implementation details. They should not become the hostname in redirects unless that is intentionally the public URL.
Choose a deployment pattern that matches the URL users enter
| Choice | Advantages | Configuration consequences |
|---|---|---|
| TLS at reverse proxy | Centralizes certificates and lets the proxy serve several backends | Forward the public host and HTTPS protocol, trust the proxy, and set overwriteprotocol when detection is unreliable |
| TLS at ownCloud web server | The backend sees the original secure request directly | Fewer forwarded-header concerns; proxy rules must still preserve host, port, and path if a proxy remains in front |
Root deployment (/) |
Shortest public URLs | Do not retain a subdirectory webroot or path prefix in proxy rules |
Subdirectory deployment (/owncloud) |
Allows another application at the domain root | Proxy mapping, overwritewebroot, and CLI URL must all include the same prefix |
| Static overwrite values | Predictable for one fixed public entry point | Can break alternate entry points; values must be changed when the public URL changes |
Conditional overwritecondaddr |
Limits overwrites to requests from a known proxy | Requires an accurate regular expression for the proxy address and careful testing of direct access |
The right choice is the one that describes the URL users actually enter and the headers the proxy actually sends. Mixing choices across layers is what creates most loops.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteApply changes safely, one dimension at a time
- Back up: copy
config/config.phpand save the current redirect chain. - Classify: decide whether the first change is scheme, host/port, or path.
- Correct the edge: fix the proxy’s forwarded host, protocol, or path mapping first.
- Correct ownCloud: add the specific proxy to
trusted_proxiesand apply only the matching overwrite option. - Validate hosts: add every real public hostname or IP to
trusted_domains. - Restart what needs restarting: recreate a Docker service after environment changes; reload the web server after its configuration changes.
- Retest privately: use a private browser window and a header-only request, recording every
Location. - Review logs: if the chain still changes, correlate proxy, web-server, and ownCloud log entries by timestamp.
Do not simultaneously change cookies, authentication providers, database settings, and URL configuration. Isolating one dimension makes the first remaining mismatch visible and preserves a straightforward rollback.
When the loop remains
The proxy header is missing or untrusted
If ownCloud ignores X-Forwarded-Proto or the forwarded host, verify that the request really comes from an address in trusted_proxies. A header from an untrusted source must not be accepted as authoritative. Check the proxy’s outgoing request rather than assuming its configuration file is active.
Two proxies are rewriting different ways
Trace the request through every load balancer, CDN, ingress controller, and web server. The first layer may set HTTPS while the next replaces it with HTTP, or one layer may strip /owncloud while another adds it. Give each layer one consistent mapping and remove duplicate canonical redirects.
The response points to an internal URL
An internal hostname, container name, or private port in Location indicates that ownCloud or the proxy is exposing backend information. Set the public host and port, ensure the public Host is forwarded, and check Apache’s ProxyPassReverse or the equivalent response-rewriting feature.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsOnly cron or occ links are wrong
If interactive browsing works but generated links point elsewhere, inspect overwrite.cli.url. It must be the complete public base URL, including scheme and webroot. Correcting that value does not replace the need to fix browser redirects if those still loop.
A cached 301 survives the fix
Confirm the server’s current chain with curl or a private window. Then clear the affected site’s cached data in the regular browser. Do not keep editing server settings to compensate for a redirect that is no longer being returned.
Quick Recap
Final verification checklist
- The public URL reaches one canonical scheme, host, port, and path.
- Every response in the chain has a useful destination and the chain terminates.
- The proxy sends the public
Hostand correct forwarded protocol. - Only intended proxy addresses are in
trusted_proxies. - Every real public hostname or IP is in
trusted_domains. overwritehost,overwriteprotocol, andoverwritewebrootmatch the external URL, or are omitted where automatic detection is correct.overwrite.cli.urlmatches the same complete base URL.- Docker environment changes have been applied by restarting or recreating the service.
- A private-window test and a header request both reach the login page without alternating destinations.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

