Skip to content

Custom Certificates #7319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jtbrown6 opened this issue Apr 19, 2025 · 0 comments
Open

Custom Certificates #7319

jtbrown6 opened this issue Apr 19, 2025 · 0 comments
Labels
docs Documentation related enhancement Some improvement that isn't a feature

Comments

@jtbrown6
Copy link

What is your suggestion?

Within the documentation, it mentions that the below to add your own cert:

# Replaces "cert: false" with "cert: true" in the code-server config.
sed -i.bak 's/cert: false/cert: true/' ~/.config/code-server/config.yaml
# Replaces "bind-addr: 127.0.0.1:8080" with "bind-addr: 0.0.0.0:443" in the code-server config.
sed -i.bak 's/bind-addr: 127.0.0.1:8080/bind-addr: 0.0.0.0:443/' ~/.config/code-server/config.yaml
# Allows code-server to listen on port 443.
sudo setcap cap_net_bind_service=+ep /usr/lib/code-server/lib/node

It finishes with the final statement regarding the cert and cert-key config fields.

If you'd like to avoid the warnings displayed by code-server when using a self-signed certificate, you can use [mkcert](https://mkcert.dev/) to create a self-signed certificate that's trusted by your operating system, then pass the certificate to code-server via the cert and cert-key config fields.

Issue: when installing via ubuntu to change the config.yaml file, the docs just mentions to pass in the fields which I understand to modify the config.yaml file but its not clear. Nor does it state that the cert:true field should ACTUALLY be changes to the directory of the .pem/.crt file not a boolean value.

How will this improve the docs?

This will clearly state that the config.yaml file should be modified and to pass in the directory of the your-cert.pem file into the cert field instead of a boolean value

Are you interested in submitting a PR for this?

Sure!

@jtbrown6 jtbrown6 added the docs Documentation related label Apr 19, 2025
@coder-labeler coder-labeler bot added the enhancement Some improvement that isn't a feature label Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

1 participant