Access Nextcloud outside of LAN

Hi

I am looking for help in accessing my nextcloud instance from outside my LAN.
I have tried to follow a couple of guides.
I have a nextcloud instance on freenas and also one on a dedicated Ubuntu server both which I can use within my LAN.
I am only wanting to access the Ubuntu server instance outside the LAN.
I have Port forward both 80 and 443 I have a domain that points toward my IP address, but I can’t access nextcloud still.
I have tried the snap and regular install. I have installed LAMP, set up a ssl with let’s encrypt and that works but I still can’t access nextcloud.
Do I need to just try eg: domain.com/nextcloud or domain.com:80 or 443, on just my domain.com.

I can access it via https and http locally.
I think I’m missing something simple but it’s doing my head in iv spent hours on it trying to get it to work.

Anyone have any ideas?

Thanks

If you can access NC internally it suggests a network/firewall issue. Try this:

1 Like

Thanks for your reply.
I had to set my modem to tcp/udp and that got it to work.
I have a new issue now and thats Im unable to add a trusted domain to the config.php file as it is read only even with sudo used.
I have installed the snap NC on Ubuntu 16.0.4 on a VM.
Is there a way around this that you know of? I have done a few google searches but no luck…

I figured it out! (Ignore my first reply)

I can now access the snap NC from outside of my LAN!!!

Took me three days but I’ll never forget it now.

Thanks for your help.

Hi I’m having a very similar issue. Could you tell how you figured it out??

I’m using a non-standard port on my server. I’ve got that forwarded through the router, but still no joy from external sites using both the direct external IP (from whatismyip.com) and a subdomain, nextcloud.mysite.com. Are there some “allowed-domains” settings somewhere should set?

First of all thanks to you for this useful utility (port scanner). I got it bookmarked. My Nextcloud wasn’t working outside local network today. After having search for at least an hour online today (just updated to 15.0.7 yesterday, so I thought it was related), I realized my issue could be as simple as my DNS not pointing to the right public ip. Since I don’t have a static ip with my ISP, it’s something I should’ve not forget but hey.

As most of us are also facing the same kind of challenge (non static ip), I wanted to share this with the community. A little guide that DuckDNS people built for us. I am running Nextcloud on a Raspberry Pi 3b+ using this service and they made a pretty good help page on how to set up your cron job to automatically update our public ip’s to their service. http://www.duckdns.org/install.jsp - Just choose your operating system and you’ll get the appropriated guide. Having this setup can give you more time to google something else and avoid loosing the same kind of time I lost today :wink:

Recommendations:

  • mkdir in your home folder a dir like: DuckDNS
  • in that dir, create duck.log + duck.sh
  • adjust the “echo” command accordingly (e.g: ~/DuckDNS/duck.sh for the script and ~/DuckDNS/duck.log for the logs)
  • test your duck.sh script before adding the crontab and also make sure your crontab point to the right script (.sh) path

Hope this helps