What is the name of the domain?
fergyscloud.org
Related to
Cloudflare Tunnel
What is the issue you’re encountering
tunnel active and healthy until nextcloud accessed first screen comes up and then tunnel goes down
What steps have you taken to resolve the issue?
rebuilt proxmox cloudflare container and nextcloud container multiple times. Can access nextcloud locally no issues. As soon as I attempt to access nextcloud via tunnel I can reach Nextcloud but it warns that I am accessing from an untrusted domain. I expect this as I wish to confirm that I can reach the container via the tunnel. After updating nextcloud config to reflect correct domain name the initial screen attempts to load and the tunnel goes down and will not restart. I have rebuilt nextcloud cloudflare and deleted and recreated tunnels etc a number of times but no luck. I have followed a few tutorials on Youtube and all works well until I try and access nextcloud. This gives rise to a bad gateway 502 error. I have deleted domains sub domains containers and everything I can think of. It almost worked the very first time but the site would just hang this does not happen locally. I can understand a bad gateway or a mismatch in domain name or url but I dont understand why this would drop the tunnel, I would think I would just not be able to connect to the local service. I am attempting to move from Docker containers and ubuntu server running an nginx reverse proxy on a dell r710 to a r720 running proxmox etc. The previous setup worked perfectly for the nextcloud container. I was led to believe cloudflare was EASY. The existing modem has some port forwarding enabled to allow the original system to function. I was under the impression that cloudflare tunnel is unaffected by port forwarding. Could this be the issue. I will try to set up a Home Assistant container and see if I can access that via a tunnel . I am at the end of my tether.
I dont really want to rebuild this whole system on the new server as cloudflare seems ideal but I guess I am out of luck.
Hi there,
I don’t believe this to be a cloudfared issue but likely a local system issue. I can’t see a scenario where cloudflared refuses connection after the 1st attempt to connect.
Please check the logs for answers or better yet, run cloudflared on a separate container.
Take care.
Hi
Many thanks for your reply. I am an old man and a newbee so bear with me. I agree with you but am unable to determine the problem. The server is a new build using proxmox replacing an old server using docker containers via a nginx reverse proxy and this worked really well. Two questions.
1: Could it be the original port forwarding on the router for the nginx. I haven’t removed them.
2: I am dumb because I have looked at the documentation and cant quite understand how and where to access the logs. Not sure what UUID to use etc. Is it on the dashboard or on the server?
Again thanks for your reply and help
Cheers
Paul
Sorry just looked at your email again. The Cloudflared is running on a separate LXC container as per the tutorial I watched.
Cheers
Paul
Hi there,
I don’t believe so, otherwise the tunnel would never show as healthy in your ZT dashboard. Now if you’re running the same tunnel UUID that is already running in another machine (the old one) that could potentially cause issues. If that’s your case, my advice is that you stop the previous instance or create a new tunnel specifically for the new docker container.
I was referring to the docker container logs. If cloudflared or the container is crashing surely there must be logs of the event. Checking the logs might help explain what’s going on. I’m not familiar with proxmox, but usually there’s a way to check the logs for each container.
If you have no way to check the logs, or if you created the docker instance manually, you can have cloudflared create a log file by running it like this:
cloudflared tunnel --logfile mylog.log run <UUID>
Take care.
Thanks again.
It’s really great that you provide this advice and help.
I didn’t use a tunnel on the previous server just port forwarding and nginx.
Sorry to bug you but where do I find the UUID.
It’s a bare bone install with cloudflare in a lxc container and nextcloud install by the turnkey template
No firewall.
I will reinstall everything again and try your log suggestion. I guess I just don’t understand what a UUID is in this instance and where to find it.
Cloudflare seem like an ideal solution for someone with limited knowledge but it looks like I need to re-implement the old proxy server port forwarding solution, complicated but at least it works.
Anyway thanks heaps again I really appreciate it
Cheers
Paul
Hi Paul,
UUID is the tunnel ID, it can be found under Networks
> Tunnels
.
Take care.
1 Like