Cloudflare tunnel

Is there anyway, to expose coder site using cloudflare tunnel system. I mean steps same like for self-hosting? I suppose to add my domain in coder settings?
53 Replies
Phorcys
Phorcys•2y ago
what's that cloudflare tunnel system ? I've never heard of it
BoJIwEbNuK
BoJIwEbNuK•2y ago
Uhm, I made mistake in cloudflare access, there tunnel. With their client you can just tunnel something like localhost:3000 to your domain. Without exposing port(like in my situation)
Phorcys
Phorcys•2y ago
I think all you have to do is set CODER_ACCESS_URL to your front facing url after setting up the tunnel and that should be fine
BoJIwEbNuK
BoJIwEbNuK•2y ago
Hmm, okay Will try it
gabileibo
gabileibo•2y ago
Hello! I am working on the same problem and I believe there are some challenges. As far as I understand the cloudflare tunnel only allows for http traffic to come through unless you can set up a private network with WARP. And (Someone correct me if I'm wrong) but tailnet requires a tcp connection which is why a basic tunnel will fail.
BoJIwEbNuK
BoJIwEbNuK•2y ago
Https can too. Anyway, no success.
gabileibo
gabileibo•2y ago
yes i meant http/s the problem with cf tunnels is that it screws up the web socket connection for /derp I tried many different solutions but i couldn't get it to work, cf tunnels technically supports ws:// but not officially so for my private connection I just went will tailscale. I run the control plane + workspaces behind a NAT + private ips and connect my clients and workspaces via my personal tailscale account Not exactly like cloudflare because each client needs tailscale installed but it serves my purpose for now
BoJIwEbNuK
BoJIwEbNuK•2y ago
But isn't websocket allowed in cf tunnel? Oh My bad Now I see
gabileibo
gabileibo•2y ago
yes technically it is but there is still some kind of issue with how cloudflared reverse proxies to localhost
BoJIwEbNuK
BoJIwEbNuK•2y ago
The problem that I can't use tailscale app on my iPad. I can't install anything
BoJIwEbNuK
BoJIwEbNuK•2y ago
If I can give link for browser then I will try set up it
gabileibo
gabileibo•2y ago
if ur only using ipad + web then u can use cloudflare what breaks is the non-web tunnel, like when using ssh from a desktop
BoJIwEbNuK
BoJIwEbNuK•2y ago
But, I need to connect to workspace. So somehow need to get solution
gabileibo
gabileibo•2y ago
But how do you plan to connect to the workspace? just an ipad and browser or also with desktop?
BoJIwEbNuK
BoJIwEbNuK•2y ago
Just ipad and browser. At home I often use my PC. But it will be good if PC works too
gabileibo
gabileibo•2y ago
if you only use the browser then cloudflared will work fine. You could use ur PC too but only the browser
BoJIwEbNuK
BoJIwEbNuK•2y ago
The Problem why I use cloudflare tunnel, is I cannot port forward in my router. That why I trying to use tunnels. But it not works. I tried make tunnel to 3000 port of coder an get access but 502 if I correct remember. And when I set to coder url my domain(coder.heenlight.xyz) it's stops works
gabileibo
gabileibo•2y ago
can u share your cloudflared config?
BoJIwEbNuK
BoJIwEbNuK•2y ago
I'm not at home right now. But I will send it later Maybe in 40 min or hour
gabileibo
gabileibo•2y ago
cool, ill be around 🙂
BoJIwEbNuK
BoJIwEbNuK•2y ago
@gabileibo wait, how get config if I set up it in dashboard?
gabileibo
gabileibo•2y ago
hmm in the dashboard setup is the protocol http or https for localhost:3000?
BoJIwEbNuK
BoJIwEbNuK•2y ago
Yes Maybe something wrong with coder url?
gabileibo
gabileibo•2y ago
i mean is it set to http or https on cloudflare?
BoJIwEbNuK
BoJIwEbNuK•2y ago
In cloudflare tunnel it's http, but I tried https too. Not worked
gabileibo
gabileibo•2y ago
it should be http and could u also send ur coder config
BoJIwEbNuK
BoJIwEbNuK•2y ago
Okay
BoJIwEbNuK
BoJIwEbNuK•2y ago
@gabileibo
No description
BoJIwEbNuK
BoJIwEbNuK•2y ago
Sorry cant copy to buffer in puTTY
BoJIwEbNuK
BoJIwEbNuK•2y ago
but it anyway start coder in
No description
BoJIwEbNuK
BoJIwEbNuK•2y ago
not 0.0.0.0:3000
BoJIwEbNuK
BoJIwEbNuK•2y ago
@gabileibo seems like i get it working, idk how. Now will try use workspace
No description
BoJIwEbNuK
BoJIwEbNuK•2y ago
Yes, all works now
Codercord
Codercord•2y ago
Marked the thread as resolved.
gabileibo
gabileibo•2y ago
cool! I expect it will work fine from the browser but have issues from the cli you need to add your access url right? How are u deploying the ws?
BoJIwEbNuK
BoJIwEbNuK•2y ago
No idea what you mean by cli. At my second computer that like home server With power
gabileibo
gabileibo•2y ago
from the terminal of your pc
BoJIwEbNuK
BoJIwEbNuK•2y ago
Ah Seems like work fine I can coder templates push and etc
gabileibo
gabileibo•2y ago
are you using it through the browser?
BoJIwEbNuK
BoJIwEbNuK•2y ago
Coder? Yes But all configured using putty
gabileibo
gabileibo•2y ago
im curious - could you try to connect to the workspace by ssh? coder config-ssh then ssh in
BoJIwEbNuK
BoJIwEbNuK•2y ago
Hm 1 moment Just Coder config--ssh on hosg machine? Or from somewhere else
gabileibo
gabileibo•2y ago
on your local pc terminal
BoJIwEbNuK
BoJIwEbNuK•2y ago
i stopped workspace
No description
BoJIwEbNuK
BoJIwEbNuK•2y ago
need restart it
gabileibo
gabileibo•2y ago
cool and now u should be able to run ssh coder.NodeJS
BoJIwEbNuK
BoJIwEbNuK•2y ago
Seems cool:)
gabileibo
gabileibo•2y ago
oh nice! well i guess maybe it was something with my deployment
BoJIwEbNuK
BoJIwEbNuK•2y ago
No description
Phorcys
Phorcys•2y ago
yeah definitely some issues still, this is kinda odd lol do these still not load? the info next to "main" and buttons on the right there was some work done for the CLI about CF tunnel but I don't know if it's done or not
BoJIwEbNuK
BoJIwEbNuK•2y ago
Idk why for me it started load to long It's works very good Little bit of digging with tunnel. All works but I found that when container starts with installing coder in it it's downloading binary from derp tunnel, not from cloudflare.
gabileibo
gabileibo•2y ago
interesting mine was still a no go for derp
Want results from more Discord servers?
Add your server