Cloud Development Environments: Coding on Remote Machines
When builds crawl and onboarding takes days, the laptop stops being the right place to develop. This guide compares personal SSH machines, dev containers and hosted workspaces, then builds a remote environment that stays fast, reproducible and cheap.

When the Laptop Stops Being the Right Place to Build
There is a moment in most projects when local development starts costing more than it gives. The test suite takes twenty minutes on a laptop and four on a real machine. The stack needs more memory than the laptop has. A new contributor spends two days installing dependencies. Or the work involves data that should never be copied onto a device that travels.
A cloud development environment answers all four. The code, the dependencies and the running processes live on a server; the laptop becomes a screen, a keyboard and an editor.
The idea is old, but the tooling has improved enormously. This article covers the three shapes a remote environment can take, how to set up the most portable one properly, and the practical concerns that decide whether people keep using it: latency, persistence, secrets and cost.
Three Shapes, Different Trade-Offs
| Model | What it is | Suits | Weakness |
|---|---|---|---|
| Your own server over SSH | A cloud VM you provision, with your editor connecting over SSH | Individuals and small teams who want full control and predictable cost | You build the automation and remember to switch it off |
| Declarative dev containers | A container definition committed to the repository, built on a remote host | Teams who want every contributor on an identical toolchain | Requires the project to be containerisable and the definition to be maintained |
| Hosted workspace services | A vendor product that creates an environment per branch or per developer | Larger teams, onboarding heavy work, strict data controls | Cost scales per seat and the environment is shaped by the vendor |
These combine rather than compete. The common end state is a dev container definition in the repository that runs on a personal cloud VM, so the toolchain is reproducible and the host is yours. Hosted services such as Google Cloud Workstations, Azure Dev Box and GitHub Codespaces implement the same pattern with the provisioning handled for you.
Start with the first model even if you expect to end up on the third. Building it once teaches you where the friction actually is, which makes any later evaluation of a hosted product far better informed.
Building a Personal Remote Machine
Pick a region close to you. Keystroke latency is the property that decides whether a remote environment feels pleasant or irritating, and geography dominates it. A machine two time zones away is fine; a machine on another continent is not, whatever the specification says.
Size for the build, not the editor. Compilation, test suites and container builds want cores and memory; the editing experience barely uses either. Fast local NVMe storage matters more than most people expect, because dependency installs and incremental builds are dominated by small file operations.
The setup sequence is short:
- Create the instance and add your SSH key at creation time, as described in the SSH key guide.
- Create a non-root user, enable the firewall with only SSH open, and disable password authentication.
- Add a
Host devblock to~/.ssh/configwith the address, user and key, so every tool that speaks SSH can reach it by name. - Install the language runtimes, or install a container engine and let the project definition supply them.
- Clone the repository into a predictable path such as
~/src/project.
Providers with generous memory and local NVMe suit this well. A Hetzner account is a frequent choice for a personal build machine in Europe, while a Scaleway account offers a similar footprint with a different regional spread; the Scaleway and Hetzner comparison covers how they differ.
Connecting the Editor
Three approaches work well, and all of them keep the files on the server.
Remote SSH from a graphical editor. Visual Studio Code installs a small server component on the remote host on first connection, then runs the language servers, terminal and extensions there while the interface stays local. JetBrains Gateway does the equivalent for its IDEs. This is the closest thing to a local experience and handles large repositories well.
Terminal editors over a resilient session. Neovim or Emacs inside tmux means a dropped connection costs nothing: reconnect and tmux attach puts you back exactly where you were. Pair it with mosh if your network changes often, since it survives roaming and hides round trip latency on echo.
A browser based editor. Convenient on a borrowed machine, weaker on keyboard shortcuts because the browser claims several of them.
What to avoid is mounting the remote filesystem locally with sshfs and running a local editor against it. Every file watch and every dependency scan then crosses the network, and the result is slow in a way that is hard to diagnose.
Forward ports rather than exposing them. ssh -L 3000:localhost:3000 dev makes the remote application available at localhost:3000 in your browser without opening anything to the internet. Editors with remote support do this automatically when they detect a listening port.
Making the Environment Reproducible
A remote machine that only one person can rebuild is a liability. Two mechanisms fix that, and they work together.
The first is a dev container definition. A devcontainer.json file in the repository names a base image, the tools to add, the ports to forward and the commands to run after creation. Editors that support the open dev container specification read it and build the environment automatically, so a new contributor gets the same toolchain as everyone else. The container engine underneath is the same one described in the Docker guide.
The second is a dotfiles repository. Shell configuration, editor settings and aliases belong in version control with an install script, so a rebuilt machine feels like yours within a minute. Keep secrets out of it; the dotfiles repository is the single most common place an API token escapes.
Treat the machine itself as replaceable. Nothing valuable should exist only there: code is pushed, configuration is in dotfiles, and scratch data can be regenerated. Once that is true, destroying and recreating the environment becomes routine rather than frightening, and a provisioning script or cloud-init file makes it a single command.
Cost, and the Habit That Controls It
A development machine that runs continuously costs the same as a production machine that serves customers, which is absurd for something used a few hours a day. Three habits keep it sensible.
Stop the instance when you finish. Most providers bill compute only while an instance runs, though attached storage and reserved addresses usually continue to bill, so expect a small standing cost. Starting it again takes under a minute and a shell alias makes it painless.
Automate the fallback. A cron job that checks for active sessions and shuts down after a long idle period catches the evenings you forget. Shutting down from inside the guest stops the billing clock on most platforms only if the provider treats the instance as stopped, so verify the behaviour once rather than assuming it.
Put a budget alert on the account. This is a small enough line item that it hides easily, and the cost monitoring guide shows how to catch it. If several people share the pattern, tag every development instance with an owner so an unattributed machine stands out immediately.
Key Takeaways
- Remote development wins when builds are slow, the stack is heavy, onboarding is painful, or the data should not travel.
- Choose the region for latency first; specification second. Keystroke lag decides whether the setup survives the first week.
- Keep files on the server and connect with a remote-aware editor or a terminal multiplexer. Do not mount the project over the network.
- Commit a dev container definition for team reproducibility and keep personal configuration in a dotfiles repository.
- Forward ports over SSH instead of opening them, and keep production credentials off the development machine.
- Stop the instance when idle, automate the fallback shutdown, and alert on the cost.
Questions about a cloud account?
Ask about products, variants, availability or purchasing on either channel.


