How to make my nextcloud server visible outside

So Hello there mateys
i kind of a noob on apache and what not php myself, but i am on knowledge of the basics, and i kind of of a starter, but here is my question, ive searched some forums but none of them have really my idea awsered i was wanting to make my raspberry pi with the nextcloud with PORT80 and 443 open on the routher, ive tested to see if other apache programs works, and after redirect the domain to the ip of the raspberry it works, even in apache vanila, so my question is, how can i make that my nextcloud page looks like its not the ip on the adrees bar,
EX: i have bought the google DNS and redirected to the device, ok, the page is redirected to my wan IP, but after it enters it tries to make URL as the device ip, ive changed allready and it keeps doing that!

‘datadirectory’ => ‘/var/www/html/nextcloud/data’,
‘dbtype’ => ‘mysql’,
‘overwritehost’ => ‘’,
‘version’ => ‘18.0.4.2’,
‘overwrite.cli.url’ => ‘https://valleteck.com’,

is the is anything i am missing?

any help is good!!!

i appreciate the time to read!

You may need to set the overwritehost parameter to the intended name. More info here:

https://docs.nextcloud.com/server/18/admin_manual/configuration_server/reverse_proxy_configuration.html

Till now you built a redirect loop:
https://valleteck.com redirects to http://valleteck.ddns.net:1981 and your Apache redirects again to https://valleteck.com and so on…

yeah but even outside the network i cant reach… while an raspberry pi with apache2 withou anything is accepted to be connected and there is the same config… the google dns points to the ddns and ddns shows the page

Did you setup Virtual Hosts on Apache2 instead of Redirect?

This is a minimum example from Official Docu: https://docs.nextcloud.com/server/18/admin_manual/installation/source_installation.html#apache-web-server-configuration

And here is my config example: