Nextcloud blocks me because it does not recognize the access domain as secure

Hello everyone,

I have made a new installation of NextCloud on a virtual machine with Ubuntu Server 18.04. I have redirected an external domain to access I have changed the access port from 80 to 2020 and when this port is accessed, the router redirects it to port 80 of the virtual machine.

After doing the whole process I was able to access the Nextcloud installation, but it tells me that the address from which it is accessed is not secure.

I have modified the “trusted_domains” to put the ones that are safe, obtaining the following:


I don’t know what else to do, any ideas?

Thank you


hey @Enric

its so nice that you found your way over here to the nc-communityforum… and that you do participate.

i just saw that you posted a spanish version of your question as well… and the english one here…
in general - maybe that’s unclear so far… english threads would gain way more attention than any other threads in different languages. so why does this forum feature subcategories for different languages though? the only reason is: for ppl who are to shy or cannot speak another language than their mothertongue (or don’t want to use google-translate or such). the “price” they would pay for posting in their own language would be: less coverage and thus less attention and thus less possible help.

i can see that you are great in english… so i’d recommend to post in english only. because --> coverage, attention, possible help.
please don’t post in every language you might speak - it will get this forum even closer to chaos with all this doublepostings :smiley:

thanks for your understanding and happy hacking

Just a shot into the blue … I am not an expert at all about this.

Thanks but no. I have not yet put SSL certificates :wink:


OK thanks I get on mind

If you access it from your intranet, using the IP address as “URL”. Does it work?

From the intranet I can access without problem.
From outside I can access via IP and the subdomain that I have indicated, but then it blocks me by accessing through an unsafe place.



Could you share your webserver configuration for this host?

I am not an expert on these issues, could you tell me a little more what you want to know?

I am not yet sure what to look for in detail, but it would be good if you could post the server/host part of the webserver config file, so someone in the forum might find the reason for the behaviour in there. It could be a webserver config issue. Don’t forget to remove sensitive data, if necessary.

What webserver are you using nginx, apache, something else?
For ngnix you should find it in /etc/nginx/

I have an installation from the Nextcloud snap package. Where is the server configuration?

Thank you very much for the answers


Seems like there’s already a thread dealing with it:

Thanks bpcurse, this article had already looked at me and I have already made the changes indicated. In fact, these have allowed me to access NextCloud.
The problem is that I cannot “tell” Nextcloud that the address from which I access is good. I have introduced the possible variations in the “trusted_domains” section and still do not accept them.

Thanks again


You’re welcome.

The contents of this file (again: remove sensitive values if necessary) is what I am interested in:

Although I’m somewhat experienced with nginx only, I have no experience with snap. So the problem might be located in the setup using snap itself, but I am probably not able to help a lot in this setup context.

But maybe someone else here with snap/apache experience? :slight_smile: