Client software points to IP and not hostname. (Reverse proxy is involved.)

I have a Nextcloud server running inside Docker on one host IP:192.168.0.42. It is only using http. I have another host running an Nginx reverse proxy server utilizing a Lets encrypt SSL cert. To connect to Nextcloud via a browser, I use cloud.xxx.xxx (just an example). It works fine.

When I try to configure the windows client software. It asks for my server name. In the box, I put in cloud.xxx.xxx. My browser pops up for me to log in. The URL on the browser should be cloud.xxx.xxx, but instead it is 192.168.0.42.

I had this issue a couple of years ago before I was using Docker, but I cannot remember or find the fix. I believe it is a setting somewhere in a config file. Any help would be greatly appreciated.

Perhaps it was the trusted_proxies setting??
https://docs.nextcloud.com/server/15/admin_manual/configuration_server/reverse_proxy_configuration.html

I haven’t heard about that setting, thank you. If I remember correctly the solution was to add the setting “NEXTCLOUD_TRUSTED_DOMAINS.” I’ll have a look at what you suggested.

I wanted to post an update for people who may find this post in the future.

The setting that solved my issue is

‘overwritehost’ => ‘’,

in the config.php file.

https://docs.nextcloud.com/server/18/admin_manual/configuration_server/config_sample_php_parameters.html?highlight=config%20php

Once I added this setting with my desired URL, the browser popup during the client software login redirected to correct address. I hope this helps.

What do you set for the overwritehost value?

The domain. In this case: cloud.xxx.xxx