code-server — run VS Code in the browser, on a remote machine. Deployed as a host-networked Nomad service with a persistent Docker volume for its config, extensions, and workspace, protected by a password.
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "code-server"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The code-server container image. Pin a tag in production.
image = "codercom/code-server:latest"
# Host port for the code-server web UI. Default 8093 to avoid common clashes.
port = 8093
# Password for the web UI. CHANGE THIS — it is baked into the job env.
password = "changeme"
# Docker named volume for /home/coder (config, extensions, and your files). A prestart task chowns it to uid 1000 (the coder user) so code-server can write it. Back it up.
data_volume = "code_server_data"
# Placement constraints — pin to one node so the local volume stays put. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources.
resources = {
cpu = 1000
memory = 1024
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "code-server" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "codercom/code-server:latest" | The code-server container image. Pin a tag in production. |
| port | number | 8093 | Host port for the code-server web UI. Default 8093 to avoid common clashes. |
| password set me | string | "changeme" | Password for the web UI. CHANGE THIS — it is baked into the job env. |
| data_volume | string | "code_server_data" | Docker named volume for /home/coder (config, extensions, and your files). A prestart task chowns it to uid 1000 (the coder user) so code-server can write it. Back it up. |
| constraints | list | [] | Placement constraints — pin to one node so the local volume stays put. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 1000
memory = 1024
} | The task resources. |
No variables match.
code-server — run VS Code in the browser on a remote machine, so you can code from anything. Host-networked Nomad service with a persistent volume for its config, extensions, and your files.
nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run code-server --registry nomploy --var password=<a-strong-secret>
In nomploy: create a Compose service, type Nomad Pack, pack code-server, set
password, then Deploy.
Open http://<node-ip>:8093 and log in with your password.
| Variable | Default | Notes |
|---|---|---|
image |
codercom/code-server:latest |
Pin a tag in production. |
port |
8093 |
Web UI host port. |
password |
changeme |
Change this — baked into the job env. |
data_volume |
code_server_data |
/home/coder (config, extensions, files). Back it up. |
constraints |
[] |
Pin to a node so the local volume stays put. |
resources |
cpu 1000 / mem 1024 |
Raise for heavier workloads. |
count is fixed to 1 (local volume). A prestart task chowns the volume
to uid 1000 (the coder user). Pin with constraints.data_volume.