I am having some issues and I hope I can get some help. Initially I was trying to run a Nextcloud container through my Cloudflare Tunne, but I kept getting a 502 Bad Gateway error, I read online it's because Cloudflare cannot communicate with the container and they recommended to install a proxy manager, so I am now trying to set up an Nginx Proxy Manager docker instance, but instead of opening the ports on my Firewall, I want to get to it through my Cloudflare Tunnel.
I am able to spin up the Nxinx instance but when I try to set the domain name to redirect to nginx, I am not able to reach it, so I found on Reddit that you need to add this to the cloudflared config.yml.
ingress: - hostname: xxx.yourdomain.com service: #npm originRequest: noTLSVerify: trueI have two issues here, one, I can't find where the config file is natively, and second, when I try to run the container with a --config command or with compose, I get the error that cloudflared can't open the file or folder.
I have tried this command:
docker run -d cloudflare/cloudflared:latest tunnel --config /home/"username"/cloudflared/config.yml --name cloudflared --no-autoupdate run --token "my token"And I've tried this docker-compose:
version: "3.8"
services: cloudflared: image: cloudflare/cloudflared:latest container_name: cloudflared restart: unless-stopped command: tunnel --config ./config.yml --no-autoupdate run environment: - TUNNEL_TOKEN="my token" volumes: - ./data:/home/nonroot/.cloudflared/Any help would be appreciated it, what I am trying to do in the end is: > hits Cloudflare > sends it to my Nginx through the Tunnel > Nginx sends it to the right container.
And also, does anyone know if I can use Nginx for 3 different Docker hosts, or do I need to do one for each Server VM?
Thank you everyone for your help!
Related questions 3277 From inside of a Docker container, how do I connect to the localhost of the machine? 2809 Copying files from Docker container to host 2449 How to copy files from host to Docker container? Related questions 3277 From inside of a Docker container, how do I connect to the localhost of the machine? 2809 Copying files from Docker container to host 2449 How to copy files from host to Docker container? 1138 Node.js + Nginx - What now? 4 Can Nginx Proxy Manager (NGINX Reverse Proxy) Work Connected To A Cloudflare Argo Tunnel? 0 Traefik + cloudflared with full strict tunnel on docker 1 How to reconnect cloudflare tunnel after ip change 0 Can't get Reverse Proxy Header / https set up right on Nextcloud through Docker and Nginx Proxy Manager 2 Nginx Proxy Manager Bad Gateway (Docker Wordpress and Nextcloud) 1233 What is the difference between a Docker image and a container? Load 7 more related questions Show fewer related questions Reset to default