Skip to content
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

Document that generated self signed certificates go into the data directory #1778

Closed
KaneGreen opened this issue Jun 6, 2020 · 9 comments
Closed
Assignees
Labels
bug Something isn't working docs Documentation related
Milestone

Comments

@KaneGreen
Copy link

KaneGreen commented Jun 6, 2020

  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.

@nhooyr
Copy link
Contributor

nhooyr commented Jun 6, 2020

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

@nhooyr nhooyr closed this as completed Jun 6, 2020
@nhooyr
Copy link
Contributor

nhooyr commented Jun 6, 2020

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

@KaneGreen
Copy link
Author

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?

@nhooyr
Copy link
Contributor

nhooyr commented Jun 6, 2020

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.

@nhooyr nhooyr reopened this Jun 6, 2020
@nhooyr nhooyr changed the title specify cert path in config.yaml and provide more detailed documentation for config.yaml Document that generated self signed certificates go into the data directory Jun 6, 2020
@KaneGreen
Copy link
Author

KaneGreen commented Jun 6, 2020

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.

@nhooyr nhooyr added docs Documentation related and removed feature labels Jun 9, 2020
@FranklinYu
Copy link

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”?

@FranklinYu
Copy link

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.

@nhooyr
Copy link
Contributor

nhooyr commented Aug 17, 2020

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

@nhooyr nhooyr added the bug Something isn't working label Aug 17, 2020
@nhooyr nhooyr self-assigned this Oct 30, 2020
@nhooyr nhooyr added this to the v3.6.2 milestone Oct 30, 2020
@nhooyr
Copy link
Contributor

nhooyr commented Nov 13, 2020

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

@nhooyr nhooyr closed this as completed Nov 13, 2020
@nhooyr nhooyr mentioned this issue Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docs Documentation related
Projects
None yet
Development

No branches or pull requests

3 participants