Code-server is VS Code running on a remote server, accessible through the browser.
- Code on your Chromebook, tablet, and laptop with a consistent dev environment.
- If you have a Windows or Mac workstation, more easily develop for Linux.
- Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
- Preserve battery life when you're on the go.
- All intensive computation runs on your server.
- You're no longer running excess instances of Chrome.
docker run -d \
--name=code-server \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=America/New_York \
-e PASSWORD=password `#optional` \
-e HASHED_PASSWORD= `#optional` \
-e SUDO_PASSWORD=password `#optional` \
-e SUDO_PASSWORD_HASH= `#optional` \
-e PROXY_DOMAIN=code-server.my.domain `#optional` \
-p 8443:8443 \
-v /path/to/appdata/config:/config \
--restart unless-stopped \
ajvolin/code-server
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal>
respectively. For example, -p 8080:80
would expose port 80
from inside the container to be accessible from the host's IP on port 8080
outside the container.
Parameter | Function |
---|---|
-p 8443 |
web gui |
-e PUID=1000 |
for UserID - see below for explanation |
-e PGID=1000 |
for GroupID - see below for explanation |
-e TZ=America/New_York |
Specify a timezone to use |
-e PASSWORD=password |
Optional web gui password, if PASSWORD or HASHED_PASSWORD is not provided, there will be no auth. |
-e HASHED_PASSWORD= |
Optional web gui password, overrides PASSWORD , instructions on how to create it is below. |
-e SUDO_PASSWORD=password |
If this optional variable is set, user will have sudo access in the code-server terminal with the specified password. |
-e SUDO_PASSWORD_HASH= |
Optionally set sudo password via hash (takes priority over SUDO_PASSWORD var). Format is $type$salt$hashed . |
-e PROXY_DOMAIN=code-server.my.domain |
If this optional variable is set, this domain will be proxied for subdomain proxying. See Documentation |
-v /config |
Contains all relevant configuration files. |
Access the webui at http://<your-ip>:8443
.
For github integration, drop your ssh key in to /config/.ssh
.
Then open a terminal from the top menu and set your github username and email via the following commands
git config --global user.name "username"
git config --global user.email "email address"
To create the hashed password, use printf instead of echo as echo introduces newlines in the hash.