[Docker] VSCodium on Synology NAS
![[Docker] VSCodium on Synology NAS](/content/images/size/w1200/2025/09/code-server-1.png)
I decided to install VSCodium on my Synology NAS using Docker. Honestly, I’m not sure if I’ll use it much right now, but I figured it could be handy to have it set up for the future. That’s pretty much the case with most of the applications I experiment with on Docker—something I may not need today, but could become useful later.
Here’s my docker-compose.yaml
configuration:
services:
# ── VSCodium (Web-based VS Code build via LinuxServer.io) ──
vscodium:
image: lscr.io/linuxserver/vscodium:latest
container_name: vscodium
cap_add:
- IPC_LOCK # Prevent memory swapping (better perf)
security_opt:
# - seccomp:unconfined # Optional: loosen restrictions if GUI issues
- no-new-privileges:true # Prevent privilege escalation
environment:
- PUID=1026 # NAS user ID (adjust to match DSM account)
- PGID=100 # NAS group ID (adjust if needed)
- TZ=America/New_York # Set timezone
- CUSTOM_USER=YOUROWNUSERNAME # Login username
- PASSWORD=YOUROWNPASSWORD # Login password
volumes:
- /volume1/docker/vscodium/config:/config # Config and extensions
ports:
- "4000:3000" # Web access
- "4001:3001" # NoVNC/VNC (optional)
shm_size: "1gb" # Shared memory (for Electron-based apps)
restart: unless-stopped
I used several online references to get this running, but then customized a few things to fit my needs:
- Security Options: I adjusted the security options for a safer setup.
- User & Group IDs: Updated
PUID
andPGID
to match my Synology NAS account. You can easily find these by running theid
command via SSH. On Synology, the first user account typically starts with1026
, and the group ID100
usually corresponds to the defaultusers
group. - Login Credentials: To prevent open access to VSCodium just by knowing the URL, I added
CUSTOM_USER
andPASSWORD
environment variables. This enforces a username/password login prompt.
If I end up using VSCodium more often, I’ll probably add a dedicated workspace volume so I can work directly with files stored on my NAS. That should make it much more practical for real use.