Accessing NC outside of network... I think I'm missing one small key detail, can anyone identify it?

So I have everything set up internally, but can’t seem to access my nextcloud on an external network.

Here’s my nextcloud docker ports

Here’s my reverse proxy settings

My domain settings

And here’s my config file

My nginx is configured propery lin the router.

Nextcloud version 26.0.1.1
Operating system and version unraid latest version
Apache or nginx version nginx
PHP version (eg, 7.4): `I don’t know

Hey, you sure your DNS config is right? You created a CNAME for nextcloud.steveflix.me to point to steveflix.me. This has an A record which points to 104.183.59.139. That’ correct?

Locally accessing https://192.168.1.232:444 works? Did you correctly port forward to your reverse proxy?

hi @Stephen1 welcome to the forum :handshake:

I feel it very impolite to ask for assistance while been lazy to collect required information.

the problem likely results from wrong reverse proxy config.

image

this setting make Nextcloud generate URLs for resources pointing to https://192.168.1.232:444 which is not accessible from the outside. This setting should point to your public domain. There are more reverse proxy settings required like overwritehost and overwriteprotocol

1 Like

But that’s only for CLI or am I missing something?

likely you miss this part of the answer

Well, no :wink:
While I agree that the settings you mentioned should be adjusted and added, the setting you pointed out only changes the behaviour for link generated on CLI, not on every link. So this should not have an impact on the general functionality in terms of accessing from remote. But yea, probably should be adjusted.

1 Like

I set it up how I set up all my other dockers, radarr, sonarr, etc assumed that’s how it was done, the other ones work. 104.183.59.139 is my public IP

Yes locally accessing works just fine.

Hello there, my apologies.

It wasn’t so much lack of information out of laziness but rather I’m not sure what information to gather and post. I am VERY novice at all of this, I feel like an 8 year old, so I gathered what I could from the guide to post. I’m sorry.

So, if my public redirect domain is nextcloud.steveflix.me I should have that say overwrite.cli.url’ => nextcloud.stevefli.me?

you should have setup overwritehost and overwrite.cli.url with nextcloud.steveflix.me. Please review other settings as well like trusted_domains and configure your reverse proxy to pass correct headers.

thanks @wwe I’m a bit confused. What exactly goes after overwrite? I asked my buddy to see his config file, and he has a local ip there, and he can see his nextcloud externally.

image

But that IP doesn’t belong to anything on his network. I’m confused at what I should put there for my network

Overwrite parameters

The automatic hostname, protocol or webroot detection of Nextcloud can fail in certain reverse proxy situations. This configuration allows the automatic detection to be manually overridden. If Nextcloud fails to automatically detect the hostname, protocol or webroot you can use the overwrite parameters inside the config/config.php.

  • overwritehost set the hostname of the proxy. You can also specify a port.
  • overwriteprotocol set the protocol of the proxy. You can choose between the two options http and https.
  • overwrite.cli.url the base URL for any URLs which are generated within Nextcloud using any kind of command line tools. For example, the value set here will be used by the notifications area.

so given following design

you config following:

 'overwriteprotocol' => 'https'
 'overwritehost' => 'my.cloud.tld'
 'overwrite.cli.url' => 'https://my.cloud.tld'

and configure Nginx to access your Nextcloud using plain http.

 proxy_pass http://172.16.22.33:8080;
 proxy_set_header Host $http_host;

In general https://{ip address} never works as you can’t have valid public CA certificate for an IP address (if you know how to make self-signed work you likely don’t need help)

the settings described above are only part of the solution. You need to configure DNS, port forwarding, reverse proxy, TLS cert proper to make it work. If you run identical setup feel free to use the config of your buddy.