NextcloudPi at non standard http, https ports, problem with and overwrite.cli.url


I’am running Nextcloudpi at non standard ports, ie, 8043 and 8443, because I’am running a reverse proxy to two containers ( Photoprism and Paperless-ngx) that I integrate with the Nextcloudpi image installation on a RPi5.
I edited the /etc/systemd/system/notify_push.service file to add the 8443 port the Nextcloud environment ( NEXTCLOUD_URL=https://localhost:8443 ) and the notify_push service works as expected.
The only problem is the script that does not update the config.php file correctly, ie, overwrite.cli.url’ => 'https://domain:8443/.
I have to manually edit the config.php file and to comment out the line ( nc_domain=“$(ncc config:system:get overwrite.cli.url)” ) in the script.
My noob question is, is there a proper way do set nextcloudpi at non standard http and https ports?

Thank you in advance,

Best regards.

sorry, I can’t help with ncp - look at the docs… but in general you should avoid non-standard ports. While it works often there are sometimes strange and hard-to-troubleshoot issues related to other ports e.g. some company networks only allow well-known ports outgoing.

Using reverse proxy it is easy to run different services on standard ports and single IP but different subomans e.g. cloud.mydomain.tld and photoprism.mydomain.tld. Other way would be to use differrent locations e.g. www.mydomain.tld/nextcloud and www.mydomain.tld/photoprism

Thank you for your time.
I tried to run my reverse proxy at other non http, https standard ports, so that i coud run nextcloudpi at the usual http, https ports, but I was not able to successfully configure it.
I will revisit the issue taking in account your suggestions.
Best regards.