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

How to change the password #548

Closed
oonqt opened this issue Apr 19, 2019 · 14 comments
Closed

How to change the password #548

oonqt opened this issue Apr 19, 2019 · 14 comments

Comments

@oonqt
Copy link
Contributor

oonqt commented Apr 19, 2019

How can I change the password used to authenticate into code-server?

@mbayabo
Copy link

mbayabo commented Apr 20, 2019

If you're using the binary, the latest version of code-server allows you to set an environment variable PASSWORD

export PASSWORD="yourpassword"
./code-server --allow-http

If you're using docker, you can use the -e flag to pass environment variables to your container

docker run -it -p 127.0.0.1:8443:8443 -e PASSWORD='yourpassword' -v "${PWD}:/home/coder/project" codercom/code-server --allow-http

If you're using older versions, you can use the --password argument.

./code-server --allow-http --password "yourpassword"

docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/code-server --allow-http --password "yourpassword"

You can find the documentation here:
https://github.com/codercom/code-server/blob/master/doc/self-hosted/index.md

@ahjsrhj
Copy link

ahjsrhj commented Apr 22, 2019

@mbayabo Why add the parameter of --no-auth?

@mbayabo
Copy link

mbayabo commented Apr 22, 2019

@mbayabo Why add the parameter of --no-auth?

You actually don't need that, sorry.

@MinchinWeb
Copy link

Using the --password option in Docker, code-server complains that it don't recognize the command line option and refuses to start.

@mbayabo
Copy link

mbayabo commented Apr 25, 2019

Using the --password option in Docker, code-server complains that it don't recognize the command line option and refuses to start.

If you're using the newest release, the --password argument has been deprecated. It won't work anymore. You need to set an environment variable called PASSWORD.

export PASSWORD="yourpassword"

@MinchinWeb
Copy link

@mbayabo Thanks! That works for me!

@ntindle
Copy link

ntindle commented Apr 26, 2019

This should be added to the self-hosted guide. Do we want to do that as a new issue?

@oonqt
Copy link
Contributor Author

oonqt commented Apr 26, 2019

This should be added to the self-hosted guide. Do we want to do that as a new issue?

If you actually read the self-hosted guide you would have seen it's already in there bro...
Code-Server Usage

@ntindle
Copy link

ntindle commented Apr 26, 2019

This should be added to the self-hosted guide. Do we want to do that as a new issue?

If you actually read the self-hosted guide you would have seen it's already in there bro...
Code-Server Usage

I must be missing where it says the updated details about environment variables that were introduced in 1.903-vsc1.33.1

@oonqt
Copy link
Contributor Author

oonqt commented Apr 26, 2019

This should be added to the self-hosted guide. Do we want to do that as a new issue?

If you actually read the self-hosted guide you would have seen it's already in there bro...
Code-Server Usage

I must be missing where it says the updated details about environment variables that were introduced in 1.903-vsc1.33.1

My bad, I thought you were talking about the old method of setting passwords

@ntindle
Copy link

ntindle commented Apr 26, 2019

no worries

@mbayabo
Copy link

mbayabo commented Apr 29, 2019

We probably should add it as an issue.

@xinmans
Copy link

xinmans commented Sep 24, 2023

how to disable password when i use docker

@code-asher
Copy link
Member

Something like:

docker run codercom/code-server --auth none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants