# How can I access my self-hosted Nextcloud locally using a DuckDNS domain without keeping ports open?

**URL:** <https://help.nextcloud.com/t/how-can-i-access-my-self-hosted-nextcloud-locally-using-a-duckdns-domain-without-keeping-ports-open/229025>\
**Category:** ℹ️ Support\
**Tags:** docker, dns\
**Created:** [July 20, 2025, 11:06pm UTC](https://help.nextcloud.com/t/how-can-i-access-my-self-hosted-nextcloud-locally-using-a-duckdns-domain-without-keeping-ports-open/229025 "2025-07-20T23:06:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [July 22, 2025, 11:10am UTC](https://help.nextcloud.com/t/how-can-i-access-my-self-hosted-nextcloud-locally-using-a-duckdns-domain-without-keeping-ports-open/229025/2 "2025-07-22T11:10:01Z")

</div>

From your description _it should work_ and without logs it’s hard to know what is wrong. I could think of caching when your browser or OS keep connecting with the previous public IP for some time.. maybe they even ignore the local DNS (keyword DNS-over-HTTP).

If you want to understand what happens perform systematical troubleshooting

- check DNS (you did already)
- clear DNS cache (don’t forget you router’s DNS cache)
- review browser console logs (F12) to see which IP it uses
- review server and reverse proxy logs

In general I would not recommend to follow your approach. fiddling with ports on a regular base sounds complicated (and introduces issues with letsencrypt if the system is not accessible for certificate refresh). I would rather recommend you follow reasonable security recommendations [How to maintain, check and improve the security of your Nextcloud installation](https://help.nextcloud.com/t/how-to-maintain-check-and-improve-the-security-of-your-nextcloud-installation/152060) and optionally use security tool like #fail2ban or #crowdsec and definitely don’t forget [101: backup what and why (not how)](https://help.nextcloud.com/t/101-backup-what-and-why-not-how/217496) - this should be “secure enough” for most installations.

---

_[View the full topic](https://help.nextcloud.com/t/how-can-i-access-my-self-hosted-nextcloud-locally-using-a-duckdns-domain-without-keeping-ports-open/229025)._
