Portainer/Docker/Cloudflare issue

Hello! I've been closely following Jim Hope's guide on setting up a Cloudflare Tunnel (https://jimhope.me/blog/2022/06/03/setting-up-cloudflare-tunnel/) but can't access my site despite ensuring all steps were correctly followed. This setup involves Docker, Portainer, and Cloudflare Tunnel configurations. If anyone has experience with Cloudflare or similar setups, your advice would be invaluable. Could someone help me figure out where things might be going wrong
Jim
Jim Hope
Setting Up Cloudflare Tunnel | Jim Hope
Access your home lab without opening ports on your firewall. We recently changed our internet service provider from Vodafone to TalkTalk and one of the thin ...
No description
20 Replies
Cyb3r-Jak3
Cyb3r-Jak3•11mo ago
If you are running cloudflared in a docker container change localhost to either the container name if they are on the same docker network or the docker container IP address.
achllys
achllysOP•11mo ago
Alright, I've got it all working, but now my IPv4 with the port allows me to go to my site. it's not https but http. How do I fix this?
Cyb3r-Jak3
Cyb3r-Jak3•11mo ago
Like when you connect to the tunnel it uses http or connecting to the application uses http?
achllys
achllysOP•11mo ago
So, i've got all working correctly expect one thing. Whenever I try to setup two cotainers using one tunnel only of them will work. How do I go about fixing this?
Cyb3r-Jak3
Cyb3r-Jak3•11mo ago
Define only one will work. What error are you seeing? Is it showing an error message or just not routing to the container?
achllys
achllysOP•11mo ago
Well, only one cointainer works at a time
Cyb3r-Jak3
Cyb3r-Jak3•11mo ago
Like runs or can get traffic
achllys
achllysOP•11mo ago
runs but the the website is unreachable as one will only work that starts up first
Cyb3r-Jak3
Cyb3r-Jak3•11mo ago
Do you have a public hostname for both of them?
achllys
achllysOP•11mo ago
uh, no idea how to do that... and do I need to use Apache? can't I just use sub domains?
Good Bob
Good Bob•11mo ago
What I found to be the easiest way to route the containers is to setup a network and when you create the containers to use that network. Then you can http://<container's name>:<port> on the tunnels website. it's important to use the container's port number not the external port number so -p 8080:80 the 80 to the right not the 8080 to the left.
Cyb3r-Jak3
Cyb3r-Jak3•11mo ago
The image in your first post is a public hostname. You do use subdomains for each container you want to run
achllys
achllysOP•11mo ago
what network type/driver?
Good Bob
Good Bob•11mo ago
just the default docker network create tunnel should work
achllys
achllysOP•11mo ago
Ah alright
Good Bob
Good Bob•11mo ago
sorry I don't have portainer handy to check how to do it
achllys
achllysOP•11mo ago
It's okay 😄
achllys
achllysOP•11mo ago
all zeros for one container?
No description
achllys
achllysOP•11mo ago
No description
Good Bob
Good Bob•11mo ago
usually the image comes with an example for the command to run -p <some port>:<some port> or you can check the Dockerfile where it says EXPOSE
Want results from more Discord servers?
Add your server