Need help with allowing access to code-server outside of localhost #4524
-
I know this sounds ridiculous, it literally says not to do this in the docs, but hear me out: My network is configured in such a way that there is a separate device handling reverse-proxy connections via caddy, and I need to be able to connect to code-server through the reverse proxy via that device. The only problem is I can't connect to it because code-server is restricted to just localhost. I can't configure caddy to run on the same server as code-server, because that would cause all my services to go down if the server crashes (which happens quite often). Is there a way I could do a local reverse proxy (can't forward ports 80 or 443, as they're already being used, so I can't just have another caddy instance), or allow code-server to listen to local IPs as well as localhost? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hmmm... Try using Cloudflare or ngrok(use HTTP transfer if on ngrok, also the URL changes on every ngrok start so you need to note the URL) |
Beta Was this translation helpful? Give feedback.
-
From what I can tell ngrok, localtunnel, etc. can only forward externally, when I need the server to listen on the local IP so my existing reverse proxy on a separate computer can connect to it. If they have the capability to do so, let me know, but I can’t tell for sure. |
Beta Was this translation helpful? Give feedback.
-
You can make code-server listen on something other than localhost with |
Beta Was this translation helpful? Give feedback.
You can make code-server listen on something other than localhost with
--bind-addr
. For example--bind-addr 0.0.0.0:8080
will bind to all interfaces.