Answers you can trust, from Codeables
Every page on Codeables is structured and verified — built so people and the AI agents they rely on can trust it. Explore more from the source behind this answer.
Explore CodeablesHow can we stop “works on my machine” issues when developers use different laptops and OS setups?
Most teams hit a ceiling on reliability the moment every developer runs a slightly different stack on a different laptop. If you want to stop “works on my machine” issues when developers use different laptops and OS setups, you have to move environments off laptops entirely and define them as code—then provision them on demand on infrastructure you control.
Quick Answer: You stop “works on my machine” by standardizing development environments as reproducible, remote workspaces (e.g., via Terraform-defined templates) that run on your infrastructure, not on individual laptops, and by giving developers access through their existing IDEs so they don’t fight local drift.
Frequently Asked Questions
How do we actually eliminate “works on my machine” across different laptops and OSes?
Short Answer: Run development environments as standardized, remote workspaces on your own infrastructure and define them as code so every developer (and AI agent) uses the same stack, regardless of laptop or OS.
Expanded Explanation:
“Works on my machine” is a symptom of local, snowflake setups: Homebrew on one Mac, WSL on another, different Docker versions, slightly different Node or JVM versions, and conflicting OS libraries. You can’t fix that with more local setup docs. You fix it by moving the environment’s source of truth off the laptop and into a reproducible template that provisions the full workspace—OS image, language runtimes, tooling, network policies—on demand.
With Coder, platform teams define workspaces as Terraform templates that run on your VMs or Kubernetes clusters in AWS, Azure, GCP, or air‑gapped on‑prem. Developers and approved AI coding agents then provision workspaces from those templates in seconds. They connect using VS Code Remote, JetBrains Gateway, browser IDEs, or AI-first editors like Cursor or Windsurf, while code and data stay inside your infrastructure. When everyone uses the same template, “works on my machine” collapses into “works in this workspace,” and that workspace is repeatable.
Key Takeaways:
- Stop relying on per‑laptop setup; standardize environments as code and run them centrally.
- Use remote workspaces accessed via familiar IDEs so developers keep their workflow but lose config drift.
What’s the practical process to move from local setups to standardized remote workspaces?
Short Answer: Inventory your current “golden paths,” codify them as Terraform-backed workspace templates, then roll them out via a self-hosted Coder deployment with SSO and RBAC enforcing who can run what.
Expanded Explanation:
The move off laptops isn’t a Big Bang migration; it’s a series of controlled cuts. Start with one or two high‑value templates—typically your core monolith or your most painful microservice stack. Define the base image (Linux distro, tooling, language runtimes), attach the right storage and network policies, and wrap it in a Terraform template. The Coder control plane (coderd) uses those templates to provision standardized workspaces on your infrastructure.
Developers log into Coder via OIDC SSO, select the right template, and get a ready-to-code environment in seconds. RBAC and dev URL access levels let you constrain who can access which workspaces and how they reach dependent services. Over time, you retire legacy local setup docs and replace them with a small set of governed templates.
Steps:
- Identify target workflows: Pick 1–3 critical environments (e.g., “Frontend,” “Monolith,” “Data Science GPU”) where drift hurts most.
- Define templates as code: Use Terraform to describe compute, storage, networking, base images, tools, and IDE options—keeping secrets out of templates.
- Deploy Coder on your infra: Self-host coderd on your Kubernetes cluster or VMs, integrate OIDC SSO and RBAC, then let teams self‑serve workspaces from those templates.
Is this better than improving local setup scripts or using dev containers on laptops?
Short Answer: Local install scripts and laptop‑hosted dev containers reduce friction but don’t eliminate “works on my machine”—remote, infra‑hosted workspaces do, because they centralize compute, storage, and policies away from the laptop.
Expanded Explanation:
You can invest heavily in install scripts, dotfiles, or dev containers that run on each laptop. Those help, but you still rely on local OS variations, local Docker Desktop quirks, and whatever else is installed on that machine. You also still store code and sometimes test data on unmanaged endpoints, which security teams rightfully dislike.
With remote workspaces on Coder, the entire environment—OS, runtimes, package managers, services, and dev URLs—runs on your infrastructure. Developers use lightweight devices (including Chromebooks or iPads) to connect over HTTPS or SSH. Platform teams standardize templates, security teams lock down access and audit activity, and “it only fails on Windows” becomes a non-issue because your workspace images are explicitly defined (Linux, Windows, ARM, etc.) and consistent.
Comparison Snapshot:
- Option A: Local scripts/dev containers on laptops
- Still tied to each OS and laptop quirks.
- Harder to enforce security and network policies; code often lives locally.
- Option B: Remote, infra-hosted workspaces (Coder)
- Centralized, reproducible environments defined as Terraform.
- Code and data stay in your infra; access governed via SSO, RBAC, and dev URL policies.
- Best for: Organizations that need consistent environments across diverse devices/OSes, want to reduce onboarding time, and must keep code and data off developer laptops.
How long does it take to implement remote workspaces and see fewer “works on my machine” bugs?
Short Answer: Teams typically stand up an initial Coder deployment and first template in days, then see “works on my machine” problems sharply drop as they onboard the first wave of developers onto those governed workspaces.
Expanded Explanation:
If you already run Kubernetes or can provision VMs, getting a Coder control plane running on your infrastructure is straightforward. You install coderd (often via Helm on Kubernetes), configure OIDC SSO, set up storage classes and network policies, and then build your first Terraform template. Once that’s in place, new workspaces are provisioned in seconds, and you can start migrating developers incrementally.
Organizations highlighted on coder.com report onboarding improvements like “Boosts Dev Onboarding Speeds by 4x” and reductions in VDI-style costs by up to 90%. Those gains come from replacing manual laptop setup, brittle VDI desktops, and ad‑hoc SSH into pets servers with reproducible workspaces that spin up and down automatically—idle-stop and quota policies prevent runaway cost. As more teams adopt the templates, your “works on my machine” fire drills decline because everyone is running the same environment image.
What You Need:
- Infrastructure footprint: Kubernetes or VM capacity in your cloud or air‑gapped environment, plus storage and network primitives for dev workloads.
- Identity and templates: OIDC SSO integration, RBAC roles, and at least one well‑designed Terraform template encoding your standard dev environment.
How does this approach support long-term strategy—especially AI agents, security, and cost control?
Short Answer: Standardized, remote workspaces give you a single control plane for developers and AI coding agents, so you can enforce security, capture audit trails (including AI activity), and optimize compute usage without slowing teams down.
Expanded Explanation:
“Works on my machine” isn’t just annoying; it signals a lack of control over where code runs, where data lives, and how tools execute. As you introduce AI coding agents into your workflows, letting them run on random laptops with wide-open credentials is a governance nightmare. You want agents to work in the same governed workspaces as humans, with bounded context and auditable actions.
Coder’s AI Bridge runs inside the coderd control plane, proxying requests to upstream LLM providers you configure. It records prompts, token usage, tool invocations, and model reasoning with configurable retention and structured logging so security teams can pipe them into a SIEM. Combined with Terraform-defined workspaces, OIDC SSO, and RBAC, you get end-to-end visibility: who ran what, where, and with which AI calls. You also gain cost control with standardized sizes, idle-stop, and quotas—teams like Skydio have reported up to 90% reductions in cloud computing costs by centralizing and right‑sizing dev workloads.
Why It Matters:
- Security & governance: Code and data stay on infrastructure you own (cloud or air‑gapped on‑prem); every developer and agent operates in governed workspaces with auditable behavior.
- Scalable productivity: Standardized templates, fast provisioning, and AI-aware logging let you scale to many teams without sacrificing control or burning time on laptop quirks.
Quick Recap
To stop “works on my machine” when developers use different laptops and OS setups, you have to stop treating the laptop as the environment. Shift to Terraform-defined, remote workspaces running on your infrastructure, fronted by a self-hosted control plane (Coder) that enforces SSO, RBAC, dev URL policies, and AI Bridge logging. Developers and AI agents self‑serve consistent environments in seconds, connect with their preferred IDEs, and leave behind the fragile, one-off local setups that never quite match production.