Default docker-code-server template is stuck on connecting
Hey all, I am trying to test coder but it just says connecting. I have tried both 127.0.0.1, the IP of the server and the external url as the CODER_ACCESS_URL but none seem to make it work.
8 Replies
Hmm... Can you check the logs of the container?
Thanks for following up, Ben. We've managed to figure it out. Turns out we needed to set our
CODER_ACCESS_URL
to our localhost URL and also enable WebSocket forwarding/upgrade in nginx as per https://www.nginx.com/blog/websocket-nginx/Web Team
NGINX
Using NGINX as a WebSocket Proxy
Learn how to use NGINX as a reverse proxy and load balancer for WebSocket applications
Hope this helps someone else with the same issue!
that shouldn't be the case though
my access url is my domain here
i'm afraid that setting your access URL to localhost will break stuff in the future
Ideally, you'd set access URL to the domain / external IP of the server, yeah. As long as Coder/nginx is being served there it should work.
The localhost access URLs will only work with Docker-based templates
well, it would work in others if you replaced in those too, no ?
I guess if you changed the replace to the IP instead of
docker.host.internal
. At that point, you should set an access URL, thoughyeh