Coolify hard to sett up behind cloudflare tunnel #5889
Replies: 5 comments 9 replies
-
@TheRoccoB any ports mapped by docker, will still be available even using ufw https://docs.docker.com/engine/network/packet-filtering-firewalls/#docker-and-ufw to turn this off for coolify you add the following file services:
coolify:
ports: !reset [] as to what mappings, you do not need to use any other than localhost 80, just let the proxy handle all the routings so for the tunnel you just need apex domain to HTTP localhost 80 and * (wildcard) to localhost 80 if you want to switch to HTTPS, you will need to add your origin domain certificate to your host as well as add the origin domain name to the TLS settings for each cf tunnel entry you do not need to map any of the realtime entries |
Beta Was this translation helpful? Give feedback.
-
That ports lockdown thing should be an easy option in the UI if that's possible. Because I think a lot of people will just not care and keep it open. Just put a big red warning in there to make sure you have another way of access set up. Or maybe don't even allow it if they're configuring from port 8000. Here's an image of some of the tunnel mappings I had to set up to get this to work: I might have needed to manually edit a few conf files to get things pointing in the right direction too. I think this setup is very secure--something that's really important to me when I set up a service that has root access to all my "stuff". Would love it if this was easier, and perhaps, the recommended way to install coolify. Happy to collab / contribute a bit more on this. Edit: sorry I didn't see that you already replied above. I'll play around with a fresh install and see what mappings I actually need to make. |
Beta Was this translation helpful? Give feedback.
-
Thank you. I see specifically that I missed when I read that doc the first time:
Nice to see confirmation of this problem in the official though! I'm basically building an interactive terminal bash script to help people set up cloudflared in front of coolify, and I want to get everything as close to perfect as possible. This setup took me quite a lot of time to get right, even with the doc that you shared. |
Beta Was this translation helpful? Give feedback.
-
Also last question... after I add the yaml file to update |
Beta Was this translation helpful? Give feedback.
-
created pr to improve firewall docs, LMK what you think coollabsio/coolify-docs#292 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted a Coolify install that, itself, was behind a cloudflared tunnel. I got it working but it was very tricky—I needed to manually update a conf file to get rid of the port 8000 exposure that broke through my UFW rules.
I love Coolify but I absolutely hate that it does this port-8000-breaks-ufw thing and there’s no way to quickly turn that off in the UI. Seems like a major vulnerability to me.
Then I needed to add a bunch of other mappings to realtime services in Coolify. Would be nice to at least have a tutorial about how to set that up and perhaps I could contribute.
So I guess the feature request is twofold.
I could write a draft of number 2 for the docs site if you guys are interested.
Beta Was this translation helpful? Give feedback.
All reactions