EN
Log in Create an account

How to set up Code-Server on Saplo (VS Code in your browser, no installation needed)

Code-Server is a complete Visual Studio Code environment running on your Box and accessible from any browser, whether you use a computer, tablet, or someone else's workstation. You can use it without installing anything locally and without paying a monthly fee for cloud IDE access. Below is a step-by-step guide to setting up Code-Server on Saplo.

Grzegorz Kalmus ·

Sometimes you code from a computer other than your own laptop, for example at a client's office or while travelling, and every time you have to configure your editor, extensions and environment from scratch or install your own SSH keys on someone else's hardware. Code-Server solves this with a single Docker container on your Box: the same Visual Studio Code, the same extensions and a built-in terminal, available from a browser address on any device, while your code and change history stay in one place instead of being scattered across computers. In this guide, we show you how to set up Code-Server on Saplo.

What is Code-Server and who is it for?

Code-Server is the official Docker image codercom/code-server, meaning Visual Studio Code packaged to run on a server and be accessed through a browser rather than a desktop application. The interface, keyboard shortcuts, extension marketplace, and integrated terminal are identical to those in regular VS Code. The only difference is where the editor process physically runs. It is a good fit for a developer who wants to code from any device without having to configure the environment every time, a freelancer who sometimes works on someone else's computer and does not want to leave credentials or client code on it, and a team looking for a shared, always-on development environment instead of a paid cloud IDE.

Requirements

To set up Code-Server on Saplo, you need:

  • a Box with Docker running (the engine enables it automatically when you install from the App catalog, container nesting is required, and Saplo enables it by default),
  • the editor with language servers (LSP) is more demanding than a regular web app, so realistically you should budget for Box M at $69 per year,
  • a domain or a *.saploapp.pl subdomain included with every plan, under which the editor will run,
  • you do NOT need a separate database, Code-Server stores the project and settings in two separate data volumes.

You can find a full description of the app and its place in the App catalog on the Code-Server on Saplo page.

Step-by-step installation

  1. In the Saplo panel, go to App catalog and select Code-Server.
  2. Choose a Box with enough RAM and a Domain or subdomain under which the editor will be hosted.
  3. Confirm the installation. The engine generates a random login password (alphanumeric characters only, with no special characters that docker-compose could interpret as a variable substitution), creates a container from the codercom/code-server image with two separate volumes, one for the working directory /home/coder/project and another for settings and extensions /home/coder/.local/share/code-server, and waits for the container to actually start before considering the installation complete.
  4. The terminal and live editing in the browser work over WebSocket, and the Box's nginx handles Upgrade headers for every application in the catalog, so there is nothing extra to enable.
  5. The login details (just the password, with no username) are saved in the CODE-SERVER-SETUP.txt file in the application directory.

First use

  1. Read the password from the CODE-SERVER-SETUP.txt file in the App catalog.
  2. Open the Domain address in your browser and log in with this password. Logging into Code-Server does not require a username.
  3. Work in the /home/coder/project directory, which appears in the editor as the main project folder. Upload files to it through the built-in terminal (git clone, scp, wget) or through the file manager in the Saplo panel.
  4. Install extensions from the marketplace just like in desktop VS Code. They appear in the settings menu and survive a container restart.
  5. Closing the browser tab does not terminate terminal processes. Long-running tasks (build, tests, development server) continue running on the Box until you log in again.

Code-Server on Saplo vs. cloud IDEs

GitHub Codespaces / Gitpod Code-Server on Saplo
Billing model pay per hour of environment usage, with a limited free monthly plan the cost of the Box alone, with no charge by the hour
Where project data is stored in the provider's infrastructure on your Box
Configuration availability the environment must be restarted from the image for every session the container runs continuously, with no startup time
Your own extensions and settings saved in the provider's profile in the data volume on your Box
Cost depends on the number of hours and the machine's specifications $69 per year (Box M)

Frequently asked questions

Do I need to provide a username when logging in? No, Code-Server uses just a password, with no username. You will find the password in the CODE-SERVER-SETUP.txt file in the application directory.

Can I change the login password? Yes, change the PASSWORD variable in the docker-compose.yml file in the application directory and restart the container from the panel.

Can I install my own extensions and language servers? Yes, the extension marketplace works just like in desktop VS Code, and installed extensions go into a separate settings volume, independent of the project directory.

Do the terminal and live preview require additional configuration? No, WebSocket for the terminal and live editing works out of the box, and nginx in Box already handles the Upgrade headers for every application in the App catalog.

Does Code-Server require a separate database? No, the project and settings are stored in the container's data volumes, with no need for a separate MySQL or Postgres database.

On a single Box, alongside Code-Server, you can also deploy other team tools from the App catalog, with no separate fee for each application. The Saplo application hosting page explains the details.

If you currently pay monthly for a cloud IDE just to access VS Code from any device, contact us and we will help you set up your own Code-Server.

  • #DevOps
  • #Docker
  • #Guide