Hi Antonio,
I’m afraid this configuration will cause issues but if there’s really no other option…
Enter the Nextcloud instance (in this example nextcloud1
)
runagent -m nextcloud1
Edit config.php using nano:
podman unshare nano $(podman volume inspect nextcloud-app-data --format={{.Mountpoint}})/config/config.php
Add the port to overwritehost:
'overwritehost' => 'nextcloud.domain.tld:4043',
NS8 is using containers and environment variables are used for configuration so you need to edit the file config.env
and again change the overwritehost:
OVERWRITEHOST=nextcloud.domain.tld:4043
To be sure the settings are applied I restarted nextcloud:
systemctl --user restart nextcloud
Exit the NC environment:
exit
WAN access should work now, for LAN access we need to open the port 4043 on NS8 too.
Enter as traefik1 user:
runagent -m traefik1
Edit configs/nextcloud1.yml
and add the following on the top:
entryPoints:
customport:
address: ":4043"
and add customport to the entryPoints (2 occurences) :
entryPoints: http,https,customport
Restart traefik:
systemctl --user restart traefik
Exit traefik:
exit
Open port 4043/tcp on the host firewall:
firewall-cmd --permanent --zone=public --add-port=4043/tcp
Reload the firewall:
firewall-cmd --reload
Now NC should be reachable over port 4043 and the port is kept in the URL.
This configuration change is not persistant, after saving changes in Nextcloud app settings or updates the config.env
and the traefik settings will be reverted.