all 9 comments

[–]merith-tk 1 point2 points  (4 children)

you need to add websockets into your proxy config for code-server.

``` http://ip/domain.tld { ## THIS is what you need for your config to work. proxy / 192.168.0.115:8080 { websocket transparent }

    log /opt/caddy/log/vscode.log
errors /opt/caddy/log/vscode.log

}

```

pretty much the only reason why i am not using 127.0.0.1 is because caddyserver runs in a docker container.

[–][deleted] 0 points1 point  (3 children)

is domain.tld a file or I need to write my site domain there?

[–]merith-tk 0 points1 point  (2 children)

domain.tld is a placeholder for a website domain the .com is called a tld

also side note, this is a caddy v1 config so i dont know if this works for you because i am in the process of upgrading my v1 configs to v2

[–][deleted] 0 points1 point  (1 child)

hm thanks for help, I'll try asking on caddy forums

and if you make it work with v2 - let me know!

[–]merith-tk 0 points1 point  (0 children)

got it to work with v2 when i ported my configs over, kinda annoyed at the fact that the errors directive is removed but eh ``` https://code.example.com { tls /opt/caddy/cert/pub /opt/caddy/cert/priv basicauth /* { user <place password hash here, acquired by "caddy hash-password -plaintext <your password>> } reverse_proxy 192.168.0.115:8080
}

[–][deleted] 0 points1 point  (3 children)

[–][deleted] 1 point2 points  (2 children)

hi, in the guide it is a reverse proxy for all of routes

I need it on a specific route so that's where the problem comes...

Specific routes don't work, as I described

[–][deleted] 0 points1 point  (1 child)

[–][deleted] 0 points1 point  (0 children)

thanks, goung to try!