Self-host code-server with Levelrail
Run VS Code in the browser, on your own hardware, from any device with a tab open.
- Authorcoder
- LicenceMIT
- Memory512 MiB
- Archarm64
- Services1
How to self-host code-server
-
Pull the images
One image is pulled on your server.
Show images
codercom/code-server:4.93.1
-
Create the app
One service starts in a single Compose app, with 1 named volume mount for your data, on port 8080.
-
Fill in the secrets
1 secret is generated and stored encrypted, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
code-server requirements
- Memory
- About 512 MiB
- Architectures
- amd64 image published, arm64 image published
- Ports
- 8080
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- MIT, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
- Host ports. It publishes port 8080 on the host, so open them in the VPS firewall only if you want that.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then code-server. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the code-server docs page.
Deploy code-server your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy code-server from the CLI
levelrail-cli templates deploy code-server --name my-code-server Deploy code-server with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/code-server/deploy code-server configuration
code-server services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| code-server | codercom/code-server:4.93.1 | 8080 | code_server_data -> /home/coder/project |
code-server environment variables
| Variable | Service | Value |
|---|---|---|
| PASSWORD | code-server | Generated at deploy |
Ports and volumes
- Ports
- 8080
- Volumes
- 1 named mount: code_server_data -> /home/coder/project
code-server FAQ
How much memory does code-server need?
The catalog lists about 512 MiB of memory for code-server.
Does code-server run on arm64?
For code-server, an arm64 image is published; amd64 is image published.
What licence is code-server under?
code-server is licensed under MIT, which is permissive, with few conditions on reuse.
Does code-server need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which ports does code-server use?
code-server listens on port 8080 inside the stack.
Where does code-server keep its data?
In a named volume: code_server_data mounted at /home/coder/project.
Can I deploy code-server on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id code-server for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image codercom/code-server:4.93.1 is what you deploy there.