Files
composes/code-server-base
tiennm99 ac00eb9674 style: order environment variables by how much the service needs them
environment: blocks were in no particular order. They now run must-have ->
should-have -> optional, with related variables kept adjacent as a group that
takes the tier of its most important member: PUID/PGID, PASSWORD with
SUDO_PASSWORD, DOCKER_MODS ahead of the INSTALL_PACKAGES and
NODEJS_MOD_VERSION that configure it, the four GIT_* entries, the PASEO_*
daemon settings.

Each .env.example is reordered to match its compose file. The names do not map
one to one -- PASSWORD feeds both PASSWORD and SUDO_PASSWORD, SERVICE_HOSTNAME
feeds HOST -- so an entry sits where the first compose entry reading it sits.

The HOST comment in both compose files is dropped; the READMEs already carry
that explanation in full. CLAUDE.md records the ordering convention.

alloy and gitea-mirror-local are untouched: every variable there is required,
so the tiers collapse and the existing grouping is the better one.
2026-09-18 10:47:56 +07:00
..

code-server-base

VS Code in the browser, from the LinuxServer image, stock.

The starting point for a new code-server instance: the image as it ships, with no mods and no extra packages. Only a password, a timezone, and a workspace path are set. Copy the directory and add DOCKER_MODS / INSTALL_PACKAGES to build a kitted-out box — code-server is that same image with Go, Node.js, Python, and a pile of CLI tools layered on.

Both use a volume named code-server-config, but Compose namespaces volumes by project and the project is named after the directory, so the two instances stay independent.

Environment

Variable Purpose
PASSWORD Web UI login, also the in-container sudo password. A blank value disables authentication entirely.

Generate a password with openssl rand -base64 24.

PUID/PGID are pinned to 1000 and TZ to Asia/Ho_Chi_Minh in the compose file — the first user on my hosts, and my timezone. Change them in place if neither holds.

The upstream example also offers HASHED_PASSWORD, SUDO_PASSWORD_HASH, and PROXY_DOMAIN. The hash variants are left out because the plaintext ones already come from a gitignored .env, and PROXY_DOMAIN because Coolify and Dokploy terminate the domain at their own proxy.

Networking

Listens on 8443. No ports are published — point the domain at that port in Coolify or Dokploy. See the root README for why.

Storage

Everything lives in the code-server-config named volume mounted at /config; the default workspace is /config/workspace. Removing the volume wipes your files, settings, and extensions.