Code-server: Document that generated self signed certificates go into the data directory

Created on 6 Jun 2020  Â·  9Comments  Â·  Source: cdr/code-server

  1. ~Users can specify paths of the cert and its key in config.yaml if HTTPS is enabled, instead of using --cert and --cert-key.~
  2. ~In the doc directory, I can't find a documentation explaining entries in config.yaml. Luckily, now the config.yaml has a very small number of entries. However, the lack of documentation is always confusing, especially after the file becomes complicated in the future.~ Document that generated self signed certificates go into the data directory

BTW, I have another question: When HTTPS is enabled but the --cert argument is not used, which certificate will be used?

Thanks.

bug docs

Most helpful comment

Sir, I've read these. And I know cert will be generated if no cert path is provided. But, where the generated cert are saved?

Is the FAQ not clear enough about how the config file works?

Oh, sorry. I understood. Firstly, I saw cert: false, I thought cert can only be a boolean value. Now, I found I was wrong. Thanks for your answer.

All 9 comments

Hi @KaneGreen!

The certificate path is mentioned in the guide and the FAQ explains exactly how the config file works.

https://github.com/cdr/code-server/blob/master/doc/FAQ.md#how-does-the-config-file-work

When HTTPS is enabled but the --cert argument is not used, which certificate will be used?

Also explained in the FAQ.

https://github.com/cdr/code-server/blob/master/doc/FAQ.md#how-should-i-expose-code-server-to-the-internet

Soon we do plan on making the cli help output more useful and detailed.

Hi @KaneGreen!

The certificate path is mentioned in the guide and the FAQ explains exactly how the config file works.

https://github.com/cdr/code-server/blob/master/doc/FAQ.md#how-does-the-config-file-work

When HTTPS is enabled but the --cert argument is not used, which certificate will be used?

Also explained in the FAQ.

https://github.com/cdr/code-server/blob/master/doc/FAQ.md#how-should-i-expose-code-server-to-the-internet

Sir, I've read these. And I know cert will be generated if no cert path is provided. But, where the generated cert are saved?

Sir, I've read these. And I know cert will be generated if no cert path is provided. But, where the generated cert are saved?

Is the FAQ not clear enough about how the config file works?

Sir, I've read these. And I know cert will be generated if no cert path is provided. But, where the generated cert are saved?

Great point. It's the data directory but we should document that.

Sir, I've read these. And I know cert will be generated if no cert path is provided. But, where the generated cert are saved?

Is the FAQ not clear enough about how the config file works?

Oh, sorry. I understood. Firstly, I saw cert: false, I thought cert can only be a boolean value. Now, I found I was wrong. Thanks for your answer.

Sir, I've read these. And I know cert will be generated if no cert path is provided. But, where the generated cert are saved?

Great point. It's the data directory but we should document that.

I checked the data directory I specified as --user-data-dir but I can’t find the certificate. Did you mean something else by “data directory”?

I found the certificate in /tmp/code-server/, and it’s implemented in

https://github.com/cdr/code-server/blob/486652abafa9c8bba8f31dbb0481f4c2b61d6e66/src/node/util.ts#L57-L60

So clearly we need to document this place, because even project members don’t know where it is.

Sorry that seems to be a bug. We do need to fix this and document it correctly.

This has been done and will be in the next release!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nol166 picture nol166  Â·  3Comments

Arsaev picture Arsaev  Â·  3Comments

grant picture grant  Â·  3Comments

RealSlimMahdi picture RealSlimMahdi  Â·  3Comments

infogulch picture infogulch  Â·  3Comments