mirror of
https://github.com/cloudpanel-io/cloudpanel-ce.git
synced 2026-04-05 20:31:58 +02:00
CloudPanel fails to load in "Iran-only" networks due to external file dependencies (suggest caching mechanism) #78
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @saeed-54996 on 6/26/2025
CloudPanel version(s) affected
2.5.1
Description
Describe the issue
In Iran, due to political decisions or wartime restrictions, there are times when access to the global internet is cut off. In such cases, servers located inside Iran become "Iran-only" – meaning they are accessible only from within the country, but cannot connect to any resources outside Iran.
During such a recent incident, we observed that CloudPanel failed to load (even though it was hosted locally inside the country). The web panel interface would not come up at all.
Upon investigation, we found that CloudPanel tries to fetch certain files from the internet every time the panel is opened. Since these external requests hang and eventually time out, the entire panel page fails to render before the timeout.
Root Cause
CloudPanel attempts to fetch files like:
public_suffix_list.dat
tlds-alpha-by-domain.txt
(and possibly more...)
These files are requested on each panel load, and are not cached locally. In case of network unavailability, the panel gets stuck waiting for these requests to timeout. Since there are multiple of them, the accumulated timeout exceeds the browser’s load limit, and the interface fails to load.
Why this matters
During network shutdowns, users inside Iran (and potentially in other regions with restricted internet) lose access to their own hosting panels.
Some organizations may want to run CloudPanel entirely offline in isolated or secure environments, e.g., internal company networks, military/government infrastructures.
Current design makes such use-cases unreliable or even impossible.
Proposed Solution
Please consider changing the behavior so that:
These files are fetched using a cron job (e.g. daily or weekly), not at runtime.
Fetched files are cached locally and served from the local server.
In case of failed downloads, the panel should gracefully fall back to the last known good version, instead of blocking the entire UI.
Summary
This small architectural change can make CloudPanel more resilient, especially for users in restricted environments or those wanting to self-host in isolated intranets. It ensures the panel always loads, regardless of internet connectivity, which is critical for reliability and usability.
Thanks for considering this request on behalf of many Iranian users 🙏
How to reproduce
How to reproduce
Install CloudPanel on a server (e.g. Ubuntu 22.04).
Ensure the server has internet access and complete setup.
Simulate a restricted network:
iptables,ufw, or disconnecting from external DNS).Try to open the CloudPanel web interface in the browser.
Wait…
🔥 You will notice:
Optional quick test:
Then open the CloudPanel web UI. It will hang or fail to load.
Possible Solution
No response
Additional Context
No response