Coder OSS - code-server certificate issue
Hi all,
I've been stumped on this so I'm hoping maybe someone here has seen this before and has any ideas for how to approach solving this. The goal is to host code-server as a Coder workspace. When I try to open the code-server web view, I see the attached screen. It says "code-server is offline! x509: certificate signed by unknown authority." Here are some configuration details:
I'm running Coder OSS on RHEL 8 using Docker Compose. The docker-compose.yaml for the Coder service has the following changes:
coder.mydomain.tld.cer
is a web server certificate chain signed by my domain controller CA. Accessing https://coder.mydomain.tld
works on my devices (both via browser & cli) and the cert chain seems to be configured correctly. The docker host has had the domain CAs added to the trusted ca store.
I've set up code-server using the docker-code-server template. To get it to work, I made some modifications to the template's main.tf
in order to run a script that fetches the certs and adds them to the container's trusted store before downloading the coder agent (this was required to allow curl to securely fetch the agent from the coder service).
The code-server container logs show the following error:
Some research into this specific error led me to discover that Go looks for trusted authorities in a directory that is machine specific. I've added the binary (*.crt) certs to that folder on the code-server container, but I'm still getting this error.
If anyone has any thoughts, I'd greatly appreciate it!8 Replies
Humph, how is your
coder_app
set up in your template?Is this what you mean?
~from
docker-code-server/main.tf
this is wrong
do not bind to https
this should work
the coder agent runs inside your workspace and it relays the
coder_app
s from the inside of the workspace to the coder server
basically
coder agent (workspace) <-> coder <-> user (https)thanks for the help! I'm still trying to understand the architecture here, but that makes sense. let me give that a try.
so it's mad at you because the cert is not in the trust store I assume
ugh, so it looks like the issue is that I was trying to bind to https when coder service was expecting the reach-back on 8080? anyway, with the patch I made to update the trusted root store it works!!
thanks a ton for your help!
truly, this is a brilliant platform. I've really enjoyed diving in. thanks to all the great work from the coder team, and for the correction @Phorcys
nah, I modified your template
well, I personally use http but https works too
if you have future issues, you can resolve the issues by using
/resolve
marking this as resolvedThanks, was wondering how to do that