Self-hosting Code Server the easy way

Self-hosting Code Server the easy way

Yulei Chen - Content-Engineerin bei sliplane.ioYulei Chen
6 min

Code-server runs VS Code in your browser, so you can code from any device with a web connection. It's built by Coder and is completely free and open-source. Whether you want a consistent dev environment across machines or just need to code on a tablet, code-server has you covered.

Sliplane is a managed container platform that makes self-hosting painless. With one-click deployment, you can get code-server up and running in minutes - no server setup, no reverse proxy config, no infrastructure to maintain.

Prerequisites

Before deploying, ensure you have a Sliplane account (free trial available).

Quick start

Sliplane provides one-click deployment with presets.

SliplaneDeploy Code Server >
  1. Click the deploy button above
  2. Select a project
  3. Select a server (If you just signed up you get a 48-hour free trial server)
  4. Click Deploy!

About the preset

The one-click deploy above uses Sliplane's code-server preset. Here's what it includes:

  • LinuxServer.io image (linuxserver/code-server) - a well-maintained community image with regular updates
  • Specific version tag (4.118.0) pinned for stability
  • Persistent storage mounted to /config so your projects, extensions, and settings survive restarts
  • Password protection enabled by default with a randomly generated password
  • Sudo access included with a separate sudo password for installing system packages
  • Default workspace set to /config/workspace so you have a clean starting directory

Next steps

Once code-server is running on Sliplane, open the domain Sliplane assigned (e.g. code-server-xxxx.sliplane.app) in your browser.

Logging in

You'll be prompted for a password. Find it in your service's environment variables on the Sliplane dashboard:

  • PASSWORD - the login password for the web UI

Copy it from the environment variables tab and paste it into the login screen.

Installing extensions

Code-server supports VS Code extensions from the Open VSX Registry. You can install them directly from the Extensions sidebar, just like in regular VS Code. Extensions are stored in /config, so they persist across restarts.

Installing system packages

Need tools like git, python, node, or gcc? Open the integrated terminal and use sudo:

sudo apt update && sudo apt install -y nodejs npm

Use the SUDO_PASSWORD from your environment variables when prompted.

Environment variables

Here are the key environment variables you can customize in the Sliplane dashboard:

VariableDescriptionDefault
PASSWORDLogin password for the web UI(randomly generated)
SUDO_PASSWORDPassword for sudo commands in the terminal(randomly generated)
DEFAULT_WORKSPACEDirectory that opens when you launch code-server/config/workspace
TZTimezone for the containerEurope/Berlin

Logging

Code-server logs go to STDOUT by default, which works well with Sliplane's built-in log viewer. If something isn't working, check the logs in your Sliplane dashboard. For general Docker log tips, check out our post on how to use Docker logs.

Troubleshooting

If code-server shows a blank page or won't load, make sure the PORT environment variable is set to 8443. The LinuxServer image expects this port by default, and Sliplane needs it to route traffic correctly. If extensions aren't persisting, verify that your volume is mounted to /config.

Cost comparison

You can also self-host code-server with other cloud providers. Here is a pricing comparison for the most common ones:

ProvidervCPURAMDiskMonthly CostNote
Sliplane22 GB40 GB€9 (~$10.65)Flat rate, 1 TB bandwidth, SSL included
Fly.io22 GB40 GB~$18Disk and bandwidth billed separately
Render12 GB40 GB~$35100 GB bandwidth, Disk billed separately
Railway22 GB40 GB~$67 + $20 planPro plan floor, usage-based, bandwidth billed separately
Click here to see how these numbers were calculated.

(Assuming an always-on instance running 730 hrs/month)

  • Sliplane: flat €9/month for the Base server. Unlimited services on the same server, 1 TB egress and SSL included.
  • Fly.io: shared-cpu-2x 2 GB = $11.83/mo + 40 GB volume × $0.15/GB = $6 -> ~$17.83/mo. Egress billed separately ($0.02/GB in EU).
  • Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/mo. Stepping up to Pro (2 vCPU / 4 GB) costs $85/mo + disk.
  • Railway (Pro plan): CPU 2 × $0.00000772/s × 2,628,000 s = $40.57; RAM 2 × $0.00000386/s × 2,628,000 s = $20.29; volume 40 × $0.00000006/s × 2,628,000 s = $6.31 -> ~$67/mo compute, plus the $20/mo Pro plan floor and $0.05/GB egress.

Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.

FAQ

What can I use code-server for?

Code-server is perfect for remote development when you want a consistent environment across machines. It's great for coding on tablets or Chromebooks, pair programming with shared access, working on projects from a coffee shop, or keeping your dev environment running 24/7 so long-running tasks don't stop when you close your laptop.

Can I change the default editor settings?

Yes. Code-server stores its VS Code settings in /config/data/Machine/settings.json inside the container. You can edit it directly from the code-server UI via File > Preferences > Settings, just like in desktop VS Code. All changes persist across restarts because the /config volume is mounted.

How do I update code-server?

Go to your service settings in the Sliplane dashboard and change the image tag to the newer version. Check Docker Hub for the latest stable version, then redeploy.

Are there alternatives to code-server?

Yes. Gitpod offers cloud-based development environments with deeper Git integration. GitHub Codespaces provides a similar browser-based VS Code experience tied to GitHub repos. JupyterLab is a great option if you primarily work with notebooks. And if you prefer a full IDE, JetBrains Gateway lets you connect IntelliJ-based IDEs to remote servers. For hosting these yourself, check out our vibe hosting with VS Code guide.

Can I use code-server with Git and SSH keys?

Yes. The integrated terminal has full shell access, so you can configure Git and SSH keys just like on a local machine. Run ssh-keygen in the terminal to generate keys, then add the public key to GitHub or your Git provider. Since the /config volume is persistent, your SSH keys and Git config will survive restarts.

Self-host Code Server now - It's easy!

Sliplane gives you all the tools you need to run code-server without server hassle.