💻 Setup Code Server — VS Code in Your Browser
Deploy Code Server on Ubuntu with Docker — run VS Code in your browser, develop from any device with a consistent environment.
📦 Resources & Setup Scripts
Grab the automated bash script from GitHub to follow along with the video.
Quick Install:
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/dev/code-server/code-server-ubuntu.sh
chmod +x code-server-ubuntu.sh
sudo bash code-server-ubuntu.sh
Tutorial Steps
1 Download the Script
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/dev/code-server/code-server-ubuntu.sh
2 Make it Executable
chmod +x code-server-ubuntu.sh
3 Run the Installer
The script installs Docker if needed, then deploys Code Server with persistent workspace storage.
sudo bash code-server-ubuntu.sh
4 Access Web UI
Open browser and navigate to:
http://<your-server-ip>:8080
5 Install Extensions and Configure
Log in with your password, install your favorite VS Code extensions from the marketplace, and configure settings — everything persists across restarts.
# Retrieve the auto-generated password
docker exec -it code-server cat /home/coder/.config/code-server/config.yaml
Ports Used
| Port | Purpose |
|---|---|
| 8080 | Code Server Web UI |
Overview
code-server runs VS Code entirely in the browser, giving you a full development environment accessible from any device with an internet connection. It is ideal for teams that want a consistent, cloud-based IDE without installing anything locally.
Why Use It
Code Server gives you a full VS Code experience — extensions, themes, terminal, git integration — accessible from any browser on any device. Your workspace lives on a powerful server instead of your laptop: builds are faster, data never leaves your infrastructure, and you can switch devices mid-session without losing state. Perfect for developers working on tablets, Chromebooks, or shared machines.
When You Need It
Who Should Use It
Real Use Cases
Main Features
How to Use After Installation
Security Best Practices
Ports and Firewall Notes
Port 8080 for the web UI. Put Nginx Proxy Manager in front on 443 with HTTPS. Never expose 8080 directly to the internet. The integrated terminal runs on your server — treat this port as highly sensitive.
Backup and Maintenance
Common Mistakes
Troubleshooting
Alternatives
Direct alternatives: Coder (team-scale, Terraform workspaces), Theia (more open, Eclipse-based), VS Code Tunnel (official VS Code remote, no self-hosting needed). Cloud: GitHub Codespaces (tight GitHub integration), Gitpod (generous free tier). Code Server is best when you want VS Code in a browser for personal/small-team use without complexity.
When Not to Use It
Don't use Code Server for a team of more than 2-3 people — Coder is built for team management, quotas, and multi-user workspace lifecycle. And if you just want remote VS Code access to your local machine, VS Code Tunnel (built into VS Code) is simpler and requires no server setup.
PrismaTechWork Professional Help
PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.
Frequently Asked Questions
Is Code Server exactly the same as VS Code?
Almost — Code Server uses the VS Code open-source core (Code OSS). The extension marketplace, Microsoft Live Share, and Copilot have restrictions due to Microsoft's licensing. Most extensions work fine; a small number require the official VS Code binary.
Can I use my VS Code settings and extensions?
Yes — install extensions from the marketplace inside Code Server. For settings, you can copy your `settings.json` and `keybindings.json` into the container. VS Code Settings Sync (GitHub-based) works with some limitations.
Does Code Server support multiple users?
No — Code Server is designed for a single user. For multi-user setups, run separate Code Server instances per user (each on a different port) or use Coder which manages multi-user workspaces.
Can I access my running dev server from the browser?
Yes — Code Server forwards ports automatically. When your app starts on port 3000 inside the container, Code Server proxies it through its own URL. Click the 'Open in Browser' notification or use the Ports panel.
How do I install extensions that aren't on the Open VSX marketplace?
Download the `.vsix` file from the VS Code Marketplace or GitHub releases, then drag it into Code Server or install via CLI: `code-server --install-extension /path/to/extension.vsix`.
Can Code Server work on a Raspberry Pi or ARM device?
Yes — Code Server has ARM64 builds. Performance will be limited on Raspberry Pi (recommend Pi 4 with 4 GB RAM minimum). It works well for light editing and scripting tasks.
How do I set up git authentication inside Code Server?
Use SSH keys (mount `~/.ssh` into the container) or HTTPS with a git credential helper. For GitHub: `git config --global credential.helper store` and authenticate once, then credentials persist in the workspace volume.
How do I upgrade Code Server?
Run `docker compose pull && docker compose up -d`. Your workspace files and extensions persist in the mounted volume. No migration steps are needed for minor upgrades — check the changelog for major version changes.