How to self-host code-server
The full VS Code editor, in your browser. Cresdock runs it on a server you own, from a catalogue, with no Docker and no reverse proxy to configure.
What Cresdock does for you with code-server
Its configuration is written before the container ever starts, so code-server comes up already set up rather than showing you a blank first-run form.
Given its own web address, still behind your panel login. code-server can't live under a shared path, but it can see your files — so the panel gate stays in front of it.
Your Downloads and Media folders are already mounted, and they are the SAME folders your other apps see — so files land where the rest of your setup expects them, with no path mapping to work out.
Why run code-server yourself
Small tools are where a subscription is hardest to justify: a few pounds a month, times a dozen tools, for software that would run happily on a server you already pay for.
It is also how you retire GitHub Codespaces — one line in replacing cloud subscriptions, app by app.
What kind of server code-server needs
Small. These are the sort of app people run on a server they already have, alongside everything else, without thinking about capacity.
Cresdock itself is undemanding — it runs on a small rented server, an old desktop or a mini PC, on Ubuntu or Debian. Everything it installs shares that machine, so the honest question is not "will this app run" but "how much am I going to put on here in total".
Where to run code-server
code-server runs wherever Cresdock runs, and the choice is about the machine, not the app:
- At home, on hardware you already own. A mini PC, an old desktop or a NAS that can run Debian. Cresdock works behind a home router with no port forwarding and no domain, so code-server is reachable on your own network first and from outside only if you choose.
- On a rented server. A small VPS is enough for most apps and is the usual answer when code-server should be reachable from anywhere. The setup guide covers the specs and the one-command install.
- Through a provider that runs Cresdock. Hosting companies deploy Cresdock workspaces for their customers, so code-server can come with a server you rent rather than one you set up — ask your provider, or see how providers offer it.
Installing code-server
- Put Cresdock on a server
One line on any Ubuntu or Debian machine — a rented VPS, a spare PC, a home server. It sets itself up.
- Pick code-server from the catalogue
Click Install. The panel pulls the image, writes the configuration, gets a certificate and starts it.
- Open it from your dashboard
Its address and any login details are on its card. Start, stop, update, roll back or remove it from the same place, any time.
What this replaces
Doing it by hand means writing something like this, then keeping it working:
services:
codeserver:
image: lscr.io/linuxserver/code-server:4.130.0-ls353
restart: unless-stopped
ports:
- "8443:8443"
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
volumes:
- ./codeserver/config:/config
- ./downloads:/downloads
- ./media:/media
And that is the easy half. Still to do:
Install a reverse proxy and write a server block for it
Get a TLS certificate and set up automatic renewal
Create the folders above with the right ownership, or it will not start
Point a DNS record at the server, because code-server cannot run under a shared path
Repeat all of it for the next app, and again on every server rebuild
On Cresdock, code-server is one click and none of the above exists.
Common questions
Do I need to know Docker to run code-server?
No. Cresdock installs code-server in one click from its catalogue: it pulls the image, writes the configuration, gets an HTTPS certificate and starts it. code-server gets its own web address and its own certificate, because it cannot run under a shared path.
What happens to my files when code-server updates?
Cresdock changes code-server's own configuration only. Your downloads and your media are never touched by an update, a rebuild or a reinstall — that is a rule the software enforces, not a promise in a document.
Can I run code-server at home instead of on a VPS?
Yes. Cresdock runs on a mini PC, an old desktop or anything that boots Debian, behind a normal home router with no port forwarding, and code-server is reachable on your own network first. A rented server is only needed when code-server must be reachable from anywhere without a VPN.
Can I remove code-server later?
Yes. Cresdock removes code-server in one click, and asks whether to keep its configuration for a future reinstall. Nothing else you have installed is affected.
Looking for what code-server itself can do? That lives in its own documentation — this page is only about running it.
Pairs well with: FreshRSS · Home Assistant · cross-seed
Before you start: where to rent a server · what it needs to run · Cresdock vs Cloudron