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 Codeables
Verified Source
AI Coding Agent Platforms

How do we keep source code off developer laptops (especially contractors/BYOD) but still let them use VS Code or JetBrains?

Coder7 min read

Most teams hit this question the moment contractors and BYOD devices enter the picture: you want developers in VS Code or JetBrains, but you cannot let source code and sensitive data live on their laptops. The answer is to move the dev environment into your infrastructure and treat laptops as thin clients—while still using native IDEs over secure remote protocols.

Quick Answer: Keep all source code and tools in remote, self-hosted development workspaces running in your infrastructure (cloud or air‑gapped on‑premises), and let developers connect with VS Code Remote or JetBrains Gateway over HTTPS/SSH so nothing ever lands on their local disks.

Frequently Asked Questions

How do we keep source code off developer laptops but still allow VS Code / JetBrains?

Short Answer: Run development environments as remote workspaces in your infrastructure and connect to them via VS Code Remote or JetBrains Gateway, so source code never leaves your controlled environment.

Expanded Explanation:
Instead of cloning repos and installing toolchains onto every contractor’s laptop, you provision “workspaces” in your cloud or on‑premises clusters. Those workspaces hold the code, build tools, and credentials. Developers use their existing IDEs in a remote mode (VS Code Remote SSH / Tunnels, JetBrains Gateway) to interact with that workspace over secure channels.

Coder gives you a control plane (coderd) that provisions these workspaces from Terraform templates on Kubernetes or VMs. Code and data stay in your infrastructure, including air‑gapped environments, while laptops—corporate or BYOD—just render an editor and forward keystrokes. That drastically shrinks your attack surface and removes the need to trust every endpoint.

Key Takeaways:

  • Keep repos, dependencies, and secrets in remote workspaces, not on laptops.
  • Use VS Code Remote and JetBrains Gateway to connect to self‑hosted workspaces over HTTPS/SSH.

What does the process look like to move off local dev onto governed remote workspaces?

Short Answer: You define a “golden path” workspace in Terraform, deploy Coder on your infrastructure, and let developers self‑serve workspaces that connect back to their IDEs in seconds.

Expanded Explanation:
Shifting from laptop‑centric dev to governed remote workspaces is mostly an infrastructure and template exercise. Platform teams stand up Coder in their cloud or on‑prem environment and describe each workspace as Terraform: base image, CPU/RAM, storage, network policies, preinstalled SDKs, and permitted IDEs. Coder then spins up these standardized containers or VMs on demand.

Developers authenticate via your identity provider (OIDC SSO) and request a workspace based on the approved templates. Within seconds, they get a running environment reachable through VS Code Remote, JetBrains Gateway, or a browser IDE if they prefer. Contractors and BYOD users never receive direct access to your VPC or databases—just to their governed workspace endpoints.

Steps:

  1. Stand up Coder on your infrastructure.
    Install coderd in your cloud or air‑gapped Kubernetes/VM environment, fronted by HTTPS, integrated with your IDP via OIDC SSO.
  2. Define Terraform‑backed workspace templates.
    Capture OS images, toolchains, network constraints, dev URLs, and GPU/CPU sizing as Terraform, including multiple templates (e.g., backend, data science, ML).
  3. Roll out self‑service workspaces.
    Assign templates to teams via RBAC, let devs and AI coding agents provision workspaces in seconds, and connect with VS Code Remote, JetBrains Gateway, Cursor, Windsurf, or browser IDEs.

How is this different from VDI or a generic remote desktop?

Short Answer: VDI streams an entire desktop to the user, while Coder provisions per‑project development workspaces as code, with fine‑grained control over compute, access, and auditability.

Expanded Explanation:
Traditional VDI gives users a full remote Windows/Linux desktop. It’s heavy, expensive to scale, and hard to standardize for different stacks. It also tends to be opaque from an infra‑as‑code and audit standpoint. You get “a desktop,” not a well‑defined dev environment tied to a specific repo, stack, or GPU profile.

Coder’s approach is workspace‑first, not desktop‑first. A workspace is a container or VM defined by Terraform: exact base image, tools, network routes, dev URLs, and resource limits. Developers connect with native IDEs; you keep strong boundaries between environments and can run heterogeneous fleets (ARM/AMD64, Linux/Windows/macOS targets) without forcing a specific desktop experience. Cost‑wise, teams commonly see 70–90% reductions vs. VDI for developers because workspaces can be right‑sized, idled, and destroyed when not in use.

Comparison Snapshot:

  • Option A: VDI‑style desktops
    Heavy full desktops, high per‑seat cost, weak infra‑as‑code, harder to specialize for stacks and GPU workloads.
  • Option B: Coder remote workspaces
    Terraform‑defined workspaces, tight resource control, per‑project templates, native IDE support, strong identity and audit trails.
  • Best for:
    Teams that need developer speed with strict control over source code location, network access, and AI agent behavior—especially in regulated or air‑gapped environments.

How do we actually implement IDE access without leaking code to laptops?

Short Answer: Configure Coder workspaces to accept remote IDE connections over HTTPS/SSH and enforce that repos, build artifacts, and secrets never sync locally.

Expanded Explanation:
VS Code and JetBrains already support remote development modes. With Coder, each workspace exposes a secure endpoint mapped through the coderd control plane. When a developer uses VS Code Remote SSH/Remote Tunnels or JetBrains Gateway, the IDE runs its backend in the workspace; the UI runs on the laptop. Files are edited in place on the remote filesystem.

Platform teams can also control dev URL access levels and outbound network routes to ensure data never flows where it shouldn’t. Nothing requires repo checkout to the laptop, and you can block file download entirely for contractors if that’s your policy. Because Coder is self‑hosted, all this traffic stays in your network perimeter; nothing transits a vendor SaaS IDE.

What You Need:

  • Self‑hosted Coder deployment on your infrastructure (AWS, Azure, GCP, on‑prem, air‑gapped), integrated with your IDP via OIDC.
  • IDE remote configuration for VS Code Remote, JetBrains Gateway, or other editors, pointed at Coder workspaces with appropriate RBAC and dev URL policies.

How does this tie into long‑term strategy—especially with contractors and AI coding agents?

Short Answer: Moving to remote, Terraform‑defined workspaces gives you a durable control layer for contractors, BYOD, and AI coding agents—centralizing permissions, audit logs, and resource policies around your infrastructure instead of individual laptops.

Expanded Explanation:
Contractor churn, BYOD variability, and AI adoption all highlight the same fragility: local dev environments don’t scale, and they’re hard to govern. When source code, secrets, and model context leak onto unmanaged endpoints, your risk profile explodes. A self‑hosted remote dev platform gives you a single point of control: who can spin up what, where their workspaces run, what they can reach on the network, and how all of it is logged.

Coder’s AI Bridge extends this to AI coding agents. It runs inside coderd and proxies requests to your chosen LLMs, capturing auditable records of prompts, tool invocations, token usage, and model reasoning with configurable retention and structured logging. That means you can let agents work against the same governed workspaces as developers—without shipping context to random SaaS tools—and still keep a full record for security teams and auditors.

Why It Matters:

  • Centralized governance for humans and agents.
    RBAC, OIDC SSO, dev URL access levels, and AI Bridge auditing apply to contractors, FTEs, and AI coding agents alike.
  • Lower risk and faster onboarding.
    You onboard contractors in minutes with prebuilt templates, keep code and data off laptops, and give security teams a single, auditable control plane.

Quick Recap

The way to keep source code off developer laptops—especially for contractors and BYOD—without giving up VS Code or JetBrains is to move the dev environment into your own infrastructure and treat workspaces as code. Coder runs as a self‑hosted control plane that provisions standardized workspaces from Terraform templates on Kubernetes or VMs, keeps all repos and data inside your environment (including air‑gapped deployments), and lets developers and AI coding agents connect from their preferred IDEs over HTTPS/SSH. Platform teams get consistent, auditable, right‑sized environments; developers keep their tools; security teams stop worrying about source code walking out on endpoints.

Next Step

Get Started