code-server version: latest tag, server/0.0.0 linux-x64 node-v8.15.0Tried running it behind Traefik reverse proxy. If i browse to my url i get a gateway timeout.
In the traefik dashboard it looks correctly configured:


Running curl http://172.17.0.2:8443 on the remote host works:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /</pre>
</body>
</html>
If i expose the 8443 port publicly and browse to the ip + port it also works fine (with http)
docker run -d --label traefik.port=8443 --label traefik.frontend.rule=Host:ide.DOMAIN.TLD codercom/code-server --allow-httpNvm. I was just stupid myself, if you are wondering about the issue i missed setting the correct network.
What do you mean by missed setting the correct network? I'm having the same response to GET / with docker nginx egresses.
I have traefik running in a docker network and i forgot to "put" the code-server in the same docker network.
@StiviiK would you be willing to share your relevant config for this. My proxy seems to be working as I can access code-server using my domain name however all https redirects to http. I have several other containers working with traefik.
Resolved! I was able to get things working with the following labels:
labels:
- "traefik.enable=true"
- "traefik.backend=vsc"
- "traefik.frontend.rule=Host:vsc.example.org"
- "traefik.protocol=http"
- "traefik.docker.network=web"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=example.org"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
- "traefik.frontend.headers.frameDeny=true"
@warllo54 this are a lot of options you require to get it working, which seems odd. Maybe i'll find my own config because i only evaluated code-server.
Ok if you come here because you try to use the docker-compose in https://hub.docker.com/r/linuxserver/code-server ... Don't be as stupid as me (or StiviiK I guess) Don't forget to add the "netword:" directive....... !
Most helpful comment
I have traefik running in a docker network and i forgot to "put" the
code-serverin the same docker network.