Unable to get to login page through Cloudflare

I made use of the ready-to-go VMWare image to create my first Nextcloud installation.

I can access the VM from my internal address: https://192.168.0.xxx. It works fine. But I can’t use my existing Cloudflare tunnel to access this new machine.

I get the ‘Welcome/you made a good choice’ page - and that’s as far as I can go. I can’t get to a login/password page.

This is obviously a beginner error, but I can’t find a way through it.

Grateful for any help offered.

Can you paste content of your config.php (with secrets and passwords removed, of course)? I suspect you didn’t add your cloudflare tunnel domain to the trusted domains directive in configuration but can’t be sure.

Also can you paste the cloudflared command (secrets redacted, too) you used to create the tunnel here?



'trusted_domains' =>
1 Like

Appreciate the help!

Where would I find (and how would I edit) the config.php file? All I have is this command line and I have no idea about Linux (which is why I chose this image that was supposed to do it all for me).

The tunnel is definitely fine. I can access all my other VMs through it.

Oh, it’s in the config folder of nextcloud installation directory, I installed nextcloud manually so config file path is /var/www/nextcloud/config/config.php.

I can’t say the path would be identical, but if you have command line root access you can first cd / then find -name config.php to ask for the path of config.php on your VM. Then you can do cat /path/to/config.php to see the content.

I had to prefix ‘sudo’ to all those commands, but I can find the file and see its contents (though it scrolls off the top of the window, so I can’t see it all). I’m happy to edit it to add the ‘trusted’ section. But how?

After a lot of digging I came up with this command:
sudo -u www-data php occ config:system:set trusted_domains 1 --value=mydomain.net

It seemed to have worked… using sudo nano (I’ve learned a lot about Linux on this journey so far!) on the config.php I could see that my domain was added, so must have worked.

But still not able to get to login/password via my domain name. :worried:

(Actually, I then got an error from my internal address too, such that I had to go and add my ‘192.168.0.xxx’ to the trusted domains, or it wouldn’t let me in that way either - which worked fine before I added this domain name to that file. Once added I could get to the normal login/password.)

I don’t see how to get this fixed. I’m coming into that ‘Welcome’ screen with address ‘https://nextcloud.mydomain.net’, and the links on that welcome page all point to ‘https://nextcloud.mydomain.net’. All it will ever do is cycle round and never get into the login page. This looks like a dead duck.

I’ve kinda answered some of my own questions - or, at least I’ve managed to muddle my way through. Although I have a working system now I haven’t really got to the bottom of the problem.

I’m noting things here, in order that it may help others that come after me…

I decided to abandon the VM I’d created and try a fresh installation. With this VM I decided to allow the installation to install certbot and try to get a certificate for me. I saw lots of error messages (what they were trying to tell me meant nothing to me), and the installation decided to back something out. Clearly the certbot stuff was a failure.

But on completion it was working! Local LAN address and external URL - both working fine!

I tried a third VM installation, removing the Let’s Encrypt/certbot option to avoid all those error message and the roll-back. The installation ended cleanly. This time accessing with my external domain name presented the looping ‘welcome’ screen again. There was no way in.

So, to summarise… Installing the VM with Let’s Encrypt/certbot and allowing it to fail seemed to work.

Unfortunately this means that I haven’t got to the bottom of the problem, but managed to steer around it. That’s not good enough for me. For an installation I need to rely on I can’t be in a position where it could all go horribly wrong and I’d again be stuck. I’ll fool around with Nextcloud for a while, but I think I’m going to give it up as a bad job.

iPad/iPhone still fail to log in with domain name: ‘Web login not available, use the old login method.’ Whatever the ‘old’ method is is not offered. Stuck.

Many thanks to the respondent, whose advice was able to steer me in the right direction, and good luck to those who come after me.

1 Like