[Docker] Code-server on Synology NAS
![[Docker] Code-server on Synology NAS](/content/images/size/w1200/2025/09/code-server.png)
While VSCodium runs in a container and requires VNC to access, code-server feels like a fully web-native version of VS Code. The interface integrates directly into the browser, making it look and feel much cleaner. If I had to pick one for real use, I’d definitely prefer code-server.
Here’s my docker-compose.yaml
setup:
services:
# ── code-server (VS Code in browser) ──────────────────
code-server:
image: lscr.io/linuxserver/code-server:latest
container_name: code-server
environment:
- PUID=1026 # <<< EDIT: your NAS user ID
- PGID=100 # <<< EDIT: your NAS group ID
- TZ=Asia/Seoul
- PASSWORD=STRONG_PASSWORD # <<< EDIT: access password
# - HASHED_PASSWORD= # (optional) use instead of PASSWORD
# - SUDO_PASSWORD= # (optional) for sudo inside container
# - PROXY_DOMAIN=code.wody.kr # (optional) for reverse proxy domain
volumes:
- /volume1/docker/code-server/config:/config # config, extensions, settings
- /volume1/docker/code-server/projects:/projects # your workspace/projects
ports:
- "8443:8443" # web access → https://NAS-IP:8443
restart: unless-stopped
networks:
- code-net
networks:
code-net:
driver: bridge
Key Notes
- User & Group IDs
Just like with my other Docker setups, I specifiedPUID
andPGID
to match my Synology NAS account. This ensures that files created inside the container map correctly to my NAS folders. - Password Protection
Adding thePASSWORD
environment variable automatically enforces a login screen when accessing code-server in the browser. - Workspace Volume
I mounted a dedicated folder for my projects (workspace
) so I can conveniently edit files stored on my NAS. - Language Pack (Korean)
After installation, simply search for “Korean” in the VS Code extensions marketplace and install the language pack. This makes the entire interface available in Korean if needed.
✅ With this setup, code-server feels just like running VS Code natively in the browser—no VNC required, seamless integration, and easy extensibility with VS Code extensions.