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
what's that cloudflare tunnel system ? I've never heard of it
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)
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
Hmm, okay
Will try it
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.
Https can too.
Anyway, no success.
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
But isn't websocket allowed in cf tunnel?
Oh
My bad
Now I see
yes technically it is but there is still some kind of issue with how cloudflared reverse proxies to localhost
The problem that I can't use tailscale app on my iPad. I can't install anything
similar to this issue https://discord.com/channels/747933592273027093/1024759788980146196
If I can give link for browser then I will try set up it
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
But, I need to connect to workspace. So somehow need to get solution
But how do you plan to connect to the workspace? just an ipad and browser or also with desktop?
Just ipad and browser. At home I often use my PC. But it will be good if PC works too
if you only use the browser then cloudflared will work fine. You could use ur PC too but only the browser
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
can u share your cloudflared config?
I'm not at home right now. But I will send it later
Maybe in 40 min or hour
cool, ill be around 🙂
@gabileibo wait, how get config if I set up it in dashboard?
hmm in the dashboard setup is the protocol http or https for localhost:3000?
Yes
Maybe something wrong with coder url?
i mean is it set to http or https on cloudflare?
In cloudflare tunnel it's http, but I tried https too. Not worked
it should be http
and could u also send ur coder config
Okay
@gabileibo
Sorry cant copy to buffer in puTTY
but it anyway start coder in
not 0.0.0.0:3000
@gabileibo seems like i get it working, idk how. Now will try use workspace
Yes, all works now
Marked the thread as resolved.
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?
No idea what you mean by cli.
At my second computer that like home server
With power
from the terminal of your pc
Ah
Seems like work fine
I can coder templates push and etc
are you using it through the browser?
Coder? Yes
But all configured using putty
im curious - could you try to connect to the workspace by ssh?
coder config-ssh
then ssh inHm 1 moment
Just Coder config--ssh on hosg machine?
Or from somewhere else
on your local pc terminal
i stopped workspace
need restart it
cool and now u should be able to run
ssh coder.NodeJS
Seems cool:)
oh nice! well i guess maybe it was something with my deployment
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
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.
interesting mine was still a no go for derp