Nextcloud listening on all ports across network?

I have an snap installation of Nextcloud on Debian 10 and am encountering a strange issue. I can stand up other webservers on my local network and can resolve their addresses just fine; however externally when I try to access them I’m redirected to the nextcloud ‘untrusted domain’ page, despite being on completely different subdomains and machines.

I’m not trying to access the Nextcloud instance via a trusted domain, simply other subdomains on my network. Ican access Nextcloud fine on that subdomain. The problem is that this “untrusted domain” page appears on the every single subdomain. Nextcloud just takes all traffic pointed at this box or others and returns this “untrusted domain” page.

Sounds like you have port forwarding setup to send all traffic to the snap, and all domains resolve to the same IP. You need to either use different ports (forwarding to different places), or use a reverse proxy in front of everything to send traffic where it’s supposed to go.

Sounds like you have port forwarding setup to send all traffic to the snap,

I have port forwarding on my router set up to send traffic on port 80 and 443 to the NC box. How would I verify all traffic is being sent to the snap?

Are the other webserves on the same host?

If yes you have not correct configure your virtual hosts on this host (apache2).
If no you must you a reverse proxy or different ports because your router can only forward name:port to one ip:port .

no, and since it’s the snap install I’m not even sure how to cofigure the vhosts.

The other box I will try a reverse proxy with different ports and see how it goes. FWIW it’s I’m not trying to forward the same name across the same port. Basically it’s something like.
Internal.
nextcloud.domain.tld (port 443) resolves
www.domaint.tld (port 80) resolves

External;
nextcloud.domain.tld (port 443) resolvses
www.domain.tld (port 80) hits nextcloud server and get untrusted domain error.

I do not like Snap. I thought Snap is a ubuntu tool :wink:

Perhaps you like to test this installation.
It works for me fine. Perhaps than i can help you better.
I uses it on many Debian 10 system in the internet and at home with DynDNS, Lets Encrypt, …

1 Like

I’m starting to not like snap either :wink: but I’ve had this problem using the “vanilla” NC installation.

1 Like

You also can use docker

https://hub.docker.com/_/nextcloud/

or images like NextcloudPi

https://ownyourbits.com/nextcloudpi/
->
https://ownyourbits.com/nextcloudpi/#supported_systems

If you reinstall use my link for debian-10-installation.
Post errors.

By all means, feel free to explore other installation methods, but I want to be clear here: this has nothing to do with the installation method. It’s an incorrect network setup. The same problems will be encountered regardless of how nextcloud is installed. If you have different hosts you need to port forward to a host dedicated to reverse proxying by domain name. One to Nextcloud (regardless of installation method), and the others to… whatever else you have.