code-server
code-server is Visual Studio Code running on a remote server, accessible through any web browser. It provides the full VS Code experience including IntelliSense, extensions, terminal access, debugging, and Git integration โ all from a browser tab. This stack uses the LinuxServer.io code-server image, which provides a well-maintained container with user/group ID mapping and automatic updates. Your workspace, extensions, and configuration are persisted in a named volume so nothing is lost on container restarts. code-server supports password authentication, custom proxy domains, and can be placed behind a reverse proxy with SSL for secure remote development. After deployment, access the IDE on port 8443 using the configured password. Install extensions from the Open VSX registry and start coding from anywhere.
Included Services
code-server
lscr.io/linuxserver/code-server:latest
Environment Variables:
Generated YAML
# Generated by ComposeHub (composehub.dev)
name: code-server
services:
code-server:
image: lscr.io/linuxserver/code-server:latest
restart: always
ports:
- 8443:8443
volumes:
- codeserver_config:/config
environment:
PUID: ${PUID:-1000}
PGID: ${PGID:-1000}
TZ: ${TZ:-UTC}
PASSWORD: ${PASSWORD:-changeme}
SUDO_PASSWORD: ${SUDO_PASSWORD:-changeme}
PROXY_DOMAIN: ${PROXY_DOMAIN:-}
DEFAULT_WORKSPACE: ${DEFAULT_WORKSPACE:-/config/workspace}
networks:
- code-server
healthcheck:
test:
- CMD-SHELL
- curl -f http://localhost:8443/healthz || exit 1
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
deploy:
resources:
limits:
cpus: "2.00"
memory: 2048M
reservations:
cpus: "0.25"
memory: 256M
labels:
com.composehub.description: code-server โ VS Code in the browser
networks:
code-server:
driver: bridge
volumes:
codeserver_config:
driver: local
Quick Info
- Services
- 1
- Networks
- 1
- Volumes
- 1
When to Use
This template is ideal for setting up a code-server environment. All services are pre-configured with healthchecks, resource limits, and sensible defaults. Customize environment variables before deploying to production.
Tips
- Change all default passwords before deploying
- Review resource limits for your hardware
- Add a reverse proxy for production HTTPS
- Configure backup strategies for data volumes