[Docker] VSCodium on Synology NAS
Learn how to install and run VSCodium on Synology NAS using Docker. Includes step-by-step setup, security enhancements, and customization tips for long-term usability.
VSCodium, a fully open-source build of Microsoft’s Visual Studio Code, has become a go-to tool for developers who prefer privacy and transparency. Unlike the Microsoft-branded VS Code, VSCodium removes telemetry and proprietary licensing, providing a clean, community-driven version of the same powerful editor.
Installing VSCodium on a Synology NAS using Docker gives you a lightweight, web-accessible coding environment that runs directly from your server—no local installation needed. Even if you’re not coding daily, it’s a handy utility to have on standby for quick edits, automation tasks, or testing scripts right from your browser.
Let’s explore how to set it up properly, make it secure, and optimize it for future use.
Why Install VSCodium on Synology NAS
You might wonder, “Why bother running a code editor on a NAS?” The answer is flexibility and future readiness.
Synology NAS devices are more than just storage boxes—they’re small but capable servers. Running VSCodium inside a Docker container allows you to:
- Access VS Code anywhere: Work from any browser without installing a local IDE.
- Keep everything self-hosted: Your code and data stay within your NAS environment—no cloud dependency.
- Centralize scripts and automations: Manage Docker Compose files, automation scripts, or Python projects from the same NAS.
- Future-proof your setup: Even if you don’t need it now, having it ready saves time later when inspiration (or necessity) strikes.
Think of it as having a remote coding lab tucked inside your NAS—always ready but unobtrusive.
Step 1: Prepare Your Synology NAS for Docker
Before diving into the configuration, make sure your NAS environment is Docker-ready.
- Install Docker / Container Manager:
Open the Synology Package Center, search for Docker (or Container Manager on DSM 7.x), and install it. - Enable SSH Access (Optional but Recommended):
Go to Control Panel → Terminal & SNMP → Enable SSH Service.
This allows you to connect to your NAS terminal and retrieve user/group IDs.
Find Your User and Group IDs:
SSH into your NAS and run:
id yourusername
Typical output might look like:
uid=1026(yourusername) gid=100(users)
These numbers (PUID and PGID) are required in your Docker Compose file to ensure proper file permissions inside the container.
Step 2: Create the Folder Structure
To keep things organized, create a directory for VSCodium:
/volume1/docker/vscodium/config→ Stores configuration, extensions, and preferences.
You can create these folders from File Station or via SSH:
mkdir -p /volume1/docker/vscodium/config
Make sure your user has read/write access to this folder.
Step 3: Write the Docker Compose File
Now comes the fun part — the docker-compose.yml setup.
Here’s a working configuration with useful security and customization options:
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
Save the file as /volume1/docker/vscodium/docker-compose.yml.
Then open Container Manager → Projects → Add and upload the compose file to deploy.
Step 4: Start and Access VSCodium
Once the container is running, open your browser and visit:
http://NAS-IP:4000
You’ll see a login prompt asking for your CUSTOM_USER and PASSWORD.
After logging in, the familiar VS Code interface appears — all within your browser.
From here, you can:
- Install extensions (they’ll persist thanks to your
/configvolume). - Create and edit files directly inside your container.
- Connect to external directories or remote servers.
Step 5: Secure Your Setup
While the basic setup works, exposing VSCodium directly to your network can be risky if left unsecured. Let’s reinforce it a bit.
- Use Strong Credentials:
Set a long, unique password. Avoid default names like “admin” or “user.” - Reverse Proxy with SSL:
Configure Synology’s built-in reverse proxy to map a subdomain likecode.yourdomain.comtolocalhost:4000.
Then, enable HTTPS with a free Let’s Encrypt certificate in Control Panel → Security → Certificates. - Restrict Access by IP (Optional):
In DSM → Control Panel → Application Portal → Reverse Proxy, add IP restrictions under “Advanced Settings.” - Use
no-new-privilegesSecurity Option:
Already included in this setup—it ensures that even if the container is compromised, it can’t escalate privileges.
Step 6: Optional Enhancements
Once you start using VSCodium more often, consider the following upgrades.
Add a Workspace Volume
Mount your actual NAS file directory to VSCodium so you can work directly on stored files:
volumes:
- /volume1/docker/vscodium/config:/config
- /volume1/web/projects:/home/projects
This lets you open your NAS project folders inside VSCodium — perfect for web development or automation scripts.
Increase Shared Memory (shm_size)
The shm_size: "1gb" line improves Electron’s stability and performance.
If you notice interface lags or crashes, you can increase it further (e.g., 2GB).
Access via VNC
The optional port 4001:3001 allows graphical VNC access. This is useful if the web interface fails or if you want to connect using a local VNC client.
Step 7: Maintenance and Updates
Keeping your container updated is easy:
- Open Container Manager → Image → Check for Updates.
- Pull the latest VSCodium image.
- Re-deploy the container.
Your data (settings, extensions) are safe because they live in the mounted/configvolume.
To back up, simply copy /volume1/docker/vscodium/config—this contains all your user settings and installed plugins.
Troubleshooting Common Issues
1. Login doesn’t appear / Browser blank page
Make sure the container started properly and the port (4000) isn’t already in use. You can also check logs under Container Manager → Logs.
2. GUI feels slow or laggy
Increase shm_size and ensure your NAS has enough RAM (at least 2GB free for smooth operation).
3. Permissions errors when saving files
Recheck your PUID and PGID. They must match your DSM account IDs.
4. SSL reverse proxy not loading
Confirm the reverse proxy mapping points to localhost:4000 and that your SSL certificate is correctly assigned.
When to Use VSCodium on NAS
Even if you’re not a full-time developer, there are many practical uses for hosting VSCodium on your Synology NAS:
- Editing configuration files or Docker Compose setups directly on the server.
- Writing scripts for automation (Python, Bash, or Node.js).
- Maintaining documentation or markdown-based notes.
- Testing code snippets without cluttering your main computer.
- Accessing your development environment remotely.
Having a pre-configured VSCodium instance ready to go can save precious time when you suddenly need to make code changes or test something on your network.
FAQs
1. Is VSCodium the same as VS Code?
Almost. It’s built from the same open-source codebase but removes Microsoft’s telemetry and branding.
2. Can multiple users access it simultaneously?
Not recommended. This setup is meant for single-user access. For multi-user scenarios, consider separate containers with different ports or credentials.
3. Is it safe to expose it to the internet?
Only if secured with HTTPS and strong authentication. Ideally, restrict access using a VPN or IP whitelist.
4. Can I install extensions?
Yes. All extensions installed via the web interface persist in /config.
5. How do I update VSCodium?
Pull the latest image in Container Manager and restart the container. Your settings remain intact.
6. What’s the performance like compared to local VS Code?
Surprisingly good, especially on midrange NAS models like the DS920+. The performance gap is minimal for most use cases.
Conclusion
By setting up VSCodium on your Synology NAS using Docker, you’ve created a secure, browser-accessible development environment that’s private, portable, and always ready. Even if you’re not coding daily, it’s an excellent tool to have on standby for maintenance tasks, quick edits, or learning new skills.
This setup is the perfect blend of minimalism and preparedness—quietly waiting on your NAS until the next project calls for it.
External Resource:
For more on the LinuxServer.io VSCodium image, visit https://docs.linuxserver.io/images/docker-vscodium.